|
@@ -5,9 +5,14 @@ description: Using the opencode JSON config.
|
|
|
|
|
|
|
|
You can configure opencode using a JSON config file.
|
|
You can configure opencode using a JSON config file.
|
|
|
|
|
|
|
|
-```json title="opencode.json"
|
|
|
|
|
|
|
+## Format
|
|
|
|
|
+
|
|
|
|
|
+opencode supports both JSON and JSONC (JSON with Comments) formats. You can use comments in your configuration files:
|
|
|
|
|
+
|
|
|
|
|
+```jsonc title="opencode.jsonc"
|
|
|
{
|
|
{
|
|
|
"$schema": "https://opencode.ai/config.json",
|
|
"$schema": "https://opencode.ai/config.json",
|
|
|
|
|
+ // Theme configuration
|
|
|
"theme": "opencode",
|
|
"theme": "opencode",
|
|
|
"model": "anthropic/claude-sonnet-4-20250514",
|
|
"model": "anthropic/claude-sonnet-4-20250514",
|
|
|
"autoupdate": true
|
|
"autoupdate": true
|
|
@@ -199,7 +204,7 @@ about rules here](/docs/rules).
|
|
|
|
|
|
|
|
You can configure specialized agents for specific tasks through the `agent` option.
|
|
You can configure specialized agents for specific tasks through the `agent` option.
|
|
|
|
|
|
|
|
-```json title="opencode.json"
|
|
|
|
|
|
|
+```jsonc title="opencode.jsonc"
|
|
|
{
|
|
{
|
|
|
"$schema": "https://opencode.ai/config.json",
|
|
"$schema": "https://opencode.ai/config.json",
|
|
|
"agent": {
|
|
"agent": {
|
|
@@ -208,6 +213,7 @@ You can configure specialized agents for specific tasks through the `agent` opti
|
|
|
"model": "anthropic/claude-sonnet-4-20250514",
|
|
"model": "anthropic/claude-sonnet-4-20250514",
|
|
|
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
|
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
|
|
|
"tools": {
|
|
"tools": {
|
|
|
|
|
+ // Disable file modification tools for review-only agent
|
|
|
"write": false,
|
|
"write": false,
|
|
|
"edit": false
|
|
"edit": false
|
|
|
}
|
|
}
|