CLI reference

The sats CLI manages one sealed seed and a watch-only wallet per Bitcoin network. Run sats --help or sats <command> --help for the exact option list supported by the installed version.

Quickstart

sats init
sats receive
# Fund the printed address from a signet faucet, then:
sats balance
sats send tb1p... 25k
sats status

Signet is the default. init prints the new mnemonic once; back it up before continuing. Mainnet requires --network mainnet explicitly.

Commands

Everyday commands express intent; the psbt, tx, and agent namespaces hold the explicit advanced workflows.

CommandBehavior
sats init [--words 12|24]Create the sealed seed and the watch-only wallet for the selected network
sats balance [--offline]Sync and show confirmed/trusted and pending balances; --offline uses cached state
sats receiveReveal and persist the next external receive address
sats send <address> <amount>Prepare, confirm, sign, privately persist raw finalized transaction hex, then broadcast
sats send ... --dry-runPrepare and price the send, persist nothing
sats send ... --export-psbt <FILE>Write the unsigned PSBT to a private file artifact instead of signing
sats status [TXID] [--offline]Show signed-but-unbroadcast and broadcast transactions with confirmation state
sats history [--offline]List the wallet's transactions, newest first
sats psbt inspect <FILE>Decode a PSBT file offline: outputs, fee, signing state
sats psbt sign <FILE> [--out FILE]Sign an explicit PSBT artifact
sats tx broadcast <FILE|TXID>Broadcast a raw hex file, or a saved transaction by txid/prefix/id
sats agent grant <name>Create bounded unattended signing authority
sats agent revoke <name>Delete an agent grant immediately
sats agent listList non-expired grants and remaining budgets
sats agent serve <name>Serve the four wallet tools for one granted agent over MCP stdio

Global flags

Global flags select the environment for one invocation:

FlagMeaning
--network <NET>mainnet, signet, testnet4, or regtest; overrides config
--provider <KIND=URL>Replace configured providers for this invocation; repeatable
--jsonUse machine-readable output where the command exposes it

SATS_DIR relocates configuration and data under one directory. The corresponding --dir flag exists for internal/testing use and is hidden from help. SATS_PASSWORD supplies the wallet password non-interactively; avoid putting it in shell history or process-inspection surfaces.

Amounts

Amounts are integer satoshis. Case-insensitive suffixes are accepted:

Fractional shorthand must resolve to a whole satoshi. Plain values such as 25000 are interpreted directly as sats.

Sending

sats send <address> <amount> [--fee-rate <SAT_VB>] \
  [--allow-dust] [--no-guards] [--yes | --dry-run | --export-psbt <FILE>]

Every send — human or agent — runs the shared preparation path:

  1. validates the address against the selected network;
  2. syncs the watch-only wallet;
  3. excludes common inscription postage outputs unless --allow-dust;
  4. queries and unions configured guards unless --no-guards;
  5. estimates a roughly two-block fee unless --fee-rate is supplied;
  6. builds the unsigned PSBT in memory.

Sync or configured-guard failure stops preparation. Both bypass flags apply only to the current human invocation and are intentionally absent from MCP sends.

The three send modes:

If broadcast fails after signing, the transaction is already saved: sats status lists it and sats tx broadcast <txid> retries it.

Transaction visibility

sats status                # pending (signed, unbroadcast) + broadcast with confirmations
sats status <txid>         # one transaction by txid, unique prefix, or session id
sats history               # every wallet transaction, unconfirmed first

Both commands sync first and tolerate sync failure with a stderr warning; --offline skips sync entirely. status <txid> falls back to the wallet's canonical chain view for transactions the store never saw, such as incoming payments.

Explicit PSBT workflow

Normal send never persists a PSBT. The staged lifecycle works on explicit file artifacts:

sats send tb1p... 25k --export-psbt spend.psbt
sats psbt inspect spend.psbt
sats psbt sign spend.psbt
sats tx broadcast <txid>

psbt sign FILE accepts base64 text or binary. When the wallet's signature finalizes the transaction, sats privately saves raw finalized transaction hex (ready for sats tx broadcast); it does not retain the signed PSBT. A PSBT that still needs other signers is written back beside the input as <name>.signed.psbt and reported as partially signed. --out <FILE> always writes the signed PSBT to FILE and persists nothing — the pure artifact path for multi-signer flows.

psbt sign --session <id> signs a stored PSBT session or pre-refactor plan from an older release. The id is always explicit: signing never consumes hidden internal state. New sats versions no longer write stored sessions.

tx broadcast takes exactly one target: an existing file is read as raw transaction hex; anything else resolves a saved transaction by full txid, unique prefix, or the session id that produced it.

Agent grants

sats agent grant <name> --budget <SATS> [--for <DURATION>] \
  [--max-tx <SATS>] [--max-fee <SATS>]

--for defaults to 24h and accepts human-readable durations such as 30m, 24h, and 7d. Agent names are 1–32 lowercase letters, digits, hyphens, or underscores.

Budget is amount plus fee. --max-tx applies to recipient amount only and --max-fee applies to fee only. Grant creation requires the wallet password.

sats agent list
sats agent revoke claude

Expired grants are removed while listing. Revocation deletes the grant file; an active MCP server observes the deletion on its next send call.

sats agent serve <name> runs the MCP server as that agent. See MCP and agent grants for the tool-level contract.

JSON output

--json is implemented for:

JSON field names are compatibility surfaces. Scripts should branch on documented status and reason fields rather than human-readable messages.

init remains an interactive recovery-material flow and deliberately has no JSON mode: emitting the mnemonic on a machine-readable stream invites accidental capture.

Configuration

The default configuration path is the platform-specific XDG config directory for sats. A minimal configuration is:

network = "signet"

Typed providers are configured under [providers.<name>]:

network = "mainnet"

[providers.subfrost]
driver = "subfrost"
network = "mainnet"
url = "https://mainnet.subfrost.io/v4/jsonrpc"
capabilities = ["chain", "guard"]

See Providers and guards for drivers, capability filters, precedence, authentication, and command-line overrides.

Exit and failure behavior

Command failures print a diagnostic to stderr and exit non-zero. Balance, status, and history are the intentionally tolerant chain-read commands: when sync fails without --offline, they report cached state with a stderr warning (synced: false for balance). Planning, signing, provider validation, and broadcast failures remain hard failures.