Start typing to search the documentation.

CLI navigation

Keybinds

Customize bindings in cli.json:

cli.json
{
  "keybinds": {
    "leader": "ctrl+space",
    "command.palette.show": "ctrl+k",
    "app.exit": ["ctrl+c", "ctrl+d"],
    "app.debug": false
  },
  "leader": {
    "timeout": 1500
  }
}

Use a string for one key:

{
  "keybinds": {
    "command.palette.show": "ctrl+k"
  }
}

Separate alternatives with commas:

{
  "keybinds": {
    "app.exit": "ctrl+c,ctrl+d"
  }
}

Disable a binding with "none" or false:

{
  "keybinds": {
    "app.debug": "none",
    "help.show": false
  }
}

Use an object for event behavior:

{
  "keybinds": {
    "prompt.paste": {
      "key": "ctrl+v",
      "preventDefault": false
    }
  }
}

leader defaults to ctrl+x. <leader> in another binding refers to that key.

{
  "keybinds": {
    "leader": "ctrl+space",
    "model.list": "<leader>m"
  },
  "leader": {
    "timeout": 2000
  }
}

Unknown command IDs are rejected.

Application

IDDefaultDescription
leaderctrl+xLeader key for keybind combinations
app.exitctrl+c,ctrl+d,<leader>qExit the application
app.debugnoneToggle debug panel
app.consolenoneToggle console
app.scrapnoneOpen scrap screen
app.toggle.animationsnoneToggle animations
app.toggle.file_contextnoneToggle file context
app.toggle.diffwrapnoneToggle diff wrapping
app.toggle.paste_summarynoneToggle paste summary
command.palette.showctrl+pList available commands
help.shownoneOpen help dialog
docs.opennoneOpen documentation
opencode.settingsnoneOpen settings
server.pairnonePair device
service.restartnoneRestart service
permission.modenoneToggle auto-approve permissions

Mini

The app.clear command works only in opencode mini. Press ctrl+l to clear the visible screen and draw the prompt again. The terminal keeps the scrollback.

cli.json
{
  "keybinds": {
    "app.clear": "ctrl+l"
  }
}
IDDefaultDescription
app.clearctrl+lClear the screen

Diff Viewer

Press d (diff.switch_source) to choose All, Committed, Uncommitted, or Last turn (inside a session), or select Base to change the comparison branch. Choices are remembered until the TUI exits. Set the initial scope with diffs.source in cli.json.

Scrolling, paging, and start/end shortcuts always control the diff. There is no keyboard focus switch: click files to open them, click folders to expand or collapse them, and use the mouse wheel to scroll the file tree.

Use n / p or alt+down / alt+up (Option on macOS) to move between files. Inside the diff viewer, the Alt shortcuts navigate files rather than session tabs.

Press m to mark a file reviewed and collapse its patch body. In all-files view, press m again to unmark it and reopen the patch. Single-file view automatically advances to the next file when marking reviewed, but stays on the last file rather than wrapping. Unmarking a file never advances.

Right-click a file in the sidebar or its diff heading for Mark complete (or Mark incomplete). This changes the same reviewed state as m. Completing a different file from its menu does not select it or advance the file currently being read.

The shifted diff.help alternatives support terminals that report the Shift modifier when you press ?.

