Added opencode.json template with current working config
Some checks failed
Format / format (push) Has been cancelled
Some checks failed
Format / format (push) Has been cancelled
This commit is contained in:
57
opencode.template.jsonc
Normal file
57
opencode.template.jsonc
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
// Template opencode configuration with restrictive permissions
|
||||||
|
// Copy this file to ~/.config/opencode.json (or opencode.json inside a repo)
|
||||||
|
// and modify as needed
|
||||||
|
"$schema": "https://opencode.ai/config.json",
|
||||||
|
"mcp": {
|
||||||
|
"weather": {
|
||||||
|
"type": "local",
|
||||||
|
"command": ["opencode", "x", "@h1deya/mcp-server-weather"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"permission": {
|
||||||
|
"bash": {
|
||||||
|
"git branch -d": "ask",
|
||||||
|
"git branch -D": "ask",
|
||||||
|
"git status": "allow",
|
||||||
|
"git diff": "allow",
|
||||||
|
"git log": "allow",
|
||||||
|
"git show": "allow",
|
||||||
|
"git branch": "allow",
|
||||||
|
"git remote": "allow",
|
||||||
|
"git fetch": "allow",
|
||||||
|
"git pull": "allow",
|
||||||
|
"git merge": "ask",
|
||||||
|
"git rebase": "ask",
|
||||||
|
"git commit": "ask",
|
||||||
|
"git push": "ask",
|
||||||
|
"git checkout": "ask",
|
||||||
|
"git switch": "ask",
|
||||||
|
"git reset": "ask",
|
||||||
|
"git revert": "ask",
|
||||||
|
"git rm": "ask",
|
||||||
|
"git mv": "ask",
|
||||||
|
"git worktree": "ask",
|
||||||
|
"cat": "allow",
|
||||||
|
"tail": "allow",
|
||||||
|
"head": "allow",
|
||||||
|
"less": "allow",
|
||||||
|
"more": "allow",
|
||||||
|
"grep": "allow",
|
||||||
|
"find": "allow",
|
||||||
|
"ls": "allow",
|
||||||
|
"pwd": "allow",
|
||||||
|
"cd": "allow",
|
||||||
|
"mkdir": "ask",
|
||||||
|
"rm": "ask",
|
||||||
|
"rmdir": "ask",
|
||||||
|
"mv": "ask",
|
||||||
|
"cp": "ask",
|
||||||
|
"touch": "ask",
|
||||||
|
"chmod": "ask",
|
||||||
|
"chown": "ask",
|
||||||
|
"su": "deny",
|
||||||
|
"sudo": "deny"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user