larik v0.3.0

Guide

Commands and keys

The input row fills the terminal width, stays at the bottom, and grows up to ten lines as you type. The conversation scrolls above it with Page Up/Down, the mouse wheel, or Ctrl+Home/End on an empty input. Larik uses the terminal's alternate screen and captures the mouse for wheel scrolling, so to select text hold Shift while dragging (Option in iTerm2 and Terminal.app), or turn Mouse scrolling off in /config to select normally and scroll with Page Up/Down. /copy copies the last reply, as Markdown, to the clipboard. On exit it prints the session ID to resume with larik --resume <id>. In-session pickers and settings panels open just above the input and leave recent messages visible; use Ctrl+Page Up/Down or the mouse wheel over a panel to scroll panel content when it does not fit. Edit and file-write previews use syntax highlighting when the file type is recognized.

enter sends. shift+enter, alt+enter or ctrl+j adds a newline. esc interrupts the current turn. F2 or /info toggles the session sidebar: the task list, MCP servers that are connected or need attention, language servers that are running or failed, and the skills used this session, each in its own section. It stays open while you type and while a turn runs, and becomes a popup on narrow terminals. The model, effort and permission mode stay in the footer. While a multi-step task is in progress, its checklist floats at the top right (or moves into the sidebar); the completed checklist is added to the conversation. shift+tab cycles and saves the permission mode. alt+p opens the model picker. ctrl+o switches thinking between a one-line summary ("Thought for 14s") and the full text. ? on an empty prompt shows every shortcut. Typing / opens the command palette: keep typing to filter, ↑/↓ to choose, tab to complete, enter to run, esc to close. ctrl+c clears the input, interrupts, or (pressed twice) quits.

Vim mode

/vim (or Editor mode in /config, saved as "editor_mode": "vim") edits the prompt vim-style. Each prompt starts in insert mode, where typing works as usual; esc switches to normal mode, and the footer shows which one you're in. While a turn runs, esc on an empty prompt still interrupts.

