Skip to content

The TUI & Keybinds

OpenCode's terminal interface uses split panels for chat, file tree, and diff views. Tab switches between Plan and Build modes. This lesson covers the layout, navigation, and keyboard shortcuts.

Owl mascot

What you'll learn

  • Split-panel TUI: chat panel, file tree, diff viewer, all in one terminal window
  • Tab key toggles between Plan mode (read-only) and Build mode (makes changes)
  • /undo and /redo revert and restore changes

Build it

Launch the OpenCode interface and familiarize yourself with the core commands. Use these shortcuts to navigate modes, manage context, and control version history.

bash
opencode
# Tab: toggle Plan/Build mode
# /init: analyze project and create AGENTS.md
# /undo: revert last change
# /redo: restore reverted change
# /share: create a shareable link to the conversation

What goes wrong

MistakeHow you notice itThe fix
Keybinds conflict with terminalTab or other keys don't work as expectedCustomize keybinds in OpenCode config
Undo not available/undo returns errorUndo only works for the most recent change in the current session

Next: Plan & Build Modes