Skip to content

Commands ​

ahpc <command> runs one command and exits, without the screen.

sh
ahpc --host ws://127.0.0.1:9187 session list
ahpc prompt claude:/abc123 "what is in this directory"

The host and the token come from the same places as for the screen. See Connect.

Output ​

Output is for reading. --json gives the same answer for a program:

sh
ahpc session list --json | jq -r '.[].resource'

When a command fails, it prints one line saying why. AHPC_DEBUG=1 also prints the stack, for a bug report.

Most commands take a session URI, which ahpc session list prints. Anywhere a <uri> is asked for, an agent-host-session:// link works too. That is the link a host's session tools answer with.

Commands by subject ​

SubjectCommands
Sessionssession list, session new, session show, session history, session export, ...
Turnsprompt, exec, queue, cancel, watch, confirm, answer
Chatschat list, chat new, chat show, chat history, chat rm
Agentsagents, models, commands, completions
Changeschanges, content
Resourcesresource list, resource read, resource write, ...
Terminalsterminal list, terminal new, terminal send, terminal watch, terminal rm
Automationsautomation list, automation run, automation enable, ...
Customizationscustomizations, session customizations, session toggle
Telemetrylogs

Every command and flag is in the CLI reference.

Anything else ​

Command
statusThe connection, and whether a newer ahpc is on npm
configThe config file path and the values in force. Works without a host
authWhat the host protects. See Connect
dispatch <uri> <type>Send one protocol action as is. --field k=v, repeatable. --chat for a chat action
mcp, serveThe tool server
wire <file>Watch a recording
helpEvery command
--versionThe version