PITWALL

Reference

CLI reference

pitwall sets up and manages Pitwall from a terminal: agents, sessions, queued prompts, spaces, projects, rules, review and settings. It does what the UI does, so you can script Pitwall or let an agent drive it. This page is generated from the CLI's own definitions; pitwall <command> --help shows the same.

Install

Settings → Install command-line tool links pitwall into ~/.local/bin (or /usr/local/bin). Inside a Pitwall terminal it finds the app on its own.

How it works

  • It talks to the running app over a local socket: $PITWALL_CLI_SOCKET when set, else ~/.pitwall/run/pitwalld.sock (--socket overrides both). settings also works while Pitwall is closed: it edits ~/.pitwall/ui.json (safe settings only). peers always works on ~/.pitwall/peers/ directly. extension works on the folder you name, offline. catalog setup creates signing keys in an explicit new directory, offline.
  • Output is JSON on stdout, the call's result, so scripts and agents can parse it (jq works well). --human (-H) prints readable text instead.
  • Errors are {"error":{"code":"…","message":"…"}} on stderr.
  • Agents and spaces are named by id or by name.
  • Risky requests wait for you. Stopping, restarting or removing an agent, anything that changes another machine (starting or creating a session on an agw VM), writing rules into a main checkout, importing rules from a file or a git repository, deleting a rule set, writing rules into a project's .rulesync/, and settings that change something outside Pitwall open an approval dialog in Pitwall when anyone but you asks; the command waits for your answer. Pitwall identifies the caller from the connecting process, so an agent can't approve its own request.

Exit status

StatusMeaning
0Done.
1An error (see the JSON on stderr), including wait timing out (code timeout).
2Bad arguments: unknown command or option, a missing value, or a value the server rejects (bad_params).
3Not approved: you denied the request in Pitwall, or didn't answer.

Recipes

Start an agent in a project and give it work:

id=$(pitwall agent new --kind claude --project ~/code/api --name api --prompt "run the tests and fix what fails" | jq -r .id)
pitwall wait "$id" --for done,blocked --fresh
pitwall review changes "$id" --human

Run it on another login (Settings → Accounts):

pitwall agent new --kind codex --project ~/code/api --account work

Send the same prompt to every idle agent, then see who needs you:

pitwall queue add --status idle "pull main and rebase"
pitwall agent list --human

Arrange a space in its own window:

pitwall space create Review
pitwall agent move api --space Review
pitwall space move Review --to-window new

Change a setting, or read them all:

pitwall settings set appearance.theme dark
pitwall settings list --human

Global options

These work with every command.

Option
--socket <PATH>Pitwall's socket (default: $PITWALL_CLI_SOCKET, else ~/.pitwall/run/pitwalld.sock).
-H, --humanReadable text instead of JSON.
--jsonJSON output (the default; for scripts and agents that want to say so).

Commands

  • agent: Pitwall's agents and terminals
  • machine: Where agents can run (this Mac, agw VMs, …)
  • session: Sessions on other machines (agw) that can be added to Pitwall
  • settings: Pitwall's settings (theme, look, density, hooks, …): list, get, set, reset. Applied live when Pitwall runs; otherwise ui.json is edited (safe settings only)
  • queue: Prompts queued for agents (sent when they are free)
  • space: Spaces (tabs of agents) and the windows they are in
  • project: Pitwall's project list (folders in the sidebar), and what each project's agents launch with (its profile and picks)
  • account: Accounts: tools' logins, browser accounts, git identities and extension connections (made in Pitwall's Settings)
  • profile: Profiles: named bundles of accounts ("Work", "Personal") a project picks: a tool account each, a git identity, a browser account and a connection per extension
  • rules: Rule sets (rulesync) for agents and projects
  • review: What agents changed (read-only)
  • wait: Wait until an agent is idle, blocked or done (for coordinating agents)
  • peers: Your other machines' Pitwalls over Tailscale (read-only): see their agents here. Only machines of your own Tailscale user; works on Pitwall's data folder directly, without the app
  • open: Show files or a folder to the user in Pitwall's file viewer (it only displays; the user may edit and save there): files as tabs (path:line[:col] opens at a line), a folder or a whole worktree as a tree with each file's git status. Opens in a window of its own (beside the agent's terminal if you docked it there), without bringing Pitwall forward over another app. Off with agents.showFiles. With --web, a web page instead: in the agent's page tile next to its terminal (or a window of its own), http and https only; it only shows the page to the user. Off with agents.showWeb. With --settings, Pitwall's Settings at a page instead, in the Settings tile (next to the agent's terminal unless it is open already); it only shows Settings to the user. Off with agents.showSettings. With --device, a device's screen instead (an iOS Simulator, an Android emulator or phone): in a device tile next to the agent's terminal; one still booting is waited for (up to a minute). It only shows the screen to the user. Off with agents.showDevice
  • mcp: Run Pitwall's MCP server on stdin/stdout (its tools show_files, show_folder, show_web, show_settings and show_device do what open does). Pitwall adds it to the agents it starts; any MCP client can run it
  • events: Follow Pitwall as it changes: the agent list, agents that need you (blocked) or finished (done), and how many are blocked. The current list and count come first. Prints one JSON event per line until stopped (or --count)
  • extension: The user's extensions: see how each stands and set one up, each step approved by the user in Pitwall (list, status, log, install, on, setup, service, first-run, set, secret, connection…). For authors, check, test and new work on a folder, offline, without the app (exit status 1 when a check fails); dev builds a tile and loads it into the running app
  • catalog: Set up local signing keys for an extensions catalog, offline