Reference
Every switch, command, key, tool and setting. The guide explains when to reach for them.
- Launch switches
- Commands
- Keys
- Command palette
- Tools
- config.json
- Headless output
- Exit codes
- Environment and files
- Telemetry
- Debugging the UI
Launch switches
paimon [switches] starts the UI, or runs one prompt with -p.
| switch | effect |
|---|---|
-r, --resume [ID] | Resume a session by id prefix; with no id, pick one from a list. |
-c, --continue | Resume the most recent session in this directory. |
--model PROVIDER:NAME | The model for this run only. The configured one is untouched. |
--thinking LEVEL | Thinking effort for this run only: off, minimal, low, medium, high, xhigh or max. |
--mode MODE | Permission mode: read, auto or yolo (the default). |
--strict | Hold every shell command, the clearly read-only ones included. |
--skill PATH | Load skills from this SKILL.md or directory too. Repeatable. |
--no-skills | Skip the default skill locations. --skill paths still load. |
--no-web-search | Do not give the model the web_search tool. |
--no-code-mode | Do not give the model the run_code tool. |
--web | Serve the UI in a browser instead of the terminal. |
--port N | Port for --web. Default 8000. |
--textual-debug | Give the agent tools to inspect and change its own live UI. See below. |
With -p only
| switch | effect |
|---|---|
-p, --print [PROMPT] | Run one prompt without the UI and exit. With no value the prompt is read from stdin; with both, the piped text is given to the model along with the prompt. |
--output-format FORMAT | text (the default), json for one event per line, or result for the final result alone. |
--timeout SECS | Give up after this many seconds, with exit code 124. |
--max-tool-calls N | Stop a turn before its N+1th tool call, with exit code 4. Each agent it starts gets the same budget. |
--append-system-prompt TEXT | Add text, such as a role, to the end of a new session's system prompt. It is saved with the session, so it cannot be combined with -c or -r. |
Without -p, a stdin that is not a terminal is also read as a prompt:
echo "fix the build" | paimon runs headless.
Commands
| command | what it does |
|---|---|
paimon status |
Show login state and configuration. Exits 0 when the configured model can
be built with credentials that resolve, 1 otherwise, without a network
request. --json prints one JSON object. |
paimon login [PROVIDER] |
Log in to a provider without the UI. --api-key-env VAR or
--api-key-stdin supplies the key, --api-base URL
overrides the endpoint, and --model PROVIDER:NAME logs in to that
model's provider and makes it the default. --force sets an
unreadable config aside and starts fresh. --accept-risk skips the
confirmation for antigravity. |
paimon model PROVIDER:NAME |
Set the default model. Credentials are not touched. |
paimon sessions |
List the resumable sessions in this directory, newest first.
--json prints a JSON array. |
paimon log [ID] |
Show a session's event log, one line per event, each prefixed with its seq.
--turns N, --tail N and --after SEQ
narrow it, --full shows whole contents, and --json
prints the raw records. |
paimon install-skill |
Install the skill that teaches another coding agent to drive Paimon.
--target claude (the default) or codex, or
--dest DIR for anywhere else. |
Keys
| key | action |
|---|---|
Enter | Send the prompt. |
Shift+Enter, Ctrl+J | New line in the prompt. |
Up, Down | On the first or last line of the prompt, walk through earlier prompts. |
Ctrl+V | Paste, including an image from the clipboard. |
/ | In an empty prompt, open the command palette. |
!, !! | At the start of a line, run it in a shell. !! does not show the output to the model. |
Esc | Interrupt the current turn. |
Shift+Tab | Cycle the permission mode. |
Ctrl+P | Open the command palette. |
Ctrl+T | Open another session in a new pane. Up to eight panes. |
Ctrl+W | Close the current pane. |
Ctrl+PageUp, Ctrl+PageDown | Previous and next pane. |
Ctrl+G | Go to a pane that is waiting on you. |
Ctrl+L | Return focus to the pane's input or pending question. |
Ctrl+C | Quit. |
Command palette
On top of Textual's own entries, such as Change theme: Log in to a provider, Switch model, Thinking effort, Toggle thinking display, Toggle idle recap, Compact context, New session, Fork session, Resume session, New pane, Close pane, and one entry per skill.
Tools
What the model can call. The last column says what holds a call back outside
yolo mode, where nothing does.
| tool | what it does | held when |
|---|---|---|
read_file | Read a text file with line numbers, or look at an image. | outside the working directory |
glob | Find files by pattern, newest first. | outside the working directory |
grep | Search file contents for a regular expression. | outside the working directory |
write_file | Create or overwrite a file. | always in read; in auto outside the working directory or inside .git |
edit_file | Replace one exact substring in a file. | as write_file |
shell | Run a command and return its output. | unless the command is recognized as read-only |
run_background | Start a long-running command in a tab of its own. | always |
read_job | Read what a background command has printed. | never |
stop_job | Stop an agent or a background command. | never |
spawn_agent | Start another agent working in parallel. Up to four at a time. | never |
list_models | List the models an agent can be started on. | never |
web_search | Search the web and return titles, URLs and snippets. | never |
run_code | Run a sandboxed Python script that calls the other tools. | each call it makes is held as above |
write_todos | Keep a task list for multi-step work. | never |
ask_user | Ask the user one question and wait. | never |
search_history | Search the session's full log, including what compaction summarized away. | never |
read_history | Read records from that log. | never |
A held call is refused in read mode and put to the reviewer in
auto mode. Under -p the model has no ask_user
and no background commands. A subagent has neither, and cannot start agents of its
own.
On Windows commands run in Git Bash, found through git on your PATH or
the standard install locations. Without Git for Windows they run in cmd.exe, and then
none are recognized as read-only.
config.json
Kept in ~/.config/paimon/config.json, written by the first launch, by
paimon login and by choices made in the app. Settings marked “by hand”
are only ever read.
| key | default | meaning |
|---|---|---|
model | none | The model to run on, as provider:name. |
providers | {} | Credentials by provider, each with api_base and api_key. A provider's key is only ever sent to that provider. |
thinking | null | Thinking effort, or null to leave it to the model. A level a provider lacks becomes the nearest one it has. |
show_reasoning | false | Show the model's reasoning as it streams, and print it under -p. |
theme | paimon | The UI theme. |
safe_commands | true | Let clearly read-only commands run in read and auto modes. |
review_model | null | The model auto mode reviews with, as provider:name. By default current models review with their provider's fast tier and the rest with themselves. By hand. |
code_mode | true | Give the model the run_code tool. |
skills | [] | More skill files or directories. By hand. |
recap_enabled | true | Offer a recap when you come back to an idle pane. |
recap_idle_seconds | 300 | How long a pane sits idle before the recap. By hand. |
compaction.enabled | true | Summarize the conversation in place near the context limit. |
compaction.reserve_tokens | 16384 | Compact once fewer than this many tokens of the window are left. |
compaction.keep_recent_tokens | 20000 | About how much of the recent conversation is kept as it is. |
compaction.context_window | null | The window to assume for a model Paimon does not know. |
A setting of the wrong type stops Paimon with a message naming it. The file is never rewritten around a mistake.
Headless output
With --output-format text the answer goes to stdout, and tool calls,
refusals and notices go to stderr.
--output-format result prints exactly one JSON object when the run ends:
{"type": "result", "subtype": "success", "is_error": false,
"session_id": "7fd2c1e8…", "text": "the final answer",
"denied": 0, "error": null, "log_end": 42}
subtypeissuccess,error,interrupted,timeoutormax_tool_calls.deniedcounts the tool calls the mode or the reviewer refused. Above zero usually means the run needs a more permissive mode.log_endis a cursor into the session log:paimon log ID --after LOG_ENDlater shows only what a follow-up run added.
--output-format json prints one object per line as the run goes. The
first is always init and the last is always the same
result, even when the run fails before the model is reached.
| type | fields |
|---|---|
init | session_id, model, mode, cwd |
text_delta, reasoning_delta | text |
tool_use | id, name, args |
tool_result | id, name, result, denied, status (success, failed, denied or interrupted), detail (such as exit 2); a run_code result adds calls |
todos | todos |
job | text |
compacted | tokens_before, tokens_after |
compaction_failed | error |
retry | attempt, max_attempts, delay, error |
images_rejected | model |
result | as above |
Consumers should ignore types and fields they do not know. Existing fields are only added to, never removed or redefined.
Exit codes
| code | meaning |
|---|---|
0 | Success. |
1 | Error. |
2 | Bad usage. |
4 | Hit --max-tool-calls. |
124 | Hit --timeout. |
130 | Interrupted. |
The session is saved in every case, and can be resumed to let it finish.
Environment and files
| variable | effect |
|---|---|
PAIMON_CONFIG_HOME | Where config.json and the global skills live. Default ~/.config/paimon. |
PAIMON_DATA_HOME | Where sessions live. Default $XDG_DATA_HOME/paimon, or ~/.local/share/paimon. |
PAIMON_NO_TELEMETRY, DO_NOT_TRACK | Set either to turn telemetry off. |
NO_COLOR | No colour in -p text output. |
TEXTUAL_ANIMATIONS=none | Hold the stars and the spinner still. |
A provider with no stored key falls back to its own environment variable, such as
ANTHROPIC_API_KEY or KILO_API_KEY. Sessions are JSONL files
under sessions/ in the data directory.
Telemetry
Each launch sends one anonymous event to Google Analytics: a random install id, the
launch mode, the version, the OS name, the language from LC_ALL or
LANG, whether this is the first launch, and the configured provider and
model name. Nothing from your sessions, prompts, files or credentials is included.
Debugging the UI
paimon --textual-debug, which also works with --web, is for
when Paimon needs to diagnose its own layout or styling. The model then gets five
more tools, scoped to the live UI process:
textual_inspectqueries the DOM by CSS selector and reports geometry, pseudo-classes, focus and computed CSS.textual_evalandtextual_execrun Python in the UI process, including private APIs, persistent variables and top-levelawait.textual_apply_csslayers on CSS and relayouts immediately.textual_screenshotexports the current render to SVG.
textual_exec is unrestricted Python inside the process and can change any
Textual or Paimon state. Use this option only with prompts you trust. Live changes
last until exit; once a fix is confirmed, ask Paimon to edit the source.