Appearance
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.
Session URIs and links
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
| Subject | Commands |
|---|---|
| Sessions | session list, session new, session show, session history, session export, ... |
| Turns | prompt, exec, queue, cancel, watch, confirm, answer |
| Chats | chat list, chat new, chat show, chat history, chat rm |
| Agents | agents, models, commands, completions |
| Changes | changes, content |
| Resources | resource list, resource read, resource write, ... |
| Terminals | terminal list, terminal new, terminal send, terminal watch, terminal rm |
| Automations | automation list, automation run, automation enable, ... |
| Customizations | customizations, session customizations, session toggle |
| Telemetry | logs |
Every command and flag is in the CLI reference.
Anything else
| Command | |
|---|---|
status | The connection, and whether a newer ahpc is on npm |
config | The config file path and the values in force. Works without a host |
auth | What the host protects. See Connect |
dispatch <uri> <type> | Send one protocol action as is. --field k=v, repeatable. --chat for a chat action |
mcp, serve | The tool server |
wire <file> | Watch a recording |
help | Every command |
--version | The version |