| name | 1sat-cli |
| description | This skill should be used when working with the 1Sat CLI tool for BSV operations from the terminal -- running wallet commands, minting ordinals, managing tokens, creating listings, locking BSV, sweeping assets, or managing identity from the command line. Triggers on '1sat CLI', 'command line wallet', '1sat init', '1sat wallet', '1sat ordinals', '1sat tokens', '1sat lock', '1sat sweep', '1sat action', 'bunx @1sat/cli', or 'terminal BSV operations'. Uses @1sat/cli package. |
1Sat CLI
Bun-native command-line interface for 1Sat Ordinals and BSV operations. Binary name: 1sat.
Usage
bunx @1sat/cli <command>
bun add -g @1sat/cli
Quick Start
bunx @1sat/cli init
bunx @1sat/cli wallet balance
bunx @1sat/cli ordinals list
bunx @1sat/cli wallet send --to 1Address... --amount 50000
If installed globally (bun add -g @1sat/cli), replace bunx @1sat/cli with just 1sat.
Configuration
Config directory: ~/.1sat/
Key Management
Keys can be provided in three ways:
- Secure Enclave (macOS arm64): Hardware-protected via
@1sat/vault — keys encrypted with SE P-256 key, decryption requires Touch ID. Used by bap touchid enable and clawnet setup-key.
- Environment variable: Set
PRIVATE_KEY_WIF with your WIF private key
- Encrypted keystore: Stored at
~/.1sat/keys.bep (created during bunx @1sat/cli init)
PRIVATE_KEY_WIF=L1abc... bunx @1sat/cli wallet balance
bunx @1sat/cli init
bunx @1sat/cli wallet balance
Commands
All examples below use bunx @1sat/cli. If installed globally, use 1sat instead.
Wallet
bunx @1sat/cli wallet balance
bunx @1sat/cli wallet send
bunx @1sat/cli wallet send-all
bunx @1sat/cli wallet utxos
Ordinals
bunx @1sat/cli ordinals list
bunx @1sat/cli ordinals inscribe
bunx @1sat/cli ordinals transfer
Marketplace (OrdLock)
bunx @1sat/cli ordinals list-for-sale
bunx @1sat/cli ordinals cancel-listing
bunx @1sat/cli ordinals purchase
Tokens (BSV21)
bunx @1sat/cli tokens balances
bunx @1sat/cli tokens list
bunx @1sat/cli tokens send
Locks (Timelock)
bunx @1sat/cli locks status
bunx @1sat/cli locks create
bunx @1sat/cli locks unlock
Identity (BAP)
bunx @1sat/cli identity publish
bunx @1sat/cli identity profile
bunx @1sat/cli identity attest
Social (BSocial)
bunx @1sat/cli social post
bunx @1sat/cli social search
OpNS Names
bunx @1sat/cli opns register
bunx @1sat/cli opns deregister
Sweep / Import
bunx @1sat/cli sweep bsv
bunx @1sat/cli sweep ordinals
bunx @1sat/cli sweep tokens
Action Escape Hatch
Any registered action can be invoked directly by name with a JSON input:
bunx @1sat/cli action <name> <json>
bunx @1sat/cli action sendBsv '{"requests":[{"address":"1A...","satoshis":5000}]}'
bunx @1sat/cli action lockBsv '{"requests":[{"satoshis":10000,"until":900000}]}'
bunx @1sat/cli action inscribe '{"base64Content":"SGVsbG8=","contentType":"text/plain"}'
This is the escape hatch for any operation supported by the @1sat/actions registry, even those without dedicated CLI subcommands.
Output Modes
bunx @1sat/cli wallet balance --json
bunx @1sat/cli wallet send --to 1A... --amount 5000 --quiet
bunx @1sat/cli wallet send --to 1A... --amount 5000 --yes
Init Flow
bunx @1sat/cli init
The init command:
- Prompts for network selection (mainnet/testnet)
- Generates or imports a private key (WIF)
- Encrypts and stores the key at
~/.1sat/keys.bep
- Writes config to
~/.1sat/config.json
- Tests connectivity to
api.1sat.app
Requirements
- Bun runtime (not Node.js)
- Network access to
api.1sat.app
Package
bunx @1sat/cli
bun add -g @1sat/cli
The CLI wraps @1sat/actions, @1sat/wallet-node, and @1sat/client into a single command-line interface.