feat(tui): add yolo permission mode (#33279)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
parent
ba41dadc91
commit
0a5bed2bc2
11 changed files with 133 additions and 36 deletions
|
|
@ -37,6 +37,7 @@ opencode [project]
|
|||
| <nobr><code>{"--prompt"}</code></nobr> | | Prompt to use |
|
||||
| <nobr><code>{"--model"}</code></nobr> | `-m` | Model to use in the form of provider/model |
|
||||
| <nobr><code>{"--agent"}</code></nobr> | | Agent to use |
|
||||
| <nobr><code>{"--auto"}</code></nobr> | | Auto-approve permissions that are not explicitly denied |
|
||||
| <nobr><code>{"--port"}</code></nobr> | | Port to listen on |
|
||||
| <nobr><code>{"--hostname"}</code></nobr> | | Hostname to listen on |
|
||||
| <nobr><code>{"--mdns"}</code></nobr> | | Enable mDNS discovery |
|
||||
|
|
@ -380,7 +381,7 @@ opencode run --attach http://localhost:4096 "Explain async/await in JavaScript"
|
|||
| <nobr><code>{"--port"}</code></nobr> | | Port for the local server (defaults to random port) |
|
||||
| <nobr><code>{"--variant"}</code></nobr> | | Model variant (provider-specific reasoning effort) |
|
||||
| <nobr><code>{"--thinking"}</code></nobr> | | Show thinking blocks |
|
||||
| <nobr><code>{"--dangerously-skip-permissions"}</code></nobr> | | Auto-approve permissions that are not explicitly denied (dangerous!) |
|
||||
| <nobr><code>{"--auto"}</code></nobr> | | Auto-approve permissions that are not explicitly denied |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,26 @@ Each permission rule resolves to one of:
|
|||
|
||||
---
|
||||
|
||||
## Auto mode
|
||||
|
||||
Start OpenCode with `--auto` to automatically approve permission requests that are not explicitly denied.
|
||||
|
||||
```bash
|
||||
opencode --auto
|
||||
```
|
||||
|
||||
You can also use auto mode with [`opencode run`](/docs/cli#run).
|
||||
|
||||
```bash
|
||||
opencode run --auto "Refactor this module"
|
||||
```
|
||||
|
||||
Explicit `"deny"` rules are still enforced. Auto mode only changes requests that would otherwise ask for approval.
|
||||
|
||||
In the TUI, open the command palette and select **Enable auto-approve permissions** or **Disable auto-approve permissions** to change modes. When auto mode is active, the prompt displays a muted `auto` indicator next to the current agent.
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
You can set permissions globally (with `*`), and override specific tools.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue