neutron-cli
v0.3.8
Published
CLI for Neutron Lightning wallet services — for developers and AI agents
Maintainers
Readme
neutron-cli
CLI for Neutron Lightning wallet services — for developers and AI agents.
Install
npm install -g neutron-cliThen use it from anywhere:
neutron-cli auth
neutron-cli balance
neutron-cli rateNote: If you just want to try it without installing, use
npx neutron-cli --help. But for regular use, global install is recommended.
Setup
First time you run any command, you'll be prompted for your credentials:
⚡ Welcome to Neutron CLI
Get your API key at: https://portal.neutron.me
API Key: ****************
API Secret: ****************
✅ Credentials saved to ~/.neutron/config.jsonCredentials are stored in ~/.neutron/config.json with 600 permissions (private to you). You'll never be prompted again.
Commands
Verify credentials
neutron-cli authCheck balances
neutron-cli balanceCreate a Lightning invoice
neutron-cli invoice --amount 5000
neutron-cli invoice --amount 5000 --memo "order #123"Send a payment — auto-detects payment type
# Lightning (BOLT11 invoice)
neutron-cli send --to lnbc50u1p... --amount 5000
# Bitcoin on-chain (auto-detected from address format)
neutron-cli send --to 1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf... --amount 5000
# USDT on TRON (auto-detected from T... address)
neutron-cli send --to TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE --amount 10 --currency USDT
# USDT on ETH (auto-detected from 0x... address)
neutron-cli send --to 0xAbC123... --amount 10 --currency USDT
sendautomatically detects the payment type from the destination address — no flags needed:
lnbc...→ Lightning1...,3...,bc1...→ Bitcoin on-chainT...→ USDT on TRON0x...→ USDT on Ethereum
Get deposit addresses
neutron-cli address ln # Lightning Address ([email protected])
neutron-cli address btc # Bitcoin on-chain deposit address
neutron-cli address usdt # USDT on TRON (default)
neutron-cli address usdt --chain ETH # USDT on EthereumSwap currencies
neutron-cli swap --from BTC --to USDT --amount 1000 # BTC → USDT (amount in sats)
neutron-cli swap --from USDT --to BTC --amount 10 # USDT → BTCFiat payouts
# List banks for a country
neutron-cli fiat institutions --country VN
# Send fiat payout (KYC required)
neutron-cli fiat payout \
--amount 0.001 \
--from BTC \
--to VND \
--method vnd-instant \
--bank-account 0123456789 \
--bank-code 970422 \
--recipient "LE VAN A" \
--country VNFiat payouts require KYC verification. If not verified, you'll see:
⚠️ Fiat payouts require KYC verification. Complete KYC at: https://portal.neutron.me (Bitcoin, USDT, and Lightning don't require KYC)
Transactions
neutron-cli tx get txn_abc123
neutron-cli tx list
neutron-cli tx list --limit 20 --from 2026-01-01 --to 2026-03-01Exchange rate
neutron-cli rate
neutron-cli rate --currency thbWebhooks
neutron-cli webhook create --url https://example.com/webhook
neutron-cli webhook list
neutron-cli webhook delete wh_abc123Manage config
neutron-cli config init # set up credentials
neutron-cli config show # show current credentials (masked)
neutron-cli config test # test credentials against APIUpdate
neutron-cli update # update to latest versionOutput
TUI (colored, human-readable) is the default. Add --json for machine-readable output:
neutron-cli balance --json
# {"ok":true,"data":{"wallets":[...]}}Errors go to stderr with exit code 1:
{"error":"Missing credentials","code":"AUTH_MISSING"}For AI Agents
Any AI agent with bash/exec access can use Neutron immediately — no MCP setup required:
export NEUTRON_API_KEY=...
export NEUTRON_API_SECRET=...
neutron-cli invoice --amount 1000 --memo "agent payment" --json
neutron-cli tx list --limit 5 --json
neutron-cli rate --currency usd --json
neutron-cli send --to lnbc... --amount 1000 --jsonWorks with Claude Code, Codex, and any agent that can run shell commands.
Links
- Docs: docs.neutron.me
- Portal: portal.neutron.me
- MCP package: neutron-mcp
- SDK: neutron-sdk
