Skip to content

CLI Command Reference

Run ptah --help for the live list, and ptah <command> --help for one group. This page is the map.

Every command accepts the global options. Every command emits NDJSON by default — add --human for readable output.

CommandWhat it does
ptah initFirst-run setup. Interactive on a TTY, emits an init.plan in machine mode.
ptah doctorLicense, auth, providers, and the effective route, in one snapshot.
ptah diagnoseAlias for doctor.
ptah analyzeMulti-phase workspace analysis.
ptah setupThe Setup Wizard end to end: analyze, recommend, install pack, generate, apply harness.
ptah wizardLow-level wizard steps: submit-selection, cancel, retry-item, status.

ptah session manages chat sessions.

SubcommandPurpose
startBegin a session. --task submits work, --once exits when the turn ends.
resumeContinue an existing session.
sendSend a message to a running session.
listList sessions.
stopStop a running session.
deleteDelete a session.
renameRename a session.
loadLoad a session’s transcript.
statsToken and cost totals.
validateCheck a session’s integrity.
Terminal window
ptah session start --task "Add a health check endpoint" --once --human

ptah provider manages LLM providers.

SubcommandPurpose
statusConfigured providers. Keys redacted unless --reveal.
set-key / remove-keyStore or clear an API key.
default get / setWhich provider new sessions use.
models listThe live model catalog for a provider.
tier set/get/clearMap opus, sonnet, and haiku onto real model ids.
base-url set/get/clearOverride a provider’s endpoint.
ollama set-endpointPoint at a non-default Ollama daemon.
custom list/add/update/remove/testManage your own Anthropic-compatible endpoints.

ptah auth manages the credential side.

SubcommandPurpose
statusWhich providers are authenticated.
login <provider>Start a login flow.
logout <provider>Log out. Codex requires --force.
test <provider>Issue a live connection test.
use <providerId>Select the active provider.
set-anthropic-route <id>Route Claude traffic through another provider.
Terminal window
ptah provider set-key --provider anthropic --key sk-ant-...
ptah provider default set anthropic
ptah doctor --human

ptah agent handles agent packs and rosters.

SubcommandPurpose
packs listCurated agent packs available.
packs install <id>Install a pack.
listAgents in this workspace.
apply <name>Apply an agent to the workspace.

ptah agent-cli drives external CLI agents.

SubcommandPurpose
detectWhich agent CLIs are installed on this machine.
config get / setRead or write the orchestration config.
models listModels available per CLI.
stopStop a running CLI agent.
resumeResume a CLI session and hand it work.

--cli names a target. The accepted values are the six spawnable CLIs — codex, copilot, cursor, antigravity, opencode, pi — plus ptah-cli. --ptah-cli-id is meaningful only for a ptah-cli target and is refused against a system CLI.

ptah spec manages the .ptah/specs/ tree that backs the Tasks board.

SubcommandPurpose
newCreate a task folder and carrier.
status <id>Move a task to a new status with --to.
show <id>Detail for one task.
listFilter by --status, --type, --label, --estimate.
checkValidate carriers.
doctorReport problems across the whole tree.

ptah execute-spec --id <task-id> hands a stored spec to the Team Leader agent.

Terminal window
ptah spec new --title "Add a health check endpoint" --type FEATURE
ptah spec list --status backlog,in_progress --human
ptah execute-spec --id TASK_2026_104

ptah harness builds and applies agent configurations.

SubcommandPurpose
initScaffold a harness.
statusCurrent harness state.
scanScan the workspace for what a harness should hold.
applyApply a stored preset.
preset save / loadManage reusable presets.
chatAlias for session start --scope harness-skill.
analyze-intentTurn a description into harness intent.
design-agentsDesign an agent roster.
generate-documentGenerate a harness document.
doctorVerify every harness copy against the manifest.
removeDelete every manifest-owned harness copy.

ptah harness doctor is built to work as a CI gate. It exits 1 when the harness is degraded — a detected tool missing entries, a source failure, or a failed write. Add --fix to reconcile instead of only reporting.

Terminal window
ptah harness doctor --json # exits 1 on drift
ptah harness doctor --fix
ptah harness remove --yes

remove requires --yes. There is no prompt, because the CLI’s default mode is machine output on a pipe.

ptah skillsearch, installed, install, remove, popular, recommended, create, plus select and selection for the per-workspace skill choice.

ptah pluginlist, enable, disable, config, skills. Install is enable.

ptah mcpsearch, details, install, uninstall, list, popular.

ptah prompts — Enhanced Prompts: status, enable, disable, regenerate, show, download.

These four groups drive the same subsystems as the desktop app’s Thoth tabs. They share ~/.ptah/ptah.db.

GroupSubcommands
ptah memorylist, search, get, stats, pin, unpin, forget
ptah skill-synthesislist, get, promote, reject, invocations, stats
ptah cronlist, get, create, update, delete, toggle, run-now, runs, next-fire
ptah gatewaystatus, start, stop, set-token, bindings, approve, block, messages, test

ptah gitinfo, worktrees, add-worktree, remove-worktree, stage, unstage, discard, commit, show-file.

ptah workspaceinfo, add, remove, switch.

ptah configget, set, list, reset, plus model-switch, model-get, models list, autopilot get/set, and effort get/set.

ptah settingsexport and import for portable settings bundles. An export written with --out is created with 0o600 permissions.

ptah licensestatus, set, clear.

ptah websearch — web-search provider settings and a connectivity test.

ptah qualityassessment, history, export.

CommandWhat it does
ptah interactPersistent JSON-RPC 2.0 stdio session. Blocks until EOF or SIGINT.
ptah mcp-serveServe Ptah as a stdio MCP server for an external host.
ptah proxyAnthropic-compatible HTTP proxy over the Messages API.
ptah tuiInteractive terminal UI. Needs a real TTY.

See CLI Flags for the ptah interact proxy flags.