Reference
Command line
panto opens the interactive TUI; -p runs one turn and prints the answer. Subcommands handle everything else. Related: Getting started, Configuration, Key bindings, Lua extensions.
Starting a session
-- becomes the first message.panto
panto -- "fix the failing tests"
panto resume -p -- "continue the task"- Quote the prompt: it must be one argument after
--. Anything else is a usage error. - In the TUI, a startup prompt acts like typed input, so
/and!run a slash command or shell line. - Without a startup prompt, the TUI opens with empty input.
- The TUI needs a terminal; non-TTY stdin is an error.
- Subcommands come right after
panto, and actions right after their group. Put flags after that command path, anywhere before--. - Bare sessions, models, auth, and extensions default to list.
- List filters are case-insensitive globs matched anywhere.
*matches any run;?matches one character.
Flags
Also valid on panto resume.
| Flag | Effect |
|---|---|
| -m, --model <provider:alias> | Model for this run. A bare alias works when unique across providers; a qualified name can also name an upstream model directly. |
| -r, --reasoning <level> | Reasoning level (Ctrl+R picker labels). Overrides model-specific reasoning and [defaults] reasoning. Extension protocols get it as their effort value; other providers reject an unoffered level and list valid ones. |
| --theme <name> | Startup theme (case-sensitive Ctrl+Y picker name). Overrides [tui] theme. Extension themes work; unknown names warn and fall back to Panto. |
| -p, --print | One turn, no TUI. See Print mode. |
| --rig <file.rig|dir> | Use a rig. See Rigs. |
| --ignore-rig-prompt | Skip the rig's PROMPT.md. Requires --rig. |
| --no-extensions | Skip the Lua/LuaRocks runtime. Built-ins remain, but shipped tools are extensions, so the agent has none. |
Exit codes
| Code | When |
|---|---|
| 0 | Success, or help (printed to stdout). |
| 1 | Operational failure. |
| 2 | Usage error (usage printed to stderr). |
| other | Nonzero Lua exit code from panto lua. |
panto resume
- No sessions here: error, not a new session.
- An ambiguous id prefix lists the matching ids.
- Takes all the session flags.
- A prompt after
--becomes a new message. The rig's PROMPT.md is never replayed.
Print mode
Use it in scripts and pipes.
panto -p -- "summarize the README"
cat task.md | panto -pA nonempty prompt is required. Choose its source in this order:
| Order | Source |
|---|---|
| 1 | The argument after --; an empty argument blocks fallback and fails. |
| 2 | Piped stdin, if not all whitespace (read only in print mode) |
| 3 | The rig's PROMPT.md: fresh sessions only, unless --ignore-rig-prompt |
- stdout: assistant text only, streamed, each block newline-terminated. No thinking or tool traffic.
- stderr: errors and LuaRocks install progress.
- Exit 0 on success, 1 on a failed turn or missing prompt.
/and!prompts go to the model as text.- Extensions get the same events as in the TUI.
- The session is saved.
- No interactive OAuth login: an unauthenticated provider fails.
Rigs
Use a rig to bundle config, models, extensions, and an optional PROMPT.md.
- Pass
--rigto panto, resume, or serve. - Rigs are trusted input.
| Form | Handling |
|---|---|
ZIP archive (usually .rig) | Extracted privately; removed on exit. |
| Directory | Used in place, unvalidated. Files written there persist. |
| Setting | With --rig |
|---|---|
| config.toml, models.toml, extensions, prompts | From the rig, above the base layer. Built-in tools apply unless the rig denies them. |
| [auth], [providers], [defaults] model | Only these user config settings apply; rig values override them. Project and local layers are ignored. |
| Model aliases | Rig aliases layer over your base and user ones. |
| [server] | Rig only; ambient server settings are ignored. |
| PROMPT.md | Fresh sessions only, as the lowest-priority prompt source. Skipped with --ignore-rig-prompt, by resume, and by serve. |
See Configuration: Rigs.
panto serve
[server] host.[server] port; 1–65535.- Default listener:
127.0.0.1:8080. - No fallback model. Unknown providers and unknown or ambiguous bare aliases return HTTP 400.
- Non-loopback binding needs a nonempty token via
[server] auth_token_env. - Browser Origin requests are rejected.
| Request model | Routing |
|---|---|
| provider:alias provider:model | Name a configured provider and a model alias, or use an upstream model name directly. |
| alias | Must match exactly one configured model alias across providers. |
Auth and limits: Configuration: [server].
panto sessions
- The filter matches id or last user message.
- Columns: id prefix, modified time, message count, model, last user message. Newest first.
- Printed id prefixes are unique across this directory's sessions, including filtered-out rows (8+ characters); pass one to
panto resume. - With no sessions, prints the current directory and its session directory.
panto models
provider:alias, wire model, and reasoning levels.An asterisk marks the effective default model. The filter matches provider:alias.
Without this flag, an unreadable live listing for a multi-endpoint provider makes sync fail and leaves the base file unchanged. See Configuration: models.toml.
panto auth
Show and manage auth sessions.
panto auth runs this.panto extensions
Manage panto-installed git extensions and rocks. Git operations need git on your PATH.
git or rock. The filter matches names. Bare panto extensions runs this.panto update
panto bootstrap
panto lua
panto lua -e 'print(_VERSION)'- Arguments go to the interpreter or script. Only the first argument after
luarecognizes help.
| Runtime entry | Use |
|---|---|
| require("panto") | Load the embedded module. |
| panto.ext | Extension utilities. |
| panto.text | Text-width helpers. |
See Lua extensions.
panto version
--version flag.panto help
-h and --help are aliases.panto help models sync
panto models sync --help
panto models sync -hThe help words are reserved before --; after it they are ordinary data. panto lua is the exception: see above.
Slash commands
In the TUI, a line starting with / runs locally and is not sent to the model. Arguments are the trimmed rest of the line.
| Command | Behavior |
|---|---|
/compact [instructions] | Summarize older turns to free context; extra text guides the summary. Retries once on auth failure; reports when nothing needs compacting. |
/help | List slash commands and key bindings. |
/quit | Exit panto. |
/model [provider:alias] | Pick a model, or switch directly (unique bare alias OK). |
/reasoning [level] | Pick a reasoning level, or set one directly. |
/theme | Pick a theme with live preview. |
/collapse | Toggle all tool output between expanded and collapsed. |
/thinking | Toggle thinking visibility and remember the choice. |
/redraw | Drop render caches and redraw the TUI. |
/new | Fresh session in place; reloads agent and extensions. |
/resume [id] | Pick a session, or switch by id prefix. |
/last | Switch to the previous session; repeat to toggle between the two most recent sessions. |
/proceed | Run the conversation as is, with no new prompt. |
/tree | Browse history and branch from a point. See Key bindings. |
/status | Show model, reasoning, session id, message count, and context usage. |
| Situation | Result |
|---|---|
Leading space before / | Sent to the model as text. |
| Entered during a turn | Typed slash-command lines wait until the turn ends. Only key bindings whose commands are registered for mid-turn dispatch run immediately; a typed slash command never does. |
| Unknown command | Shows [unknown command: <line>]. |
| Print mode | Not run; sent to the model as text. |
Extension commands
- The handler gets the trimmed arguments (or an empty string); a returned string is shown.
- Listed in
/helpand completion when extensions load. - A name collision with any other command stops the session from opening.
- TUI input pauses while a handler awaits async work.
Shell lines
In the TUI, a line starting with ! runs through /bin/sh -c.
| Input | Effect |
|---|---|
| !<command> | Add command and result to the conversation for your next prompt. No turn starts. |
| !!<command> | Same, and start a turn right away if idle. |
| ! or !! | Shows [empty shell command]. |
| ␣!<command> | A leading space sends the text to the model. |
During a turn, shell input is injected at a safe tool boundary if one comes, otherwise after the turn.
| Aspect | Behavior |
|---|---|
| Input/output | No stdin; stdout and stderr merged. |
| Size | Last 50 KiB of output kept; transcript preview capped at 2 KiB. |
| Cleanup | ANSI escapes and control characters stripped (newline and tab kept); invalid UTF-8 replaced. |
| Cancel | Esc or Ctrl+C: TERM, then KILL after 250 ms. |
| Timeout | 5 minutes. |
Environment
Use environment variables to set credentials, paths, and runtime options.
| Variable | Effect |
|---|---|
| OPENAI_API_KEY ANTHROPIC_API_KEY | Used by the default providers. See Authenticate. |
| PANTO_SERVER_TOKEN | Inbound server token, when [server] auth_token_env names it. |
| PANTO_DEBUG | Nonempty and not 0: an agent session captures std.log output in the data home's debug/<session-id>.log. |
| PANTO_SESSION_DIR | Sessions base directory; a per-directory subfolder is still appended. |
| XDG_DATA_HOME | Data home becomes $XDG_DATA_HOME/panto. |
| XDG_CONFIG_HOME | User config root becomes $XDG_CONFIG_HOME/panto. |
| HOME | Fallback when the XDG variables are unset. |
| COLUMNS | panto sessions table width; absent or invalid means 120. |
| VISUAL EDITOR | Ctrl+G editor. Order: [tui] editor, then VISUAL, then EDITOR, then vi. |
| TMPDIR | Ctrl+G temp file and extracted rigs; defaults to /tmp. Rig extraction also uses /tmp when it is empty or relative. |
| TERM TERM_PROGRAM KITTY_WINDOW_ID | Hints for synchronized-output and Kitty-keyboard detection. See Terminal protocol. |
| PANTO_RELEASES_API | Release API base for panto update. |
| PANTO_BOOTSTRAP_NO_RECONCILE | Internal bootstrap guard: when present, skips battery reconciliation. |
| CMAKE_PREFIX_PATH | Temporarily overridden while installing the luv battery, then restored or unset. |
| ${env:NAME} | In auth string fields, expands to variable NAME; unset expands to empty. |