Skip to content

Commit 54dd6c6

Browse files
committed
docs: adding to config
1 parent 39ad8f2 commit 54dd6c6

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

packages/web/src/content/docs/docs/config.mdx

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,71 @@ In most cases, you'll want to use the global config for things like themes, prov
2121

2222
When opencode starts up, it looks for a config file in the current directory or traverse up to the nearest Git directory.
2323

24+
---
2425

2526
## Schema
2627

2728
The config file has a schema that's defined in [**`opencode.ai/config.json`**](https://opencode.ai/config.json).
2829

2930
Your editor should be able to validate and autocomplete based on the schema.
31+
32+
---
33+
34+
### Models
35+
36+
You can configure the providers and models you want to use in your opencode config through the `provider` and `model` options.
37+
38+
```json title="opencode.json"
39+
{
40+
"$schema": "https://opencode.ai/config.json",
41+
"provider": { },
42+
"model": ""
43+
}
44+
```
45+
46+
[Learn more here](/docs/models).
47+
48+
---
49+
50+
### Themes
51+
52+
You can configure the theme you want to use in your opencode config through the `theme` option.
53+
54+
```json title="opencode.json"
55+
{
56+
"$schema": "https://opencode.ai/config.json",
57+
"theme": ""
58+
}
59+
```
60+
61+
[Learn more here](/docs/themes).
62+
63+
---
64+
65+
### Keybinds
66+
67+
You can customize your keybinds through the `keybinds` option.
68+
69+
```json title="opencode.json"
70+
{
71+
"$schema": "https://opencode.ai/config.json",
72+
"keybinds": { }
73+
}
74+
```
75+
76+
[Learn more here](/docs/keybinds).
77+
78+
---
79+
80+
### MCP servers
81+
82+
You can configure MCP servers you want to use through the `mcp` option.
83+
84+
```json title="opencode.json"
85+
{
86+
"$schema": "https://opencode.ai/config.json",
87+
"mcp": { }
88+
}
89+
```
90+
91+
[Learn more here](/docs/mcp-servers).

packages/web/src/content/docs/docs/models.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ When opencode starts up, it checks for the following:
7575

7676
1. The model list in the opencode config.
7777

78-
```json title="opencode.json" {4}
78+
```json title="opencode.json"
7979
{
8080
"$schema": "https://opencode.ai/config.json",
8181
"model": "anthropic/claude-sonnet-4-20250514"

0 commit comments

Comments
 (0)