agentrun-cli
AgentRun CLI
agentrun drives an AgentRun server (the open platform's server for agents) through its API. It is the command npm install -g @parcha/agentrun puts on the PATH; without it, write npx @parcha/agentrun in its place. Each command prints the server's JSON answer on stdout, one line when piped, and an error's JSON on stderr. agentrun help lists the commands, agentrun GROUP COMMAND --help gives one's flags, and references/commands.md has every command with its flags and route.
A list command (agentrun agents list, agentrun runs list and the others with --cursor) prints one page, with the next_cursor to pass as --cursor for the next; --all reads every page and prints them as one list, its next_cursor null.
Choose the onboarding path
For general setup, first establish whether the user wants to start a new agent or bring an existing Claude Code/Codex setup. Ask only when intent is missing: Build an agent already chose new; Connect agent already chose existing. Reuse the named instance and read its matching /skills/agentrun-serve/SKILL.md; do not start a replacement. A new agent starts from a suitable template or custom definition after clarifying its job, inputs and expected result. Inspect configured models before asking for a key. Existing-agent connection and selected history import need no destination model key; live jobs use the source runtime's existing sign-in. Finish with the first requested run's result and console link, or the imported history and counts; offer self-improvement separately.
The server and the token
The first of these that is set wins:
--base-url URL(the API, ending/v2), elseAGENTRUN_BASE_URL, with the token inAGENTRUN_API_KEY.- The config file
$XDG_CONFIG_HOME/agentrun/config.json(else~/.config/agentrun/config.json), written byagentrun login, which checks the token first. The CLI refuses the file if anyone else can read it. - The server started on this machine with
npx @parcha/agentrun, whose data directory (~/.agentrun, or--data DIR) says where it listens and holds its token: nothing to set.