peer-cli

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:

  1. A terminal CLI for humans and automation.
  2. A machine-readable MCP server that wraps the same command registry.
  3. Generated agent artifacts in agents/tool-catalog.json and agents/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

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

  1. Start in Guide if you need the operational model.
  2. Jump to Reference when you already know the goal and need exact commands.
  3. Use Playbooks when you want the shortest path from an intent like “quote liquidity” or “reconcile a checkout session” to a working command sequence.
  4. Use /llms.txt or /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:

  1. src/commands/registry.ts and the command definitions under src/commands/
  2. agents/tool-catalog.json
  3. agents/error-catalog.json
  4. 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)

On this page