Skip to content

Panel and keys

KeyDoes
<leader>oToggle the panel under the conversation
<leader>jOpen the full console

OpenCode’s leader is ctrl+x unless you have changed it, so these read as ctrl+x o and ctrl+x j. Both are rebindable, in the shell section — pick a key OpenCode does not already use:

~/.config/opencode-cockpit/config.json
{ "shell": { "keybinds": { "cockpit.shells.console": "<leader>z" } } }

Every command below also has a slash name, so nothing here depends on a key being free.

The panel lists the shells of the session you are in. A project’s shells all mixed together is how the panel stops making sense, so switching conversations changes what you see — without stopping anything. Press s in the console to widen it to the whole project and back.

A dock under the chat with a tab per shell, the selected shell’s live screen, and the health of each one at a glance. shell.dockHeight sets how tall, shell.dockOpen whether it starts open.

A shell’s state reads the same in the dock, the sidebar and the console: ⠹ RUN (the spinner turns while it runs), ● FAIL, ● STOP, ● DONE. Running shells and recent failures stay in view; the rest fold behind + N more.

Full screen, one shell at a time.

The row along the bottom carries the keys that act on the shell in front of you — they change with its state, because a key with nothing to act on is noise:

running: [i] Type [c] ^C [r] Restart [x] Stop [?] Details [esc] Close
finished: [r] Run Again [d] Remove [?] Details [esc] Close

Everything else is behind ?, listed under the shell’s own facts. Those keys work from anywhere in the console, whether or not you can see them.

KeyDoes
i returnType into the shell — every key goes to the program, ctrl+c included
ctrl+]Stop typing, back to these keys
cSend ctrl+c without entering typing mode
rRestart it, or run a finished one again
xStop it
dRemove a finished shell from the list
shift+dForget every finished shell
KeyDoes
tabSwitch between the screen and the agent’s numbered log
/Filter the log — matches highlighted, line numbers kept
backspaceClear the filter
?Details: command, folder, timing, watcher, log file, and the keys on this page
j k or arrowsScroll the log
g shift+gTop, bottom
[ ]Previous / next shell
sThis session only, or the whole project
nStart a new shell yourself
q escBack to the conversation

Filtering happens in the daemon, so a 40,000-line dev server costs nothing to search.

Terminal window
bunx @opencode-cockpit/shell preview
bunx @opencode-cockpit/shell preview --part console --state failed --columns 60

Draws the sidebar block, the dock and the console — empty, running, failed, details, a filtered log, finished — from sample shells, in your terminal, with no OpenCode and no daemon running. --part picks sidebar, dock or console; --width sets the sidebar’s width, --columns the dock’s and the console’s; --help lists the states. Plain text under NO_COLOR or into a pipe.

/shells-stop stops the shells you are looking at; /shells-stop-all stops every shell in the project and asks first when that includes conversations you cannot see. /shells-dock toggles the panel, /shell opens the console, /shells picks a shell (or “New shell”), /shell-new starts one, /shells-clear forgets finished shells, /shells-restart-daemon replaces a daemon running older code. Rebind them under shell.keybinds.