Skip to content

CLI & Keyboard

Kairox is a workspace, a desktop app, and a terminal app. That means three kinds of muscle memory: shell commands that run the workspace, keystrokes that drive the TUI, and keystrokes that drive the GUI. This page is the lookup table.

just recipes

Kairox uses just as the task runner. Install with cargo install just; list everything with just --list.

Quick checks

RecipeWhat it does
just fmt-checkRun all formatters in check mode (cargo fmt --check plus oxfmt --check).
just lintRun Clippy across the workspace, plus oxlint and Stylelint on the GUI sources.
just testcargo test --workspace --all-targets.
just test-guiGUI Vitest suite plus GUI script tests.
just coverageRust source-based coverage gate plus GUI V8 coverage gate.
just checkFormat-check + lint + Rust tests. The full local CI gate.

Formatting

RecipeWhat it does
just fmtAuto-format Rust (cargo fmt) and web sources (oxfmt).

Development

RecipeWhat it does
just tuiRun the TUI app (cargo run -p agent-tui).
just gui-devRun the GUI dev server (Vite hot-reload). Regenerates TS types first.
just tauri-devRun the Tauri desktop app in dev mode (Vite + native window). Regenerates TS types first.
just gui-buildBuild GUI web assets.
just tauri-buildBuild the Tauri desktop binary plus platform installers.
just tauri-build-fastBuild the Tauri desktop binary without bundling installers (faster local iteration).
just gui-sizeBuild the GUI and print the largest generated files.
just rust-sizePrint release-binary sizes for agent-tui and agent-gui-tauri (must be built first).

Release

RecipeWhat it does
just release <version> ...Run scripts/release.sh for the named version.
just release-dry <version>Preview what release.sh would do without executing anything.
just changelog <tag>Run git cliff --tag <tag> and format the output.
just bump-version <version>Sync version across Cargo.toml, Cargo.lock, root package.json, apps/agent-gui/package.json, and tauri.conf.json.

Worktree

RecipeWhat it does
just worktree <name>Create a sibling git worktree under .worktrees/<sanitized-name> branched from main, then bun install inside it.

Type sync and codegen

RecipeWhat it does
just gen-typesRegenerate apps/agent-gui/src/generated/{commands,events}.ts from Tauri commands and EventPayload via Specta.
just check-typesRun just gen-types and fail if the generated files differ from what is checked in.

Integration and end-to-end tests

RecipeWhat it does
just test-e2ePlaywright E2E tests for the GUI frontend (against the Tauri IPC mock).
just test-e2e-headedSame as test-e2e in headed (visible browser) mode for debugging.
just test-e2e-uiSame as test-e2e in the Playwright UI runner.
just test-tuiDeterministic TUI test layers — no real terminal required.
just test-tui-ptyReal-PTY TUI smoke test (the one CI runs). Builds the binary first.
just test-fullstackFull-stack runtime integration tests.
just test-alltest + test-tui + test-fullstack + test-gui.
just test-mcpAll MCP-related tests across agent-mcp, agent-tools, agent-config, and agent-runtime.
just test-liveGitHub Models live smoke test (self-skips without GITHUB_TOKEN).
just test-pilotStart the Tauri dev app with the pilot feature and run the tauri-pilot E2E scenarios. Requires tauri-pilot-cli; use xvfb-run -a on Linux.
just test-pilot-livetest-pilot with KAIROX_PILOT_LIVE_MODELS=1 — runs against real GitHub Models. Requires GITHUB_TOKEN.

bun scripts

The root package.json exposes Bun-runnable scripts. Most of them are wrapped by just; reach for them directly when you only want one stage.

ScriptWhat it does
bun run formatRun all formatters in write mode.
bun run format:checkRun all formatters in check mode (no writes).
bun run format:rustJust cargo fmt --all.
bun run format:webJust oxfmt --write ..
bun run lintWeb lint + Rust lint + the TUI/GUI parity-matrix check.
bun run lint:weboxlint plus Stylelint.
bun run lint:rustClippy with -D warnings across the workspace.
bun run lint:parity-matrixCustom script that ensures TUI/GUI feature parity is tracked.
bun run lint:styleStylelint only.
bun run lint:oxlintoxlint only.
bun run site:devVitePress dev server for the documentation site.
bun run site:buildBuild the VitePress site and run scripts/generate-llms-txt.mjs to emit dist/llms.txt + dist/llms-full.txt.
bun run site:previewPreview the built documentation site.
bun run coverage:rustRust source-based coverage gate (scripts/run-rust-coverage.sh).
bun run coverage:webGUI V8 coverage gate (Vitest).
bun run prepareHusky install hook. Runs automatically after bun install.

