File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
web/src/content/docs/docs Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ export namespace ToolRegistry {
7575 result [ "patch" ] = false
7676 result [ "write" ] = false
7777 }
78+ if ( cfg ?. permission ?. bash === "deny" ) {
79+ result [ "bash" ] = false
80+ }
7881
7982 if ( modelID . toLowerCase ( ) . includes ( "claude" ) ) {
8083 result [ "patch" ] = false
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ Use the `permission.edit` key to control whether file editing operations require
2121
2222- ` "ask" ` - Prompt for approval before editing files
2323- ` "allow" ` - Allow all file editing operations without approval
24+ - ` "deny" ` - Make all file editing tools disabled and unavailable
2425
2526``` json title="opencode.json" {4}
2627{
@@ -41,7 +42,8 @@ Controls whether bash commands require user approval.
4142You can specify which commands you want to have run without approval.
4243:::
4344
44- This can be configured globally or with specific patterns. Setting this to ` "ask" ` is the strictest mode, requiring approval for all bash commands.
45+ This can be configured globally or with specific patterns. Setting this to ` "ask" ` , requiring approval for all bash commands.
46+ Setting this to ` "deny" ` is the strictest option, blocking LLM from running that command or command pattern.
4547
4648For example.
4749
@@ -56,6 +58,19 @@ For example.
5658 }
5759 ```
5860
61+ - ** Disable all Terraform commands**
62+
63+ ``` json title="opencode.json"
64+ {
65+ "$schema" : " https://opencode.ai/config.json" ,
66+ "permission" : {
67+ "bash" : {
68+ "terraform *" : " deny"
69+ }
70+ }
71+ }
72+ ```
73+
5974- ** Approve specific commands**
6075
6176 ``` json title="opencode.json"
You can’t perform that action at this time.
0 commit comments