Getting Started: CLI vs. Web Harness
Kompile gives you two first-class ways to drive the exact same AI coding harness: directly in your terminal (kompile chat) or in a multi-project browser workspace (kompile chat --web).
Both ship inside the default slim cli-harness installation (no Java or GPU drivers required) and share the exact same engine, credentials, transcripts, persistent memory, Enforcer rules, Judge checks, and subagent policies. You never lock yourself into one — you can start a session in the browser and resume it in the terminal (or vice versa) at any time.
Side-by-side comparison
| Dimension | CLI Harness (kompile chat) | Web Harness (kompile chat --web) |
|---|---|---|
| Launch command | kompile chat | kompile chat --web --open-browser |
| Best for | Terminal-native workflows, SSH/tmux, vim/neovim side-by-side, scripts & CI pipelines, direct native passthrough TUIs | Managing multiple repos/chats in parallel, visual diffs/insights/disk auditing, zero-config browser onboarding, LAN/tablet/mobile monitoring |
| Multi-project concurrency | One repo per terminal window (batch-recover all windows with kompile resume-all) | Up to 8 concurrent chat panes across multiple projects (4 concurrent CLI workers by default, configurable up to 8) |
| Provider setup | kompile auth login <provider> or kompile chat --setup | Zero-config launch — configure providers, named accounts, and failover ladders in /settings |
| Live controls | Ctrl+B backgrounding, queued follow-ups, /processes, Escape stop | Same controls via buttons & shortcuts, plus 2,000-line log viewer, Cancel wake-up, per-child composers, and live SSE timeline Follow |
| Disconnect & reload behavior | Runs in your terminal/tmux session | Browser reload or laptop/phone sleep detaches only the UI; bounded SSE replay reconnects automatically without duplicating prompts |
| Native vendor CLIs | Full native TUI passthrough (kompile passthrough --agent claude|codex|agy|opencode) or managed passthrough | Managed web chat, native external session browser (/native/open), plus an embedded interactive PTY terminal inside /chat |
| Automation / CI | First-class (--prompt "..." --output-format stream-json) | Interactive UI (use CLI for headless automation) |
| Observability & disk tools | /cost, /usage, /stats, /gc, /test-milestones, /progress-reports | Dedicated tabs: /processes, /insights, /storage, and /sources |
Path A: Start in the terminal (CLI Harness)
Choose the CLI when you live in a terminal, work over SSH/tmux, want direct passthrough to Claude Code / Codex / Antigravity / OpenCode, or run headless jobs in scripts.
1. Authenticate a provider
# Pick any provider (examples)
kompile auth login openai --oauth # ChatGPT / Codex subscription
kompile auth login anthropic --oauth # Claude setup-token
kompile auth login agy # Antigravity (Google login)
kompile auth login github-copilot # GitHub Copilot device OAuth
kompile auth login openrouter # OpenRouter API key(See Quickstarts by Audience for every vendor's exact login flags and model routing.)
2. Start chatting in your repository
cd /path/to/your/repo
# Interactive first-time picker (provider + live model discovery)
kompile chat --setup
# Standard Kompile agentic chat
kompile chat
# Or wrap an existing coding CLI with Kompile MCP tools + guardrails
kompile chat --mode passthrough --agent claude
kompile chat --mode passthrough --agent codex
# Or run a one-shot headless turn for CI / scripts
kompile chat --prompt "Audit src/auth for race conditions" --output-format stream-json3. Essential terminal shortcuts & commands
Ctrl+B— move a running blocking subagent to the background so you can keep working./resumeorkompile resume— browse and resume past sessions across all 11 external CLI/IDE adapters.kompile resume-all— restore all recently active terminal chat windows after a reboot or crash./subagent-config&/workflow— pin economical worker models, ban expensive frontier models from subagents, and build multi-model teams.
Path B: Start in the browser (Web Harness)
Choose the Web Harness when you want a multi-project workspace, visual activity/log inspection, clickable failover and storage editors, or LAN access from another machine or tablet — with zero pre-configuration required.
1. Launch the Web Harness
cd /path/to/your/repo
# Default: LAN-accessible multi-project workspace on :8081
kompile chat --web --open-browser
# Pick a specific port (or 0 for automatic)
kompile chat --web --web-port 9081
# Single-project view only (no multi-project sidebar)
kompile chat --web --single-chatkompile chat --web starts immediately even before you have logged into a provider and prints the local/LAN URL.
2. Configure providers & add projects in the browser
- Open
/settingsto connect provider API keys, switch named accounts, and configure/subagent-configor/model failoverladders (draft editors validate routes atomically and never echo secrets). - Your launch folder is registered automatically. Click Add Project in the sidebar to register additional absolute repository paths on the host (persisted in
~/.kompile/chat-workspace.json). - Open up to 8 independent chat panes — switching tabs keeps background chats streaming in parallel.
3. Explore the six Web Harness tabs
| Tab | What you get |
|---|---|
/chat | Multi-project workspace, / slash-command palette, live streaming controls (Ctrl+B, queued Enter follow-ups, Escape stop), native external session browser, and an embedded PTY terminal |
/processes | Live tasks, subagents (with per-child follow-up/cancel), running & recent commands, 2,000-line log viewer, Cancel wake-up monitors, and live SSE timeline Follow |
/sources | External source discovery/sync, kompile sync peer management & artifact transfers, and local model status |
/insights | Cross-session judge verdicts, tool calls, project-scoped /test-milestones, and headless /cost queries |
/storage | Visual disk breakdown of ~/.kompile and your project, kompile gc cleanup, session pin/restore, and retention policies |
/settings | Provider authentication, account switching, failover ladders, subagent caps, and saved child conversation resume |
TIP
Resilient to reloads & sleep: Closing a tab or putting your laptop/phone to sleep only detaches the browser socket — the CLI worker keeps running. Reopening the page automatically replays missed SSE events from the bounded replay buffer (HarnessReplayBuffer) and reattaches live.
Using CLI and Web together
Because the Web Harness drives the real kompile CLI child process under the hood, both surfaces share one source of truth:
- Shared transcripts (
~/.kompile/conversations/): Start a refactor in the browser, close the tab, and continue it in your terminal withkompile chat --continueorkompile resume— or browse your terminal, Claude Code, Codex, Antigravity, and OpenCode sessions directly from the Web Workspace sidebar. - Shared configuration & memory: Provider accounts,
subagent-config.json,SessionModelLadderfailover rungs, and persistentmemoryentries stay identical across CLI and Web. - Upgrade to full RAG & Knowledge Graphs anytime: When you also want indexed document search, fact sheets, and interactive graph exploration, install the local runtime (
kompile install local-runtime) or open a full project (kompile project open .) — the same browser UI lights up the Project, Fact Sheets, and Graph tabs automatically.
Next steps
- Step-by-step agent & remote sign-in walkthroughs: See Walkthroughs: Starting an Agent & Signing In to a Remote Agent for full CLI and Web Harness flows (including remote SSH
--manual/ device-code OAuth and the Web Provider Accounts & Sign-In dialog). - How a session & turn work: See How a Kompile Session Works for what you see from
kompile chat/kompile resumethrough how a standard agent turn pulls memories, reminders, tools, and verification. - Architecture deep dives: Read The CLI Harness (TUI, Navigation & Configuration) for the terminal UI outline, menu navigation,
/uidisplay presets, andkompile configure— or The Web Harness forKompileCliHarnessClient,--web-controls -,HarnessReplayBuffer,pty4jterminals, and CLI↔Web parity. - Pick your provider: Jump to Quickstarts by Audience for Codex, Claude, Antigravity (
agy), GitHub Copilot, OpenCode, OpenRouter, Fireworks AI, Together AI, or Local Models. - Move sessions across tools: See Import & Resume for all 11 external CLI/IDE adapters and cross-agent handoff.
- Understand the harness: Read Why Kompile Is Opinionated.