Skip to main content
@codespar/cli · v0.4.0

Commerce from your terminal.Every tool, one command.

Authenticate, inspect servers, run a session, revoke a mandate, export the audit chain — all without leaving your shell. Same guardrails as the SDK, scripting-friendly output, zero telemetry.

requires Node.js 20+ · changelog →
Live demo

A real session, auto-played.

The three commands you will run in your first five minutes.

codespar — zsh
  ██████╗ ██████╗ ██████╗ ███████╗███████╗██████╗  █████╗ ██████╗ 
 ██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔════╝██╔══██╗██╔══██╗██╔══██╗
 ██║     ██║   ██║██║  ██║█████╗  ███████╗██████╔╝███████║██████╔╝
 ██║     ██║   ██║██║  ██║██╔══╝  ╚════██║██╔═══╝ ██╔══██║██╔══██╗
 ╚██████╗╚██████╔╝██████╔╝███████╗███████║██║     ██║  ██║██║  ██║
  ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝╚═╝     ╚═╝  ╚═╝╚═╝  ╚═╝
@codespar/cli·v0.4.0·Every LatAm commerce API in your shell.
~ $
Available todayv0.4.0 on npm

@codespar/cli@0.4.0Inspect, run, track, connect.

Every command supports --json and --help. Human messages go to stderr, machine data to stdout. Run codespar --help for the full surface — or see the CLI reference.

Inspect
Browse the catalog and your sessions
$codespar servers list

Browse the LATAM commerce catalog (109+ servers, 9 verticals).

$codespar tools show codespar_charge

Show a meta-tool's input schema and rails.

$codespar sessions list

Recent sessions with status, server count, and last activity.

Run
Charge, ship, discover — straight from terminal
$codespar discover "issue an NF-e for a service"

Semantic + lexical search across the whole catalog.

$codespar charge --input '{ "amount": 5000, ... }'

Pix or card charge via codespar_charge meta-tool.

$codespar ship --input-file ./shipment.json

Melhor Envio label / quote / track via codespar_ship.

Track
Async settlement, KYC, live logs
$codespar payment-status tcl_abc123 --stream

Stream charge settlement via SSE. SIGINT cancels cleanly.

$codespar verification-status tcl_xyz789 --stream

KYC inquiry status. approved / rejected / review / expired.

$codespar logs tail --status error

Real-time tool-call logs. Filter by server / tool / status.

Connect
OAuth, mTLS, HMAC — provider onboarding
$codespar wizard banco-do-brasil --action initiate

Connect a provider (cert / OAuth / API-key flow).

$codespar connect mercadopago

Start an OAuth Connect Link for the current user.

$codespar init my-agent

Scaffold a runnable commerce agent (framework + template).

Coming with AgentGateEnterprise tier — preview

Four groups of commands.Transact, govern, observe, build.

What the CLI looks like once the AgentGate managed-tier primitives (mandates, policy engine, kill switch, audit replay) ship. Shapes may shift before GA.

Transact
Move money from the shell
$codespar pay --amount 150 --rail pix --to diego-br

Run a policy-checked Pix charge. Returns the sealed receipt.

$codespar refund --tx rcp_8f2a91 --reason "duplicate"

Issue a refund on the original rail. Credit note auto-emitted.

$codespar session send "Charge R$150 and issue the NF-e"

One-off session call, like the SDK but from the shell.

Govern
Policies, mandates, kill switch
$codespar mandates list --agent agent-checkout

Show active mandates with scope, expiry, and remaining budget.

$codespar mandates revoke mdt_4a12b --reason "suspicious"

Revoke a mandate in one call. Written to the audit ledger.

$codespar org pauseAll --reason "drill"

Kill switch. Freezes every mandate across the org.

Observe
Audit, export, replay
$codespar audit export --from 2026-01-01 --format json

Exports a signed, hash-chained JSON of every event in the range.

$codespar audit replay --from hash:0x8f2a...

Verifies the hash chain from a checkpoint. Integrity report.

$codespar tail --agent agent-checkout

Streams live events from a specific agent in real time.

Build
Generate, test, publish
$codespar generate --from ./src/routes --out mcp-myapi

Scan your Express or Next.js routes, emit a runnable MCP server.

$codespar test --server mcp-myapi --all-tools

Runs every tool against your API in dry-run, reports failures.

$codespar publish --server mcp-myapi --dry-run

Stages npm publish with manifest preview.

Designed for your shell

Four commitments. Every release keeps them.

Zero config

Install, run codespar login, done. Your API key lives in ~/.codespar/config.json (chmod 600).

Scripting-first

Every command supports --json. Pipe into jq. Human messages go to stderr, machine data to stdout.

Throwaway sessions

codespar session send opens a session, runs your intent, closes. No SDK boilerplate for one-off calls.

Open source · MIT

Source on GitHub, bugs on Issues, zero telemetry. Every flag you see is documented.

One install.The whole stack in your shell.

Free, MIT-licensed, zero telemetry. Same guardrails as the SDK. Run it on your laptop, pipe it through CI, or embed it in your scripts.

CodeSpar CLI | CodeSpar