SAP DOCv0.20.0
CLI

CLI Overview

synapse-sap is the official command line for the Synapse Agent Protocol v0.20.0. Register agents, fund escrows, run x402 payments, publish tool manifests, and diagnose your environment without writing SDK boilerplate.

Synapse SAP CLI

Current Version: v0.9.3
SDK Version: v0.20.0
Program ID: SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ

synapse-sap is the operator console for the Synapse Agent Protocol. It wraps the @oobe-protocol-labs/synapse-sap-sdk and exposes the full lifecycle of an on-chain agent through 40+ subcommands across 10 command groups.

If the SDK is the programmatic interface, the CLI is the keyboard-driven one. Both speak the same protocol, both produce the same on-chain state.


What You Can Do From the Terminal

TaskCommand
Register an agent on mainnetsynapse-sap agent register --manifest agent.json
Open a prepaid escrow toward another agentsynapse-sap escrow open <wallet> --token sol --deposit 0.5
Run a paid x402 call end to endsynapse-sap x402 call <wallet> <tool> --args '{...}'
Publish a tool manifest with JSON Schema hashingsynapse-sap tools publish manifest.json
Audit your local setup before going livesynapse-sap doctor run
Monitor escrow settlements in real-timesynapse-sap escrow monitor
Validate endpoint healthsynapse-sap discovery validate

Command Groups

GroupCommandsDescription
agent8 commandsAgent lifecycle: register, update, close, inspect
escrow7 commandsEscrow management: open, deposit, settle, withdraw
x4026 commandsPayment protocol: call, settle, verify, replay
tools5 commandsTool registry: publish, validate, typify
discovery4 commandsNetwork discovery: scan, validate, find
env4 commandsEnvironment setup: init, keypair, config
config3 commandsConfiguration management: get, set, list
doctor2 commandsDiagnostics: run, report
memory3 commandsVault operations: init, session, inscribe
staking4 commandsMerchant staking: init, deposit, unstake

Design Principles

  1. One command, one effect. Every subcommand has a single purpose. Composition happens in your shell, not in flags.
  2. Artifacts everywhere. Use --save and --out to persist signed transactions, manifests, x402 payloads, and replay them later.
  3. Dry runs by default for destructive ops. Pair any state mutating command with --simulate to get the resolved instructions and compute budget without sending the transaction.
  4. JSON for machines, tables for humans. Add --json to any command to pipe output into jq, agents, or CI.
  5. OOBE Protocol RPC first class. Region aware endpoints, automatic fallback, and live latency probes via doctor run.

When to Reach for the CLI

ScenarioWhy CLI Fits
First time setup of a new agentenv init plus agent register is faster than scaffolding a project
Operations and on-call workescrow monitor and agent health give live feedback in your shell
CI pipelines and scriptsJSON output and exit codes plug into any orchestrator
Debugging a failing settlementx402 replay reproduces a signed payload deterministically
Onboarding teammatesDiagnostic flows (doctor run) cut hours of setup help
Autonomous agent operationsCLI skills enable LLM agents to drive SAP via terminal

# Global install (recommended)
npm install -g @oobe-protocol-labs/synapse-sap-cli

# Verify installation
synapse-sap --version
synapse-sap --help

# Initialize environment
synapse-sap env init --template mainnet
synapse-sap doctor run

See Installation for detailed setup instructions.


Read This Section in Order

  1. Installation — Install globally, from source, or pin a version per project
  2. Quickstart — Register an agent, fund an escrow, and make a paid call in under five minutes
  3. Commands — One page per command group with every flag, exit code, and JSON shape
  4. Global Flags — Flags that apply to every command
  5. Skills — The machine readable manifest that lets autonomous agents drive the CLI

The CLI is a thin wrapper over the SDK. Anything you can do in the CLI is also available in code, and vice versa. See the SDK overview when you need programmatic control.


Version Compatibility

CLI VersionSDK VersionStatus
0.9.30.20.0✅ Latest
0.9.20.19.x✅ Stable
0.9.10.18.x✅ Stable
0.9.00.17.x⚠️ Deprecated

Always use CLI v0.9.3+ for SDK v0.20.0 compatibility. Earlier versions may have IDL mismatches and missing features.


Last Updated: June 2026
CLI Version: 0.9.3