IDDefaultDescription
diff.opennoneOpen diff viewer
diff.closeescape,qClose diff viewer
diff.downj,downMove diff viewer down
diff.upk,upMove diff viewer up
diff.page.downpagedown,ctrl+fPage diff viewer down
diff.page.uppageup,ctrl+bPage diff viewer up
diff.half_page.downctrl+dScroll diff viewer down half a page
diff.half_page.upctrl+uScroll diff viewer up half a page
diff.firstgg,homeGo to the start of the diff
diff.lastshift+g,endGo to the end of the diff
diff.next_hunk]Jump to next diff hunk
diff.previous_hunk[Jump to previous diff hunk
diff.next_filen,alt+downJump to next diff file
diff.previous_filep,alt+upJump to previous diff file
diff.toggle_file_treebToggle diff viewer file tree
diff.single_patchsToggle single patch view
diff.switch_sourcedChoose the diff review scope
diff.toggle_viewvToggle diff viewer split or unified view
diff.mark_reviewedmToggle selected diff file reviewed
diff.help?,shift+?,shift+/Show more diff viewer shortcuts

The retired diff.toggle, diff.expand, diff.expand_all, diff.collapse, and diff.switch_focus configuration entries are still accepted, but no longer register shortcuts.

Appearance And Navigation

IDDefaultDescription
prompt.editor<leader>eOpen external editor
theme.switch<leader>tList available themes
theme.switch_modenoneSwitch between light and dark theme mode
theme.mode.locknoneLock or unlock theme mode
session.sidebar.toggle<leader>bToggle sidebar
session.toggle.scrollbarnoneToggle session scrollbar
opencode.status<leader>sView status
opencode.debugnoneView debug info

Sessions

IDDefaultDescription
session.export<leader>xExport session to editor
session.copynoneCopy session transcript
session.movenoneMove session
session.new<leader>nCreate a new session
session.list<leader>lList all sessions
open.menuctrl+oOpen recent sessions and projects
session.tab.nextctrl+tab,alt+downSwitch to next open session tab
session.tab.previousctrl+shift+tab,alt+upSwitch to previous open session tab
session.tab.history.backnoneGo back in session tab history
session.tab.history.forwardctrl+iGo forward in session tab history
session.tab.next_unreadalt+shift+downSwitch to next unread session tab
session.tab.previous_unreadalt+shift+upSwitch to previous unread session tab
session.tab.close<leader>wClose current session tab
session.tab.reopenctrl+shift+tReopen last closed session tab
session.timeline<leader>gShow session timeline
session.forknoneFork session from message
session.renamectrl+rRename session
session.deletectrl+dDelete session
session.sharenoneShare current session
session.unsharenoneUnshare current session
session.interruptescapeInterrupt current session
session.backgroundctrl+bBackground blocking session tools
session.compact<leader>cCompact the session
session.asidenoneAsk a side question
session.cdnoneChange working directory
session.queued_prompts<leader>qManage queued prompts
queued_prompt.undoctrl+uUndo queued prompt
queued_prompt.deletectrl+dDelete queued prompt
session.toggle.exploration_groupingnoneToggle related tool call grouping
session.child.firstdownToggle subagent picker
session.child.nextrightGo to next child session
session.child.previousleftGo to previous child session
session.parentupGo to parent session
session.pin.togglectrl+fPin or unpin session in the session list
session.quick_switch.1<leader>1Switch to session in quick slot 1
session.quick_switch.2<leader>2Switch to session in quick slot 2
session.quick_switch.3<leader>3Switch to session in quick slot 3
session.quick_switch.4<leader>4Switch to session in quick slot 4
session.quick_switch.5<leader>5Switch to session in quick slot 5
session.quick_switch.6<leader>6Switch to session in quick slot 6
session.quick_switch.7<leader>7Switch to session in quick slot 7
session.quick_switch.8<leader>8Switch to session in quick slot 8
session.quick_switch.9<leader>9Switch to session in quick slot 9
session.tab.select.1<leader>1,ctrl+1Switch to session tab 1
session.tab.select.2<leader>2,ctrl+2Switch to session tab 2
session.tab.select.3<leader>3,ctrl+3Switch to session tab 3
session.tab.select.4<leader>4,ctrl+4Switch to session tab 4
session.tab.select.5<leader>5,ctrl+5Switch to session tab 5
session.tab.select.6<leader>6,ctrl+6Switch to session tab 6
session.tab.select.7<leader>7,ctrl+7Switch to session tab 7
session.tab.select.8<leader>8,ctrl+8Switch to session tab 8
session.tab.select.9<leader>9,ctrl+9Switch to session tab 9
session.tab.select.10<leader>0,ctrl+0Switch to session tab 10

Models And Agents

IDDefaultDescription
stash.deletectrl+dDelete stash entry
model.dialog.providerctrl+aOpen provider list from model dialog
model.dialog.favoritectrl+fToggle model favorite status
model.list<leader>mList available models
model.cycle_recentf2Next recently used model
model.cycle_recent_reverseshift+f2Previous recently used model
model.cycle_favoritenoneNext favorite model
model.cycle_favorite_reversenonePrevious favorite model
mcp.listnoneList MCP servers
provider.connectnoneConnect integration
agent.list<leader>aList agents
agent.cycleshift+tabNext agent
agent.cycle.reversenonePrevious agent
variant.cyclectrl+tCycle model variants
variant.listnoneList model variants

Session Navigation

IDDefaultDescription
session.page.uppageup,ctrl+alt+bScroll messages up by one page
session.page.downpagedown,ctrl+alt+fScroll messages down by one page
session.line.upctrl+alt+yScroll messages up by one line
session.line.downctrl+alt+eScroll messages down by one line
session.half.page.upctrl+alt+uScroll messages up by half page
session.half.page.downctrl+alt+dScroll messages down by half page
session.firstctrl+g,home,alt+homeNavigate to first message
session.lastctrl+alt+g,endNavigate to last message
session.message.nextnoneNavigate to next message
session.message.previousnoneNavigate to previous message
session.message.user.nextnoneNavigate to next user message
session.message.user.previousnoneNavigate to previous user message
session.messages_last_useralt+endNavigate to last user message
messages.copy<leader>yCopy message
session.undo<leader>uUndo message
session.redo<leader>rRedo message
session.toggle.thinkingnoneToggle thinking blocks visibility

Prompt Commands

IDDefaultDescription
prompt.submitnoneSubmit prompt
prompt.queuealt+returnQueue prompt
prompt.editor_context.clearnoneClear editor context
prompt.images.view<leader>iView image attachments
prompt.skillsnoneOpen skill selector
prompt.stashnoneStash prompt
prompt.stash.popnonePop stashed prompt
prompt.stash.listnoneList stashed prompts

Input Editing

IDDefaultDescription
prompt.clearctrl+cClear input field
prompt.paste{"key":"ctrl+v","preventDefault":false} (ctrl+v; preventDefault: false)Paste from clipboard
input.submitreturnSubmit input
input.newlineshift+return,ctrl+return,ctrl+jInsert newline in input
input.move.leftleft,ctrl+bMove cursor left in input
input.move.rightright,ctrl+fMove cursor right in input
input.move.upupMove cursor up in input
input.move.downdownMove cursor down in input
input.select.leftshift+leftSelect left in input
input.select.rightshift+rightSelect right in input
input.select.upshift+upSelect up in input
input.select.downshift+downSelect down in input
input.line.homectrl+aMove to start of line in input
input.line.endctrl+eMove to end of line in input
input.select.line.homectrl+shift+aSelect to start of line in input
input.select.line.endctrl+shift+eSelect to end of line in input
input.visual.line.homealt+aMove to start of visual line in input
input.visual.line.endalt+eMove to end of visual line in input
input.select.visual.line.homealt+shift+aSelect to start of visual line in input
input.select.visual.line.endalt+shift+eSelect to end of visual line in input
input.buffer.homenoneMove to start of buffer in input
input.buffer.endnoneMove to end of buffer in input
input.select.buffer.homeshift+homeSelect to start of buffer in input
input.select.buffer.endshift+endSelect to end of buffer in input
input.delete.linectrl+shift+dDelete line in input
input.delete.to.line.endctrl+kDelete to end of line in input
input.delete.to.line.startctrl+uDelete to start of line in input
input.backspacebackspace,shift+backspaceBackspace in input
input.deletectrl+d,delete,shift+deleteDelete character in input
input.undoctrl+-,super+zUndo in input
input.redoctrl+.,super+shift+zRedo in input
input.word.forwardalt+f,alt+right,ctrl+rightMove word forward in input
input.word.backwardalt+b,alt+left,ctrl+leftMove word backward in input
input.select.word.forwardalt+shift+f,alt+shift+rightSelect word forward in input
input.select.word.backwardalt+shift+b,alt+shift+leftSelect word backward in input
input.delete.word.forwardalt+d,alt+delete,ctrl+deleteDelete word forward in input
input.delete.word.backwardctrl+w,ctrl+backspace,alt+backspaceDelete word backward in input
input.select.allsuper+aSelect all in input
prompt.history.previousupPrevious history item
prompt.history.nextdownNext history item

Composer

IDDefaultDescription
composer.subagent.upupPrevious subagent
composer.subagent.downdownNext subagent
composer.subagent.selectreturnNavigate to subagent
composer.subagent.interruptctrl+dInterrupt subagent
composer.shell.upupPrevious shell
composer.shell.downdownNext shell
composer.shell.selectreturnView shell output
composer.shell.killctrl+dKill shell command

Select a running command in the Shell tab and press Enter, or click it, to view captured stdout and stderr. Use ↑/↓, Page Up/Down, or Home to scroll, End to follow new output, and Esc to return without stopping the command. The viewer shows recent output and stays open after exit; output redirected to a file is not included.

Dialogs And Autocomplete

IDDefaultDescription
dialog.select.prevup,ctrl+pMove to previous dialog item
dialog.select.nextdown,ctrl+nMove to next dialog item
dialog.select.page_uppageupMove up one page in dialog
dialog.select.page_downpagedownMove down one page in dialog
dialog.select.homehomeMove to first dialog item
dialog.select.endendMove to last dialog item
dialog.select.submitreturnSubmit selected dialog item
dialog.prompt.submitreturnSubmit dialog prompt
dialog.worktree.generatetabGenerate worktree name
dialog.move_session.newctrl+mNew worktree
dialog.move_session.deletectrl+dDelete worktree
dialog.move_session.refreshctrl+rRefresh worktrees
prompt.autocomplete.prevup,ctrl+pMove to previous autocomplete item
prompt.autocomplete.nextdown,ctrl+nMove to next autocomplete item
prompt.autocomplete.hideescapeHide autocomplete
prompt.autocomplete.selectreturnSelect autocomplete item
prompt.autocomplete.completetabComplete autocomplete item
permission.prompt.fullscreenctrl+fToggle permission prompt fullscreen
plugins.togglespaceToggle plugin
dialog.mcp.togglespaceToggle MCP server
dialog.plugins.installshift+iInstall plugin from plugin dialog
dialog.plugins.updatectrl+uUpdate plugin from plugin dialog
dialog.plugins.checkctrl+rCheck for plugin updates

Terminal And Plugins

IDDefaultDescription
terminal.suspendctrl+zSuspend terminal
terminal.title.togglenoneToggle terminal title
plugins.listnoneOpen plugin manager dialog
plugins.installnoneInstall plugin

Which-Key

IDDefaultDescription
which-key.togglectrl+alt+kToggle which-key panel
which-key.layout.togglectrl+alt+shift+kSwitch which-key layout
which-key.pending.togglectrl+alt+shift+pToggle which-key pending preview
which-key.group.previousctrl+alt+left,ctrl+alt+[Previous which-key group
which-key.group.nextctrl+alt+right,ctrl+alt+]Next which-key group
which-key.scroll.upctrl+alt+up,ctrl+alt+pScroll which-key up
which-key.scroll.downctrl+alt+down,ctrl+alt+nScroll which-key down
which-key.page.upctrl+alt+pageupPage which-key up
which-key.page.downctrl+alt+pagedownPage which-key down
which-key.homectrl+alt+homeJump to first which-key binding
which-key.endctrl+alt+endJump to last which-key binding