Inside the GUI app (apps/agent-gui/package.json), these scripts exist:

Script (run inside apps/agent-gui or via bun --filter agent-gui)What it does
devVite dev server, defaulting to 0.0.0.0:1420.
buildVite production build.
tauri:devTauri dev (Vite + native window).
tauri:buildTauri production build (with installer bundles).
testVitest unit suite.
test:e2ePlaywright E2E with 2 workers.
test:e2e:headed / test:e2e:uiHeaded / UI variants of the Playwright suite.

TUI keymap

The TUI is built on ratatui + crossterm. The resolver in crates/agent-tui/src/keybindings/resolver.rs is the source of truth.

Global

KeyAction
F1Open the help overlay.
TabCycle focus between panels (Chat → Sessions → Trace).
EscEscape the current overlay / cancel the current modal / leave search mode.
Ctrl+CInterrupt the active turn. With no turn in flight, quits the app.
Ctrl+EnterSend the composed input regardless of focus or input mode.
Ctrl+PToggle the command palette.

Alt-modifier toggles (overlays, sidebars, focus)

KeyAction
Alt+1Focus the Chat panel.
Alt+2Focus the Sessions sidebar.
Alt+3Focus the Trace sidebar.
Alt+SToggle the Sessions sidebar.
Alt+TToggle the Trace sidebar.
Alt+EToggle input mode (single-line ↔ multi-line).
Alt+POpen the profile selector.
Alt+CToggle context-details panel.
Alt+NStart a new session.
Alt+QQuit.
Alt+HToggle the Hooks overlay.
Alt+IToggle the Instructions overlay.

Ctrl-modifier overlays

KeyAction
Ctrl+GToggle the Plugins overlay.
Ctrl+LToggle the Model overlay (active model + budgets).
Ctrl+MToggle the MCP overlay (server status).
Ctrl+SToggle the Skills overlay.

Chat panel commands

The TUI chat input supports colon-prefixed commands:

CommandAction
:monitorsList active monitors.
:monitor stop <id>Stop a monitor by its ID.

Chat panel (focused)

KeyAction
EnterIn single-line mode: send. In multi-line mode: newline.
Ctrl+EnterSend the composed input regardless of mode.
Up / DownCycle input history.
Alt+Up/DownSelect prev/next queued message.
Alt+Left/RightMove the selected queued message up/down in the queue.
Alt+EnterSend the selected queued message immediately.
Alt+Delete/BackspaceDelete the selected queued message.
BackspaceErase one character.
DeleteForward delete.

Sessions panel (focused)

KeyAction
EnterSelect the highlighted session.
F2Rename the highlighted session.
AOpen the Archive manager.

Trace panel (focused)

KeyAction
Left / RightCycle trace tabs (or [ / ]).
F5Toggle trace density (compact ↔ detailed).
/Start memory search.
SCycle memory scope (session / user / workspace).
RRetry the selected task.
CCancel the selected task.
YConfirm memory deletion.
DDelete the selected memory.

Permission prompt

When a permission modal is showing:

KeyAction
YApprove this call.
NDeny this call.
DDeny this call and all future identical calls.
EscDeny (same as N).

Policy cycling

KeyAction
A (uppercase)Cycle the active session's permission policy (mode).
B (uppercase)Cycle the sandbox policy.
xOpen the context menu for the focused item.

GUI keyboard shortcuts

The desktop app inherits the standard OS shortcuts for the application chrome (Tauri provides Cmd+Q / Alt+F4, window cycling, etc.). The Kairox-specific shortcuts:

Chat

KeyAction
EnterSend the message (composer focused, no modifier).
Shift+EnterInsert newline in the composer.
j / ArrowDownMove focus to the next stream item in the chat panel.
k / ArrowUpMove focus to the previous stream item.
/Trigger the inline command palette (composer empty).
@Trigger the file-mention palette (composer).

Command and mention palettes

KeyAction
ArrowDown / ArrowUpMove highlight.
EnterSelect the highlighted entry.
EscClose the palette.

Editable labels (session names, etc.)

KeyAction
EnterConfirm the edit.
EscCancel the edit.

Reserved modifier combos

The chat panel ignores keystrokes that include any modifier (Ctrl, Cmd, Alt) when not editing — these are reserved for host shortcuts the app may install in the future (Cmd+K palette, Ctrl+J line break, Alt+G workspace nav). If you find a missing shortcut, prefer adding it through a global handler rather than overloading the chat panel.

Where the source of truth lives

If a binding in this page disagrees with the source, the source wins. File an issue so this page can be corrected.

Released under the Apache-2.0 License.