From b350e4dee2412e450b3844061f5c1bc2ec995923 Mon Sep 17 00:00:00 2001 From: t Date: Mon, 6 Jul 2026 15:00:37 -0600 Subject: catch up with latest panto cli developments --- index.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index f8ef07f..526e2e2 100644 --- a/index.html +++ b/index.html @@ -20,17 +20,15 @@
Source
- +
-

Getting started

panto

terminal agentziglua

panto is a small terminal coding agent built on libpanto. A minimal system prompt, a tool set you can swap or switch off, native binaries from Zig, extensions in Lua. This is the operator's reference — flags, configuration, key bindings, and the Lua surface.

Overview

You run panto inside a project directory and talk to a model in a terminal UI. The agent reads and edits files and runs commands through tools — and even the standard tools (read, write, edit, bash) ship as extensions, so any of them can be denied individually.

There are no permission prompts and no hidden machinery: providers are declared in a TOML file, the model is chosen by a provider:alias reference, and anything beyond the core is added as a Lua extension. The rest of these pages document each of those surfaces in turn.

Install

panto builds from source with Zig. Clone the repository and run the Zig build; the result is a single native binary.

shellbash
git clone https://code.tjp.lol/pantograph.git
+

Getting started

panto

terminal agentziglua

panto is a terminal coding agent with a small Zig core and a Lua extension surface. Run it interactively in a project directory, or use -p/--print for one-shot non-interactive turns. These pages cover the current CLI, configuration layers, key bindings, and extension API.

Overview

The default entry point is just panto: it opens the TUI in the current directory, selects a model from your layered config, and lets the agent work through tools. The shipped file tools are themselves Lua extensions, so the same loader that powers your own add-ons also powers std.read, std.write, std.edit, and std.shell.

The first argument also dispatches subcommands. panto sessions, panto auth, panto models sync, panto bootstrap, panto update, and panto lua all short-circuit before the chat loop; panto -p runs a single non-interactive turn and exits.

Install

panto builds from source with Zig. Clone the repository and build the binary:

shellbash
git clone https://code.tjp.lol/pantograph.git
 cd pantograph
-zig build            # native binary at zig-out/bin/panto

On first use, run the one-time bootstrap. It stages the embedded Lua runtime and installs panto’s pinned luarocks batteries (just luv, the libuv event loop) under $PANTO_HOME:

shellbash
panto bootstrap        # prepare the rocks tree (idempotent)

Where things live

By default panto keeps its runtime and rocks tree in $PANTO_HOME (falling back to $XDG_DATA_HOME/panto), and reads configuration from a layered set of TOML files. See Configuration → Files & layers.

First run

Run panto with no arguments inside a project to start a fresh conversation. The agent loads your config, selects the default model, and opens the terminal UI. Type a message and press Enter to send it.

panto · first run
$ export ANTHROPIC_API_KEY=sk-ant-…
$ cd ~/code/ledger && panto
 
panto v0.1.0
cwd: ~/code/ledger
 
add a --json flag to the stats command
 
I’ll wire a --json branch into the stats command. Let me read it first.
read src/stats.zig
pub fn run(args: Args) !void { - const summary = try compute(args); - try printHuman(summary); -}
edit src/stats.zig (1 edit)
- try printHuman(summary); -+ if (args.json) try printJson(summary) else try printHuman(summary);
 
Done — stats --json now prints a machine-readable summary.
 
anthropic:sonnet   18.4k ctx   2.1k tok   $0.03

panto’s UI needs an interactive terminal (a tty). Sessions are saved per directory, so you can pick up where you left off with panto --resume. The full command surface — resuming, listing sessions, auth, the embedded Lua interpreter — is on the Command line page, and every key is listed under Key bindings.

Authenticate

A provider draws its credential from a named auth session. There are two kinds. The simplest is an API key from the environment — the default OpenAI and Anthropic providers read OPENAI_API_KEY and ANTHROPIC_API_KEY directly:

shellbash
export ANTHROPIC_API_KEY=sk-ant-…
-panto                  # the anthropic provider is now live

The second is an OAuth device flow, for providers that authenticate interactively. Log in once and panto stores (and refreshes) the token for you:

shellbash
panto auth login github_copilot
-panto auth status      # show every session and its login state

If a provider seems missing

An api_key session whose environment variable is empty resolves to nothing, and any provider using it is silently dropped (export the key to bring it back). OAuth providers always survive and resolve at turn time. Auth sessions are declared under [auth] in config.
+zig build # native binary at zig-out/bin/panto

The first real run bootstraps panto's bundled Lua runtime automatically, so most users can go straight to panto. The explicit bootstrap command is still useful for CI, fresh-machine setup, or forcing the rocks tree to exist before you start a session:

shellbash
panto bootstrap
+# or: panto bootstrap --force

Where things live

The data home is $XDG_DATA_HOME/panto (or ~/.local/share/panto when XDG_DATA_HOME is unset). User config lives under $XDG_CONFIG_HOME/panto (or ~/.config/panto). Project-local overrides live in ./.panto/.

First run

Start an interactive session with no arguments:

shellbash
cd ~/code/ledger
+panto

Useful first-day flags:

panto --resume
Reattach the most recent conversation in this directory. --resume <id> resumes a specific session by id prefix; -c / --continue is an alias for bare --resume.
panto -p "prompt"
Run one turn non-interactively, print only the assistant text, and exit. The prompt may also come from piped stdin.
panto -m openai:gpt --effort high
Override the model and reasoning level for just this run.
panto --no-extensions
Skip the Lua runtime entirely. This disables shipped tools too, but it is a useful escape hatch when an extension breaks startup.

The TUI requires an interactive terminal. If you only want a single answer in a script or CI job, use -p instead of trying to pipe the full-screen UI.

Authenticate

Providers draw credentials from named auth sessions in config.toml. API-key sessions usually resolve from the environment:

shellbash
export ANTHROPIC_API_KEY=sk-ant-…
+panto auth status

OAuth device sessions are logged in explicitly once, then cached on disk:

shellbash
panto auth login github_copilot
+panto auth status

If a provider seems missing

An api_key auth session that resolves to the empty string leaves its provider unavailable, so exporting the missing environment variable is often enough to make it appear. OAuth providers stay configured and resolve at use time.
-- cgit v1.3