peer-cli Docs
Agent-first documentation for the Peer protocol CLI and MCP server.
peer-cli is a JSON-first operator surface for the Peer protocol.
It exposes three closely related interfaces:
- A terminal CLI for humans and automation.
- A machine-readable MCP server that wraps the same command registry.
- Generated agent artifacts in
agents/tool-catalog.jsonandagents/error-catalog.json.
These docs are written for agents that need to plan, execute, and recover protocol workflows with minimal ambiguity.
What This Site Covers
Guide
Learn the execution model, config precedence, safety rules, auth resolution, output envelopes, and how agents should treat writes.
Reference
Inspect command families, MCP behavior, catalog files, and the exact shape of the supported operational surface.
Playbooks
Follow goal-oriented flows for quoting, deposits, intents, vault management, checkout handling, and troubleshooting.
Mental Model
Treat peer-cli as a thin but disciplined orchestration surface over protocol reads, SDK-backed writes, and related service APIs.
- Reads are cheap and safe by default.
- Writes are preview-first by default.
- JSON output is the canonical contract.
- MCP mirrors the same command definitions, parameter schemas, and error normalization.
- Catalog files are generated from the same registry and should be trusted over prose when there is a mismatch.
Fastest Path For Agents
- Start in Guide if you need the operational model.
- Jump to Reference when you already know the goal and need exact commands.
- Use Playbooks when you want the shortest path from an intent like “quote liquidity” or “reconcile a checkout session” to a working command sequence.
- Use
/llms.txtor/llms.mdx/docs/...when you want a flattened machine-readable view of the docs corpus.
Source of Truth Hierarchy
When there is a discrepancy, use this order:
src/commands/registry.tsand the command definitions undersrc/commands/agents/tool-catalog.jsonagents/error-catalog.json- The CLI docs in this site and the root
README.md
Scope
This site documents the current peer-cli branch state.
- Runtime environment support:
production,preproduction,staging - Built artifact:
dist/cli.cjs - Node requirement:
>=22 - Default chain: Base (
8453)