| # | Command | Tool | Category | Tool |
|---|---|---|---|---|
| 1 | /compact Summarize the current session to save tokens. Alias: /summarize. | OpenCode | context-management | OpenCode |
| 2 | /connect Add a provider and API key to connect a new AI model provider. | OpenCode | configuration | OpenCode |
| 3 | /details Toggle tool execution details in the conversation output. | OpenCode | configuration | OpenCode |
| 4 | /editor Open the external $EDITOR for composing messages — useful for long or structured prompts. Keybind: Ctrl+x e. | OpenCode | context-management | OpenCode |
| 5 | /exit Exit OpenCode. Aliases: /quit, /q. Keybind: Ctrl+x q. | OpenCode | session-management | OpenCode |
| 6 | /export Export the current conversation to Markdown and open in $EDITOR. Keybind: Ctrl+x x. | OpenCode | session-management | OpenCode |
| 7 | /init Guided AGENTS.md setup for the current project. | OpenCode | setup | OpenCode |
| 8 | /models List available models across all configured providers. Keybind: Ctrl+x m. | OpenCode | configuration | OpenCode |
| 9 | /new Start a new session. Aliases: /clear. Keybind: Ctrl+x n. | OpenCode | session-management | OpenCode |
| 10 | /redo Restore a previously undone message and file changes. Git-backed. Keybind: Ctrl+x r. | OpenCode | session-management | OpenCode |
| 11 | /sessions List and switch sessions. Aliases: /resume, /continue. Keybind: Ctrl+x l. | OpenCode | session-management | OpenCode |
| 12 | /share Share the current session publicly. | OpenCode | session-management | OpenCode |
| 13 | /themes List available themes and switch the visual theme. Keybind: Ctrl+x t. | OpenCode | configuration | OpenCode |
| 14 | /thinking Toggle visibility of reasoning blocks in the response. | OpenCode | configuration | OpenCode |
| 15 | /undo Remove the last message and its responses, and revert any file changes made. Git-backed — requires a git repository. Keybind: Ctrl+x u. | OpenCode | session-management | OpenCode |