v1.20Grok Build CLI support →

Install

Install once, point the CLI at the agents you already pay for, and run anything from one prompt.

1. Install

curl -fsSL agents-cli.sh | sh

# or, if you prefer a package manager
bun install -g @phnx-labs/agents-cli
npm install -g @phnx-labs/agents-cli

The installer drops a single binary at ~/.agents/bin/agents and symlinks ag alongside it. Both work everywhere.

2. Add a model profile

A profile is a saved (provider, model, key) triple. Add one for each combination you want to invoke. The key lives in macOS Keychain — never on disk.

agents profiles add claude
agents profiles add kimi      --provider openrouter --model moonshotai/kimi-k2.5
agents profiles add deepseek  --provider openrouter --model deepseek/deepseek-coder
agents profiles list

3. Run an agent

agents run claude "refactor the queue worker"
agents run kimi   "draft a release note for v1.20"
agents run codex  "fix the failing test in src/payments/"

Same flags work everywhere. --rotate picks the least-used account, --quiet suppresses the preamble, --stream emits stream-json for piping.

4. Pin per project

Drop an agents.yaml at the repo root. Every agents call inside the tree honors it — like .nvmrc, but for AI.

# agents.yaml
agents:
  claude: "2.1.113"
  codex:  "0.116.0"

5. Make the config travel

Your skills, commands, hooks, rules, and MCP servers live in ~/.agents/. Push it to a git host once and pull on every machine.

agents repo init
agents repo push                # mirrors ~/.agents to your remote
agents repo pull                # on the next machine

Per-project rules go in ./.agents/ and get merged in at spawn time. See config layers for how the four levels — system, you, team, project — combine.

Next