Reference
Command line
panto dispatches on its first argument. A handful of subcommands (lua, bootstrap, sessions, models, auth, help) short out before the agent loop; anything else — or nothing — starts the agent in the current directory.
| Command | Does |
|---|---|
| panto | Start a new conversation in the current directory. |
| panto --resume [<id>] | Resume the most recent session, or one by id prefix. |
| panto sessions | List saved sessions for this directory. |
| panto models sync | Fetch models.dev and rebuild the base models.toml. |
| panto auth … | Inspect and manage auth sessions (status / login / logout). |
| panto bootstrap [--force] | Run the luarocks bootstrap and exit. |
| panto lua [args…] | Drop into the embedded Lua interpreter. |
| panto help | Print the usage summary (also --help, -h). |
Starting a session
With no flag, panto opens a fresh session. --resume on its own reattaches the most recent session in this directory; --resume <id> resumes the session whose id begins with <id>. Unknown arguments are tolerated (and ignored with a warning), so passing flags panto doesn’t recognise won’t stop it from starting.
Needs a terminal
The UI runs in raw mode and requires an interactive tty on stdin/stdout. Piping input or redirecting output will refuse with an error rather than half-start.panto sessions
Sessions are grouped per working directory. Each line is the short id (the first eight hex characters of the session’s UUIDv7), the creation time trimmed to the minute, and the message count:
When a directory has no sessions yet, panto prints no sessions for <cwd>. Use any unambiguous id prefix from this list with panto --resume.
panto models
models.toml.sync is the only action. It fetches the models.dev catalog, walks the providers in your merged [providers] config, and for each one cross-checks the catalog against the models that provider actually serves — then writes the result to the base-layer models.toml ($PANTO_HOME/models.toml, else $XDG_DATA_HOME/panto/models.toml). Aliases, wire names, context windows, token caps, and pricing come along for the ride. A provider maps onto a catalog entry via model_catalog_name (falling back to the provider name); providers with no matching entry — or no usable synced models — are skipped.
Because it writes the base layer, your own user/project models.toml entries always layer on top and win. Re-run it whenever you want to refresh the catalog after providers ship new models.
panto auth
Manage the credentials behind your providers. With no action, panto auth defaults to status.
api_key sessions read resolved or unresolved (key/env missing); oauth_device sessions show whether you’re logged in and roughly when the access token expires.api_key session has nothing to log in to.Auth sessions themselves are declared in config under [auth.<name>]. The provider that uses a session names it with auth = "<name>".
panto bootstrap
The bootstrap pipeline prepares the embedded Lua runtime: it stages headers and the base agent tree, materialises the default config, and installs panto’s pinned batteries under $PANTO_HOME. The agent runs the very same pipeline on startup, so you rarely need this by hand — it’s here for first-run setup on a clean machine and for scripted / CI installs. Repeat runs no-op quickly.
$PANTO_HOME/rocks/lua-X.Y.Z/) before reinstalling everything from scratch.panto lua
This is panto’s bundled Lua standalone (the same lua.c the agent embeds), with the luarocks runtime already bootstrapped — so require("luarocks.*") and any rocks installed under $PANTO_HOME resolve exactly as they do inside a session. Arguments after lua are passed straight through to the interpreter. Use it to experiment, or to drive luarocks to install extra rocks for your extensions:
# run a script with panto’s Lua + rocks tree
panto lua my-script.lua
# install an extra rock into panto’s tree via the embedded luarocks
panto lua -e 'arg[0]="luarocks"; require("luarocks.cmd").run_command("install","lpeg")'Slash commands
Inside a session, any line that begins with / is a slash command rather than a prompt — it is handled locally and never sent to the model. The first word (after the slash) is the command name; the trimmed remainder is passed as its arguments.
[compaction].)/compact is the only built-in. Every other slash command comes from a Lua extension via panto.ext.register_command — see Lua extensions → register_command. An unrecognised command reports an error instead of reaching the model.
Environment
panto reads a few environment variables — for credentials and for locating its files. Configuration values can also pull from the environment via ${env:VAR} substitution (see Configuration).
| Variable | Effect |
|---|---|
| ANTHROPIC_API_KEY | Consumed by the default Anthropic provider. |
| OPENAI_API_KEY | Consumed by the default OpenAI provider. |
| PANTO_HOME | Override the runtime / rocks-tree location. Also where the base config.toml and agent tree are staged. |
| PANTO_SESSION_DIR | Override the base sessions directory. Defaults to $XDG_DATA_HOME/panto/sessions (or ~/.local/share/panto/sessions). |
| XDG_CONFIG_HOME | Locates the user config: $XDG_CONFIG_HOME/panto/ (else ~/.config/panto/). |
| XDG_DATA_HOME | Locates the base config + data: $XDG_DATA_HOME/panto/ (else ~/.local/share/panto/). |