Skip to content

Commit 8c1e18b

Browse files
committed
feat(opencode): multiple config files
1 parent 4f8c41f commit 8c1e18b

8 files changed

Lines changed: 241 additions & 229 deletions

File tree

‎.config/mise/conf.d/opencode.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[env]
2+
OPENCODE_VERSION = "v2.2.6"

‎.config/opencode/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
src=$(wildcard opencode.d/*.json)
2+
3+
opencode.json: $(src)
4+
@jq -s 'reduce .[] as $$obj ({}; . * $$obj)' $(src) > opencode.json
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"update": "disable",
4+
"model": "neuraldeep/qwen3.6-fp8",
5+
"agents": {
6+
"title": {
7+
"model": "neuraldeep/qwen3.6-fp8-noreason"
8+
}
9+
},
10+
"shell": "/bin/bash",
11+
"instructions": [
12+
"~/.config/opencode/AGENTS.caveman.md"
13+
]
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"mcp": {
4+
"servers": {
5+
"context7": {
6+
"type": "remote",
7+
"disabled": false,
8+
"url": "https://mcp.context7.com/mcp",
9+
"headers": {
10+
"CONTEXT7_API_KEY": "{file:~/.secretes/api/ai/context7}"
11+
}
12+
}
13+
}
14+
}
15+
}
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"permissions": [
4+
{
5+
"action": "shell",
6+
"resource": "*",
7+
"effect": "ask"
8+
},
9+
{
10+
"action": "shell",
11+
"resource": "git status *",
12+
"effect": "allow"
13+
},
14+
{
15+
"action": "shell",
16+
"resource": "git diff *",
17+
"effect": "allow"
18+
},
19+
{
20+
"action": "shell",
21+
"resource": "git log *",
22+
"effect": "allow"
23+
},
24+
{
25+
"action": "shell",
26+
"resource": "git show *",
27+
"effect": "allow"
28+
},
29+
{
30+
"action": "shell",
31+
"resource": "ls *",
32+
"effect": "allow"
33+
},
34+
{
35+
"action": "shell",
36+
"resource": "cat *",
37+
"effect": "allow"
38+
},
39+
{
40+
"action": "shell",
41+
"resource": "head *",
42+
"effect": "allow"
43+
},
44+
{
45+
"action": "shell",
46+
"resource": "tail *",
47+
"effect": "allow"
48+
},
49+
{
50+
"action": "shell",
51+
"resource": "grep *",
52+
"effect": "allow"
53+
},
54+
{
55+
"action": "shell",
56+
"resource": "rg *",
57+
"effect": "allow"
58+
},
59+
{
60+
"action": "shell",
61+
"resource": "echo *",
62+
"effect": "allow"
63+
},
64+
{
65+
"action": "shell",
66+
"resource": "npm test *",
67+
"effect": "allow"
68+
},
69+
{
70+
"action": "shell",
71+
"resource": "pnpm test *",
72+
"effect": "allow"
73+
},
74+
{
75+
"action": "shell",
76+
"resource": "ansible-lint *",
77+
"effect": "allow"
78+
},
79+
{
80+
"action": "shell",
81+
"resource": "ansible-doc *",
82+
"effect": "allow"
83+
},
84+
{
85+
"action": "shell",
86+
"resource": "shellspec *",
87+
"effect": "allow"
88+
},
89+
{
90+
"action": "edit",
91+
"resource": "*",
92+
"effect": "ask"
93+
},
94+
{
95+
"action": "webfetch",
96+
"resource": "*",
97+
"effect": "ask"
98+
},
99+
{
100+
"action": "read",
101+
"resource": "*",
102+
"effect": "allow"
103+
},
104+
{
105+
"action": "read",
106+
"resource": "*.env",
107+
"effect": "deny"
108+
},
109+
{
110+
"action": "read",
111+
"resource": ".ansible_vault_*",
112+
"effect": "deny"
113+
},
114+
{
115+
"action": "read",
116+
"resource": "secrets/*",
117+
"effect": "deny"
118+
},
119+
{
120+
"action": "skill",
121+
"resource": "caveman*",
122+
"effect": "allow"
123+
}
124+
]
125+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"plugins": [
4+
{
5+
"package": "@plannotator/opencode@latest",
6+
"options": {
7+
"workflow": "plan-agent",
8+
"planningAgents": [
9+
"plan"
10+
]
11+
}
12+
}
13+
]
14+
}

0 commit comments

Comments
 (0)