Ledger Wallet CLI
This guide shows you how to install the Ledger Wallet CLI and run common workflows from the terminal: account discovery, transfers, swaps, staking, and key ring encryption. You confirm every fund-touching command on the Ledger device before it runs.
This CLI manages personal accounts. Looking for something else? The Ledger Enterprise CLIÂ covers institutional, policy-enforced workflows. The Ledger Enterprise Multisig CLIÂ covers Safe multisig wallets.
Verify your signer
Before running any workflow, you can confirm that your Ledger is genuine. genuine-check verifies the device’s authenticity against Ledger’s attestation service and exits with a non-zero code if it fails. Run it once after setup, or include it as a guard in automated workflows.
wallet-cli genuine-check
âś” Device is genuineConventions
- Every command supports
--output jsonfor piping into other tools (--output humanis the default). - Signing commands follow the same pattern: the terminal announces what is about to happen, you confirm on the Ledger screen, the terminal reports the outcome.
- Read-only commands (balances, operations,
earn yields,earn positions) never touch the device and are safe to run in CI or from an untrusted agent.
Supported networks
The CLI supports Bitcoin, Ethereum (and EVM-compatible chains), and Solana.
| Network | Balances & ops | Send / receive | Swap | Token lookup | Earn |
|---|---|---|---|---|---|
| Bitcoin | ✓ | ✓ | ✓ | — | — |
| Ethereum / EVM | âś“ | âś“ | âś“ | ERC-20 | âś“ (ERC-4626 vaults) |
| Solana | âś“ | âś“ | âś“ | SPL | âś“ (native staking) |
Prerequisites
- Supported platforms: macOS, Linux, Windows (WSL recommended)
- Ledger device connected over USB, with the relevant app installed (for example, the Ethereum app for ETH accounts)
Install
Install the CLI
pnpm
pnpm add -g @ledgerhq/wallet-cliwallet-cli --version
wallet-cli v2.0.1
wallet-cli --help # list all available commands
Commands:
account Account management commands
assets Crypto-assets store queries (resolve tokens by address or id)
balances Fetch native and token balances for an account (no device required)
earn Earn-related commands (yields, positions, deposit, withdraw)
genuine-check Check whether the connected Ledger device is genuine
operations List operations for an account (no device required)
receive Get receive address for an account (optionally verify on device)
ring Ledger Key Ring (LKRP) encryption commands
send Sign and broadcast a transaction
session Session management commands
swap Swap-related commands
Install the agent skill
The agent skill teaches Claude Code, Cursor, and similar tools to drive the CLI from natural language.
npx skills add LedgerHQ/agent-skills -s wallet-cli-usageManage accounts
Run account discover once per network to derive every account on the device. After that, balances and operations work without the device plugged in. Pass bitcoin, ethereum, or solana as the network argument.
# Discover accounts — device required once per network
wallet-cli account discover bitcoin
bitcoin:main account #0 (utxo) bc1q…4f2s
bitcoin:main account #1 (utxo) bc1q…9xj7
wallet-cli account discover ethereum
ethereum:main account #0 0x71C7…976F
ethereum:main account #1 0x9A44…47F3
wallet-cli account discover solana
solana:main account #0 7EcD…BkPm
solana:main account #1 3fVw…Qa9r
# Read balances — no device needed
wallet-cli balances <label>
âś” Balances fetched
1.5 ETH
100 USDT
# List operations — paginated
wallet-cli operations <label> --limit 20account discover saves the account label to a local session so subsequent commands do not need the device.
Use session view to inspect what is stored and session reset to clear it.
# Inspect the current session
wallet-cli session view
ethereum-1 account:1:address:ethereum:main:0x71C7…976F:m/44h/60h/0h/0/0
ethereum-2 account:1:address:ethereum:main:0xsDd7…3LJb:m/44h/60h/1h/0/0
# Clear all stored accounts
wallet-cli session reset
Removed 2 accounts from session.Send and receive
receive shows a fresh address and asks you to verify it on the device screen. send prompts you to review the transaction on-device before signing. Amounts must include a ticker; it drives token resolution. Use --dry-run to estimate fees without touching the device.
All three networks are supported. Some flags are network-specific:
| Flag | Network |
|---|---|
--fee-per-byte | Bitcoin only |
--rbf | Bitcoin only |
--data | Ethereum / EVM only (calldata) |
--memo | Solana only |
Solana staking (delegate, undelegate, withdraw) goes through earn deposit and earn withdraw, not through send. See Earn.
# Receive — verify address on-device
wallet-cli receive <label>
0x1a2B...9a0b
Compare the address above with what's shown on your Ledger...
[â§–] Review address on device. Approve or reject
# Once it's approved
0x1a2B…9a0b
Compare the address above with what\'s shown on your Ledger...
âś” Address verified
0x1a2B…9a0b
# Send — native, token, dry-run
wallet-cli send <label> --to 0xDEF… --amount '0.1 ETH'
To: 0xDEF…
Amount: 0.1 ETH
Fees: 0.0004961 ETH
â§– Review on device. Approve or reject.
# Once it's approved
✔ Signed → broadcast → 0x8f4a2b…91d3e6Resolve tokens
assets token and assets token-by-id let agents and scripts look up the canonical Ledger token id from a contract address or from an id they already hold. The resolved id is what swap quote --from / --to expects, so you can build swap workflows without hard-coding tickers.
# Resolve by contract address
wallet-cli assets token ethereum 0xdac17f958d2ee523a2206206994597c13d831ec7
ethereum/erc20/usd_tether__erc20_
# Resolve by token id (validation / round-trip check)
wallet-cli assets token-by-id ethereum/erc20/usd_tether__erc20_Both commands are read-only and require no device.
Swap
Get a quote, execute the swap, then track its status. The Exchange app on your device clear-signs the transaction so you can verify the exact amounts and provider before approving.
wallet-cli swap quote --from ethereum --to bitcoin --account ethereum-1 --to-account bitcoin-native-1 --amount 0.1
from: 0.01 BTC ($950.00)
to: 0.2439 ETH ($942.27)
quote_id: q_abc123 (valid 30s)
wallet-cli swap execute --from ethereum --to bitcoin --account ethereum-1 --to-account bitcoin-native-1 --provider changelly --amount 0.1
â§– Review the swap on your Ledger. Confirm or reject.
✔ Swap initiated — swp_xyz789
wallet-cli swap status --swap-id <swapId> --provider changelly
Status: ● FINISHED · Received 0.2439 ETHEarn
Browse yield opportunities, check your active positions, then deposit into or withdraw from a vault. earn yields and earn positions are read-only and require no device. earn deposit and earn withdraw sign on the device. Ethereum ERC-4626 vaults and Solana native staking are supported. Use --dry-run on a deposit or withdrawal to validate it without signing.
# List yield opportunities for a network — no device needed
wallet-cli earn yields -n ethereum
Lido Liquid 3.21% 0.01 ETH none
Rocket Pool Liquid 3.05% 0.01 ETH none
# Check your active positions — no device needed
wallet-cli earn positions <label>
Lido 1.5000 stETH +0.0031 ETH active
# Deposit or withdraw — device required
wallet-cli earn deposit <label> --amount '0.5 ETH'
â§– Review the deposit on your Ledger. Approve or reject.
✔ Signed → broadcast → 0x8f4a2b…91d3e6
wallet-cli earn withdraw <label> --amount '0.5 stETH'
â§– Review the withdrawal on your Ledger. Approve or reject.
✔ Signed → broadcast → 0x2c91da…4e7f10Run wallet-cli earn deposit --help and wallet-cli earn withdraw --help for the full set of vault and validator selection flags.
Key ring
The Ledger Key Ring (LKRP) encrypts and decrypts data under keys tied to your Ledger device. Run ring init once, it provisions the key ring via the device and prompts for a password unless you pass --unsecure-no-password. After that, ring encrypt and ring decrypt need network access to restore the trustchain, but no device.
# One-time provisioning — device required
wallet-cli ring init
âś” Key ring provisioned
# Encrypt a file under a named key (AES-256-GCM)
wallet-cli ring encrypt -i secrets.txt -o secrets.enc --key my-key
# Decrypt it back
wallet-cli ring decrypt -i secrets.enc -o secrets.txt --key my-key
# List the keys this machine has used
wallet-cli ring keys
# Tear down the ring — removes local credentials and the remote LKRP application
wallet-cli ring destroyring encrypt and ring decrypt also accept text via stdin/stdout instead of -i/-o files.
Important Legal notice
The Ledger Wallet CLI is a technology feature that supports AI agents and terminal-based workflows to prepare and present transactions for hardware confirmation on a Ledger device. It is not a financial service, brokerage, investment adviser, or custodian.
Transactions proposed or initiated through this feature require affirmative physical confirmation by the user on their Ledger device before they are signed or executed. Ledger does not hold, manage, or have access to user assets at any time. Ledger exercises no control over, and bears no responsibility for, the logic, prompts, financial parameters, or economic outcomes of any AI agent nor for the accuracy, profitability, suitability, or intent of any AI agent. The user is solely responsible for the logic, instructions, financial parameters, and outcomes of any transaction proposed or initiated by an AI agent operating through this CLI. Ledger does not select, recommend, or endorse specific swap providers, rates, validators, or staking positions. These are presented for user review and confirmation only.
Details regarding transactions that are displayed by the CLI are provided for informational purposes only and are sourced from third-party providers. They do not constitute investment advice or a recommendation to transact. Staking yields displayed by the earn commands are indicative only and not guaranteed. Ledger is not party to any swap or staking transaction. The contractual relationship is between the user and the relevant third-party provider.
Due to the non-deterministic nature of AI models, instructions generated by AI agents may contain errors, inaccuracies, or unintended parameters. Users must independently verify all transaction details on the Ledger device screen before confirming.
Use of this feature does not establish any contractual, advisory, or fiduciary relationship between the user and Ledger SAS or its affiliates. This tool is provided “as is,” in early experimental development, without warranty of any kind. To the maximum extent permitted by law, Ledger SAS and its affiliates shall not be liable for any direct, indirect, incidental, special, punitive, or consequential damages arising from use of this feature, including but not limited to loss of digital assets, unauthorised access, smart contract exploits, or transaction malfunction.