Choose an interface
Cantrip ships four ways to drive the same agent core. Pick the one that matches your terminal, browser, or automation workflow.
Overview
Cantrip has four entry surfaces:
- TUI (
cantrip) — the default full-screen terminal experience. - Web UI (
cantrip --web) — the same live agent loop in a browser tab. - CLI REPL (
cantrip --no-tui) — a minimal interactive command-line session. - Print mode (
cantrip run --print "goal") — one-shot, non-interactive execution for scripts and CI.
If you are unsure, start with the default TUI. It exposes the most agent state at once and is the best fit for day-to-day charm work.
Surface comparison
| Surface | Start with | Best for | Main caveat |
|---|---|---|---|
| TUI | cantrip |
Rich interactive sessions with task pane, file tree, logs, traces, and model status visible together | Requires a full-screen terminal |
| Web UI | cantrip --web |
Browser-based chat, easy scrolling/copying, keeping Cantrip beside docs or dashboards | --improve is not supported in Web mode |
| CLI REPL | cantrip --no-tui |
SSH, tmux, minimal terminals, and interactive sessions where plain text is enough | No TUI panes or function-key screens |
| Print mode | cantrip run --print "goal" |
CI, shell pipelines, scheduled jobs, and one-off unattended goals | No conversation or REPL; exits when the queue drains |
TUI
The default terminal UI is the richest interactive surface. Use it when you want the chat, task list, Juju status, and file tree on screen at once, or when you rely on the function-key screens for logs, traces, the integration graph, transcript browsing, and file detail.
This is the best surface for "build a charm, watch it research, inspect the logs, then confirm the next step" workflows. See TUI screens and shortcuts for the modal screens and hotkeys.
Web UI
The Web UI runs the same live session in a browser tab:
$ cantrip --web
Cantrip Web UI running at http://127.0.0.1:8471
Choose it when a browser is more comfortable than a full-screen terminal: long chat transcripts are easier to scroll, links are easier to follow, and it fits well beside web docs, Grafana, or GitHub in the same window layout.
The important caveat is that --improve is not supported
here. Improvement mode relies on interactive confirmation flows that the
TUI and CLI REPL provide directly, so use one of those surfaces for
existing-charm upgrade work.
CLI REPL
The CLI REPL keeps the session interactive but drops the full-screen UI chrome:
$ cantrip --no-tui
Use it when you are on a remote shell, inside tmux, or in any
terminal where a line-oriented interface is easier than a full TUI. The
REPL still supports normal chat plus slash commands, and it adds
Tab-completion for slash verbs when readline is available.
This is the best fit when you want an interactive session over SSH, need plain-text logs in your terminal history, or prefer to drive the agent with a small command-line footprint.
Print mode
Print mode is deliberately not another interactive surface. It runs one goal to completion, streams progress to stdout, and exits:
$ cantrip run --print "Pack and test this charm"
Use it for CI, shell pipelines, cron jobs, and one-off automation.
With --json it emits NDJSON events, which makes it easy to
pipe into jq, tee, or log collectors.
If you want back-and-forth conversation, do not use print mode; use the TUI, Web UI, or CLI REPL instead. For the full automation workflow, see Run a single goal non-interactively.
Feature-parity caveats
- Only the TUI has the function-key screens, file tree, and modal inspectors described in TUI screens and shortcuts.
- Web UI and print mode are different:
--webis interactive,--printis one-shot, and the two flags cannot be combined. - Web UI does not support
--improve; use the TUI or CLI REPL for that workflow. - Print mode is unattended by default. Pending
confirmation tasks stop the run unless you resolve them first or opt
into
--yolo. - Slash commands are for interactive surfaces. Use the
TUI, Web UI, or CLI REPL when you need chat-native commands like
/memoryand/mcp; the CLI REPL also adds text-first helpers such as/tasksand/status.