Skip to content

Navigating the CLI

The Cosine CLI features an intuitive terminal-based user interface (TUI) with three main areas: the Sidebar Panel, the Timeline, and the Chat Input. This guide covers keyboard navigation, shortcuts, and how to move between different views.

┌─────────────────────────────────────────────────────────────┐
│ Sidebar Panel │ Timeline (Main Chat) │
│ (Overview, │ │
│ Terminals, │ User: How do I refactor this? │
│ Agents, │ │
│ Changes) │ Assistant: Here's the solution... │
│ │ ┌─────────────────────────────┐ │
│ │ │ Tool: code_edit │ │
│ │ │ File: src/utils.ts │ │
│ │ └─────────────────────────────┘ │
│ │ │
├───────────────────┴─────────────────────────────────────────┤
│ [Ctrl+P] Tools │ [Shift+Tab] Mode: Auto > Type message │
└─────────────────────────────────────────────────────────────┘

The panel provides contextual information and tools across four tabs:

TabShortcutDescription
OverviewCtrl+1 / Alt+1Repository structure and context files
TerminalsCtrl+2 / Alt+2Active terminal sessions and output
AgentsCtrl+3 / Alt+3Background agent tasks and subagents
ChangesCtrl+4 / Alt+4Git diff and file changes

Panel Controls:

  • Ctrl+/ - Toggle panel visibility on/off
  • Ctrl+`` (backtick) - Toggle focus between panel and chat
  • Tab / Shift+Tab - Cycle between sections (when panel is focused)
  • Left / Right - Switch between panel tabs (when panel is focused)

The timeline displays the conversation history, including:

  • User messages
  • Assistant responses
  • Tool calls and their results
  • Terminal output
  • Plans and todo lists
  • Reasoning blocks

The text area where you type messages to the AI agent.


The timeline supports powerful keyboard navigation for reviewing past conversations and copying content.

When the timeline is focused, use these keys to jump between user messages:

KeyAction
(Up) / kJump to previous user message
(Down) / jJump to next user message
SpaceExpand/collapse assistant response under selected user message
yCopy the assistant’s response to clipboard

How it works:

  1. Press Tab until the timeline is focused (or click in the timeline area)
  2. Press or to navigate between your past questions/prompts
  3. The assistant’s response to that message is highlighted
  4. Press y to copy the entire assistant response to your clipboard
  5. Press Space to expand or collapse the response for easier reading

General scrolling works from any view:

KeyAction
PgUp / Ctrl+UScroll up one page
PgDn / Ctrl+DScroll down one page
HomeJump to top of timeline
EndJump to bottom of timeline

Pro tip: When your cursor is in the input box and it’s empty, the Up/Down arrows automatically scroll the timeline instead of moving the cursor.


Execution blocks are groups of related activities (tool calls, terminal output, reasoning). You can navigate between them:

KeyAction
Shift+↑Select previous execution block
Shift+↓Select next execution block
Ctrl+OToggle expand/collapse selected execution block

Cycle between the main interface sections:

KeyAction
TabMove focus to next section (Input → Timeline → Panel → Input)
Ctrl+TabQuickly focus the chat input from anywhere

KeyAction
yCopy selected assistant output (timeline focused)

The copy action shows a brief visual confirmation when successful.

KeyAction
SpaceExpand assistant response under selected user message
pToggle plan visibility
Ctrl+OToggle execution block

When a tool requires confirmation:

KeyAction
y / EnterConfirm and execute tool
n / EscReject tool execution

Switch between AI operation modes:

KeyAction
Shift+TabCycle through modes: Normal → Auto → Plan → Swarm

Modes explained:

  • Normal: Ask for confirmation before each mutating action (default)
  • Auto: Automatically execute all tools without confirmation
  • Plan: Read-only planning — explore code and create a plan before executing
  • Swarm: Multi-agent orchestration with parallel subagents

For a detailed explanation of each mode, see Modes.


ShortcutAction
Ctrl+CInterrupt/cancel current agent run
EscCancel operation or close dialog
EnterSend message (when in input)
Shift+Enter / Ctrl+JNew line in input (without sending)
Ctrl+TabFocus chat input
Ctrl+/Toggle sidebar panel
Ctrl+POpen tools/settings
Ctrl+LOpen event log (debug mode)
?Open keyboard shortcuts help

  1. Quick copy workflow: Press Tab to focus timeline, / to find the message, y to copy
  2. Hide panel for focus: Use Ctrl+/ to hide the panel when you want more space for the conversation
  3. Navigate while typing: Use Ctrl+Tab to jump back to input from anywhere
  4. Review tool results: Use Shift+↑/Shift+↓ to jump between execution blocks
  5. Scroll hands-free: When not typing, Up/Down arrows scroll the timeline; when typing in empty input, they also scroll