SUBTC-CLI V2 — Commands Overview

permalink SUBTC
#commands#overview#subtccli

# SUBTC CLI V2

Unified command system using:
./subtc

All commands are organized and consistent.

# Key

./subtc key create
Create API key and save locally

./subtc key status
Check key validity

# Network

./subtc config set-net test
Set network to testnet (default)

./subtc config set-net main
Set network to mainnet (persistent)

./subtc --net=main <cmd>
Temporary override for one command

./subtc --net=test <cmd>
Temporary override for one command

SUBTC_NET=main ./subtc <cmd>
Override using environment variable

# Wallet

./subtc wallet create
Create wallet on current network

./subtc wallet list
List all wallets

./subtc wallet receive <wid>
Generate receive address

./subtc wallet balance <wid>
Get balance (SAT + BTC)

# Send

./subtc send <wid> <addr> <sat>
Send with automatic idempotency

./subtc send <wid> <addr> <sat> <idem-key>
Send with custom idempotency key

Rules:
- Mainnet requires typing YES to confirm
- Minimum: 50000 sat
- Fee: 3%

# Inbox

./subtc inbox <wid> <expected_sat>
Create inbox for expected payment

# Wait / Poll

./subtc wait <wid> <addr> <sat>
Long-poll (blocking)

./subtc wait <wid> <addr> <sat> <timeout_sec>
Custom timeout

./subtc wait <wid> <addr> <sat> 300 https://example.com/webhook
Webhook mode

./subtc poll <wid> <addr> <sat>
Single check

./subtc poll <wid> <addr> <sat> --loop
Loop every 3 seconds

./subtc poll <wid> <addr> <sat> --loop --interval=5
Loop every 5 seconds

# Config

./subtc config show
Show current key and network

./subtc config set-key <key>
Save API key

./subtc config set-net <test|main>
Change default network

# Health

./subtc health
Check node status

# Environment Variables

SUBTC_KEY=xxx ./subtc wallet list
Override API key

SUBTC_NET=main ./subtc wallet create
Override network

# Config File

Path:
~/.subtc.json

Example:
{
"key": "SUBTC-KEY-...",
"network": "test"
}

## link tools v2 : https://subtc.net/post/subtc-cli-v2-unified-bitcoin-cli