Skip to main content

Direct commands

The commands that do not live under a group: authentication, the meta-tools and the money shortcuts.

5 min read
View MarkdownEdit on GitHub

The commands that do not live under a group: authentication, the meta-tools and the money shortcuts.

19 commands in @codespar/cli 0.11.2.

codespar login

Authenticate and save your API key to ~/.codespar/config.json

codespar login [options]
opçãoo que faz
--api-key <key>API key (prompts if omitted)

codespar whoami

Show the authenticated user, org, project, and key scopes

codespar whoami [options]

codespar logout

Clear the stored API key

codespar logout [options]

codespar tool

Invoke a published meta-tool by name (15 of them — see `codespar tools meta`)

codespar tool [options] <name>
opçãoo que faz
--action <action>Action to run, validated against the tool's published
--arg <key=value>Single input property (repeatable); typed by the
-i, --input <json>Full input as a JSON string
-f, --input-file <path>Full input from a JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar pay

Invoke codespar_pay (alias of `codespar tool codespar_pay`)

codespar pay [options]
opçãoo que faz
--action <action>Action to run, validated against the tool's published
--arg <key=value>Single input property (repeatable); typed by the
-i, --input <json>Full input as a JSON string
-f, --input-file <path>Full input from a JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar kyc

Invoke codespar_kyc (alias of `codespar tool codespar_kyc`)

codespar kyc [options]
opçãoo que faz
--action <action>Action to run, validated against the tool's published
--arg <key=value>Single input property (repeatable); typed by the
-i, --input <json>Full input as a JSON string
-f, --input-file <path>Full input from a JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar execute

Run a single tool call (creates a throwaway session)

codespar execute [options] <tool>
opçãoo que faz
-s, --server <id>Server to open the session against
-i, --input <json>Input as JSON string
-f, --input-file <path>Input as JSON file path
-u, --user <id>User id for the session (default: cli-user)

codespar discover

Search the catalog for tools matching a use case (codespar_discover)

codespar discover [options] <query>
opçãoo que faz
--limit <n>Max results to display (default 10, server clamps 1..20)
--category <name>Filter by category
--country <code>Filter by country code (BR, MX, ...)
-u, --user <id>User id for the session (default: cli-user)

codespar charge

Issue an inbound charge via codespar_charge (router picks the rail)

codespar charge [options]
opçãoo que faz
-i, --input <json>Charge args as JSON string
-f, --input-file <path>Charge args from JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar spend

Execute an agentic spend against a consumer mandate (Pix / USDC / x402 by payee)

codespar spend [options]
opçãoo que faz
-m, --mandate <id>Consumer mandate id
-p, --payee <payee>Pix key, EVM address, or x402 resource URL
-a, --amount <minor>Amount in minor units (cents)
--agent <id>Agent id making the spend

codespar wallet

Show a consumer's unified wallet, rolled up per currency (multi-slot mandate balances)

codespar wallet [options] <consumer>

codespar transfer

Move value between wallet slots (per-currency, no FX — a cross-currency move is a real ramp trade)

codespar transfer [options] <consumer>
opçãoo que faz
--from <currency>Source slot currency (e.g. BRL)
--to <currency>Destination slot currency (e.g. USDC)
--amount <minor>Amount in the source currency's minor units
--executeActually run the ramp legs (real money). Omit to just plan
--agent <id>Agent id attributed for audit
--purpose <text>Human purpose for the transfer

codespar ship

Generate label / quote rates / track shipment via codespar_ship

codespar ship [options]
opçãoo que faz
-i, --input <json>Ship args as JSON string
-f, --input-file <path>Ship args from JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar payment-status

Get the async settlement status for a tool call (poll once or --stream)

codespar payment-status [options] <tool-call-id>
opçãoo que faz
--streamOpen an SSE stream and print updates until terminal frame
--timeout <ms>Max wait for the stream in ms (default 600000)
-u, --user <id>User id for the session (default: cli-user)

codespar verification-status

Get the async KYC verification status for a tool call (poll once or --stream)

codespar verification-status [options] <tool-call-id>
opçãoo que faz
--streamOpen an SSE stream and print updates until terminal frame
--timeout <ms>Max wait for the stream in ms (default 600000)
-u, --user <id>User id for the session (default: cli-user)

codespar wizard

Connection wizard for a server — required secrets, connect URL, next steps

codespar wizard [options] [server-id]
opçãoo que faz
--action <name>list
--country <code>Filter list action by country code
--environment <env>live
--return-to <path>Dashboard return path after initiate (validated
-u, --user <id>User id for the session (default: cli-user)

codespar ledger

Post journal entries / read balances / create accounts via codespar_ledger (Midaz)

codespar ledger [options]
opçãoo que faz
-i, --input <json>Ledger args as JSON string
-f, --input-file <path>Ledger args from JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar issue

Issue / freeze / read agent spend cards via codespar_issue (Pomelo)

codespar issue [options]
opçãoo que faz
-i, --input <json>Issue args as JSON string
-f, --input-file <path>Issue args from JSON file
-u, --user <id>User id for the session (default: cli-user)

codespar init

Scaffold a new commerce agent from a template

codespar init [options] <name>
opçãoo que faz
-t, --template <slug>Template slug (pix-agent, ecommerce-checkout,
-y, --yesUse default template without prompting
Direct commands | CodeSpar