Normal mode supports:

  • Moving: h j k l, w b e and W B E, 0 ^ $, gg G (with a count, a line number), f F t T with ; and ,. k on the first line and j on the last recall prompt history, like the arrow keys.
  • Operators: d, c and y with any motion, doubled for whole lines (dd, cc, yy), or with a text object: iw aw, iW aW, quotes (i" a" i' a') and brackets (i( a( ib, i[, i{ iB, i<).
  • Editing: x X D C s S r ~ J, p P to put what was deleted or yanked, u to undo, . to repeat the last change, including text typed after it. Counts work: 3w, 2dd, d2w.
  • Entering insert mode: i a I A o O.

enter sends the prompt from either mode, and ctrl+ shortcuts keep working. Searching (/, ?), visual mode, marks, macros and named registers aren't supported.

Rebinding keys

keybindings in ~/.config/larik/config.json (or private project settings) maps an action to a key or a list of keys, replacing that action's defaults. An empty list unbinds it:

json
{
  "keybindings": {
    "external_editor": "ctrl+e",
    "toggle_thinking": ["ctrl+t", "ctrl+o"],
    "paste_image": []
  }
}

Actions and their defaults: submit (enter), newline (shift+enter, alt+enter, ctrl+j), interrupt (esc), quit (ctrl+d on an empty input), history_search (ctrl+r), external_editor (ctrl+g), paste_image (ctrl+v), cycle_mode (shift+tab), toggle_thinking (ctrl+o), model_picker (alt+p), shortcuts (?), scroll_up (pgup), scroll_down (pgdown), scroll_top (ctrl+home), scroll_bottom (ctrl+end). Keys are written as Bubble Tea names them: ctrl+, alt+, shift+ and super+ in front of a character or enter, tab, esc, space, up, pgup, f5 and so on. A key you give one action is taken from whichever action had it by default. ctrl+c can't be rebound, and a plain character can't be bound (it would stop you typing it) except to shortcuts. Keys inside pickers and permission prompts stay as they are. The banner lists entries that couldn't apply, and ? and the hints across the interface show the keys as bound. Shared .larik/settings.json files can't rebind keys.

Each thing you should recognize at a glance has its own color in the footer:

Item Color
Mode default plain text
Mode plan (read-only) blue
Mode accept edits violet
Mode yolo red
Effort low … max one magenta hue that gets brighter, with a bar (▂ ▃ ▅ ▆ █) that grows
◈ sandbox / ⚠ no sandbox green when the sandbox is on; amber when it is off (red if you are also in yolo)
Cost plain; with a session budget it reads $0.68/$2.00, amber at the warning threshold and red at the cap
Context the bar and the percentage turn amber at 70% and red at 90%

Teal is kept for Larik's own chrome: the model marker, the spinner, headings and borders. A subagent that is waiting for a permission answer is shown in amber.

Status line

status_line replaces the footer's model, context and cost with a command's output. The permission mode stays on the left:

json
{ "status_line": { "type": "command", "command": "~/.config/larik/status.sh" } }

The command gets the session's state as JSON on stdin, in the form Claude Code gives its statusLine command, so the same scripts work: session_id, transcript_path, cwd, model.id, model.display_name, workspace.current_dir, version, cost.total_cost_usd, and context_window (context_window_size, used_tokens, used_percentage). Larik's own fields are under larik: provider, effort, permission_mode, background_tasks and turn_running. Claude Code's statusLine key is read too. Up to three lines of output are shown, with their ANSI colors. The command runs in the project directory when that state changes, at most every 300 ms, and is stopped after 5 seconds. If it fails, the default footer stays and the error is shown once. It runs a command, so it's honored only from personal settings. For example:

shell
#!/bin/sh
in=$(cat)
branch=$(git branch --show-current 2>/dev/null)
echo "$(echo "$in" | jq -r .model.id) · ${branch:-no git} · $(echo "$in" | jq -r .context_window.used_percentage)% ctx"

Composer

  • @ mentions. Typing @ opens a file picker over the project (it follows .gitignore in a git repository). ↑/↓ chooses, tab or enter inserts, and picking a folder lets you go into it. When you send the prompt, each @path is attached. A file is attached with line numbers and counts as read, so the model can edit it straight away. @path#L10-40 attaches only those lines, @folder/ attaches a listing, and @image.png (also .jpg, .gif, .webp, up to 5 MB) attaches the image for vision models. Quote paths with spaces: @"my notes.md". A mention that isn't a real path stays as text, deny rules for read still apply, and /rewind and the session list show the prompt as you typed it. Mentions also work in larik -p and larik serve prompts.
  • Dropped files. Pasting or dragging a file's absolute path into the terminal inserts it as an @ mention.
  • Pasted images. A terminal can only paste text, so ctrl+v reads an image from the system clipboard instead, such as a screenshot. Larik saves it under the data directory (pastes/, readable only by you, deleted after 7 days) and inserts it as an @ mention, so it is attached like any @image.png. Images over 5 MB, or longer than 2000 pixels, are scaled down and sent as JPEG. On macOS this needs nothing extra; on Linux it uses wl-paste (Wayland) or xclip (X11).
  • ! shell commands. A prompt starting with ! runs the command directly and shows its output. The input border turns yellow while you type one. The command runs in the bash sandbox when one is available and doesn't ask for permission, but bash deny rules still apply. Its output is sent to the model with your next prompt. esc or ctrl+c stops it.
  • History. ↑ on the first line recalls earlier prompts for this project, and ↓ goes back toward your draft. ctrl+r searches them. History is kept in the data directory under history/, up to 500 entries per project.
  • ctrl+g opens the prompt in $VISUAL or $EDITOR (falling back to vi). The text you save becomes the prompt.

Task list. For work with several steps, the model keeps a checklist with the todo_write tool. While a turn runs, the open items are pinned under the conversation and the status line names the item in progress. Each update is also printed in the conversation. /todos shows the current list. It is restored when you resume a session, and it survives compaction.

Command What it does
/model [provider/model] Pick or switch models and reasoning effort (←/→); saves them as defaults for future launches
/connect [provider] Setup wizard: choose a provider, connect it, pick a model, save
/providers Connected or detected providers with status, plus a NVIDIA NIM connect shortcut; enter edit/connect, t test, d remove, a add
/routing [role=provider/model] Setup wizard for cheaper subagent models, fallbacks and a session budget; /routing show lists them
/keys Keyboard shortcuts (also ? on an empty prompt)
/info Session sidebar: tasks, active MCP servers, running language servers and skills used (also F2)
/config [key=value] Settings: theme, verbose output, spinner tips, mouse scrolling, auto-compact, token saver, notifications, response language, undo history, default mode, effort and model. Changes apply now and are saved to ~/.config/larik/config.json; /config token_saver=true enables filtering
/theme [auto|dark|light] Color theme; auto follows the terminal's background. Moving through the list previews each one
/effort [low…max|default] Set and save the default reasoning effort
/mode [default|accept-edits|plan|yolo] Pick and save the default permission mode from a list (1–4), or set it directly
/undo Revert checkpointed file changes from the last turn; bash changes need explicit checkpoint_paths, and MCP side effects are not covered
/compact Summarize the conversation to free context
/clear Fresh context; also reloads AGENTS.md/CLAUDE.md, skills and newly approved MCP servers
/todos The model's task list, in full
/init [focus] Study the project and write AGENTS.md, or improve the AGENTS.md or CLAUDE.md it has; works with -p too. Applies from the next fresh context
/export [file] Save the whole session as Markdown (prompts, replies, tool calls and capped results; no thinking or attached file contents). Default larik-<session>.md here; never overwrites
/copy Copy the last reply, as Markdown, to the clipboard (natively and through the terminal, so it works over SSH)
/vim Switch vim editing of the prompt on or off; see Vim mode
/debug [on|off] Record this session for review: requests as sent, responses, raw HTTP, tools and timing; see Debug mode and traces
/trace Open the recorded trace in the browser: a timeline, every request as sent, and the raw HTTP exchanges
/cost Usage and cost, split by model when more than one was used
/sessions Choose a session from a searchable, scrolling list (✓ current, ⑂ branch)
/resume [id] Open the session picker, or switch by ID (a unique prefix is enough)
/new Start a new session
/fork Branch the conversation into a new session and continue there
/rewind [n] List prompts, or branch off just before prompt n with it back in the input to edit
/mcp MCP server status and tools
/mcp approve <name> Allow a project-defined MCP server to start
/hooks List configured hooks
/hooks approve Allow the project's shared hooks to run
/skills List skills
/agents List subagents
/lsp Language servers and status
/tasks / /tasks stop <id> Background subagent tasks
/worktrees / /worktrees remove <branch|all> Git worktrees kept by isolated subagents
/sandbox Sandbox status
/<skill-name> [args] Run a skill

CLI flags such as --model, --effort, and --mode override saved defaults for that launch without changing the config file.

Branches

A branch is a new session file that starts with a copy of another session's messages and records which session it came from (fork_of). The original is never modified, so you can go back to it with /resume. Branches can only start before a prompt or at the end, never in the middle of a tool call. Each branch reports only its own token spend. /rewind changes only the conversation; use /undo to revert files.

From the command line, larik -c --fork or larik --resume <id> --fork continues in a new branch instead of appending to the old session.

Generated from README.md · section “Keys and commands”. Edit that file to change this page.