Skip to content
For teams: coding agents on the self-hosted models you're allowed to run - see early access →

CLI flags

polyglot [options] start the interactive TUI
polyglot init interactive first-run setup
polyglot share [id|path] [opts] export a session transcript to a file
polyglot replay [id|path] [opts] re-run a saved session against the current build
polyglot report generate [opts] write a local reliability digest (opt-in, no network call)
polyglot report submit <path> submit a previously-generated digest
polyglot -p "<prompt>" [options] run one prompt, print the answer, exit
echo "<prompt>" | polyglot -p read the prompt from stdin

Runs a short interactive wizard - provider (local or Anthropic), model, and base URL for a local server - and writes the answers to ~/.polyglot/settings.json. Existing keys in that file that the wizard doesn’t ask about are preserved.

It runs automatically the first time you start polyglot in an interactive terminal with no configuration, so a fresh install drops you into setup rather than an error. Run it again any time to re-do the global config. Needs a TTY; in a non-interactive shell it prints the equivalent environment variables instead.

Exports a session as a Markdown (default) or standalone HTML file. Secret-looking values are scrubbed by default. export is an alias.

Terminal window
polyglot share # most recent session -> ./polyglot-session-<date>.md
polyglot share <id> # a specific session by id
polyglot share ./saved.jsonl # a session file someone sent you
polyglot share <id> --format html --out review.html
polyglot share <id> --full --no-redact
Flag Description
--out <path> Output file. Default ./polyglot-session-<date>.<ext>.
--format <md|html> md (default) or a self-contained html page.
--no-redact Keep secret-looking values instead of scrubbing them.
--full Include complete tool-call arguments and result bodies (default: one-line summaries).

Full guide: Sharing sessions.

Re-runs a saved session against the current build and reports where it diverges from what the session recorded - which tool calls resolve differently, which repairs are no longer needed, whether a since-released fix would have helped. Useful for pinning down “my model broke on this and I don’t know if it’s the model or polyglot”, and for turning a real failure into a regression test.

Terminal window
polyglot replay # most recent session, parse-level
polyglot replay <id> # a specific session by id
polyglot replay ./saved.jsonl # a session file, or a scenario capture .json
polyglot replay <id> --execute --seed ./repo-snapshot
polyglot replay <id> --output-format json

By default it’s parse-level: every recorded model completion is re-resolved through today’s tool-call parser and repair pipeline, with no execution and no working directory - fully deterministic. Exit code is 2 if any call that ran before no longer resolves.

Flag Description
--execute Re-run the whole agent loop in a temp working directory instead of just re-resolving tool calls. Reports invariants + a tool-call diff.
--seed <dir> Seed that working directory from <dir> (needed for --execute to be meaningful - read_file calls error otherwise).
--structured / --free-text Force the tool-call transport instead of detecting it per turn.
--save <name> Write the session out as a regression fixture (packages/core/src/testing/regressions/<name>.json when run from the polyglot repo).
--output-format <fmt> text (default) or json.

Aggregates your local audit log into a reliability digest - repair counts by model and by strategy, parse-error rates - and writes it to a Markdown file. Fully local; generate never makes a network call. A separate, explicit submit step is the only way any of it leaves your machine, and only if you run it. Requires audit.enabled: true (there’s nothing to aggregate otherwise).

Terminal window
polyglot report generate # last 7 days, aggregate only
polyglot report generate --days 30
polyglot report generate --include-raw-samples # interactive review screen, see below
polyglot report submit ./polyglot-reliability-digest-2026-01-15.md

By default the digest is aggregate-only: counts, never argument values or file contents - hashArgs’s own default extended to this file. --include-raw-samples additionally flags repairs from the two lowest-confidence strategies (loose_kv, trailing_blob - the ones most likely to be a genuinely new failure mode worth reporting) and opens an interactive screen that auto-redacts each one (the same secret scanner as tool-output scanning) before you see it, then lets you include or exclude each sample individually - nothing is added to the file without your explicit per-sample choice. Needs a real terminal; from a script or CI, pass --i-have-reviewed-and-approve-raw-samples to include every flagged (already-redacted) sample without the per-item screen, or omit --include-raw-samples entirely for the aggregate-only default.

report submit <path> prints the file’s exact contents again and asks for a final confirmation before sending it - a corpus contribution to help improve the tool-call repair heuristics, not telemetry and not your team’s own HQ data (see Data handling if your team runs one).

Flag Description
--days <n> generate: how many days back to aggregate. Default 7.
--include-raw-samples generate: flag low-confidence repairs for interactive review.
--i-have-reviewed-and-approve-raw-samples generate: include all flagged samples without the interactive screen - for non-interactive runs only.
--out <path> generate: output file. Default ./polyglot-reliability-digest-<date>.md.
Flag Description
-p, --print Non-interactive: run a single prompt and exit. See Scripting & CI.
--output-format <fmt> -p mode: text (default) or json.
--allow-all -p mode: run every tool without prompting.
--permission-mode <mode> -p mode: manual, auto, or plan for this run.
--no-persist Ephemeral session - write nothing to ~/.polyglot/. Works in both interactive and -p mode. Can only tighten the persistTranscripts setting, never loosen it.
--resume [id|path] Resume the most recent session, one by id, or a .jsonl session file by path. Same transcript restoration as /resume.
--probe openai-compatible only. Ping the endpoint once on startup to detect its real context window and whether it honors structured output, refreshing ~/.polyglot/capabilities.json. For Ollama, the window comes from its own API (/api/ps, /api/show): the loaded model’s window, else num_ctx. Same as probeCapabilities: true for one run.
-v, --version Print the version and exit.
-h, --help Print help and exit.

In -p mode the session id is written to stderr (session: <id>) and included in the JSON envelope (session_id), so runs can be chained with --resume.