Skip to Content
📢 Applications using LedgerJS for transport implementation should migrate to the Device Management Kit (DMK). Learn more.
DocumentationAI toolsWallet CLI

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 genuine

Conventions

  • Every command supports --output json for piping into other tools (--output human is 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.

NetworkBalances & opsSend / receiveSwapToken lookupEarn
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 add -g @ledgerhq/wallet-cli
wallet-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-usage

Manage 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 20

account 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:

FlagNetwork
--fee-per-byteBitcoin only
--rbfBitcoin only
--dataEthereum / EVM only (calldata)
--memoSolana 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…91d3e6

Resolve 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 ETH

Earn

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…4e7f10

Run 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 destroy

ring encrypt and ring decrypt also accept text via stdin/stdout instead of -i/-o files.

Last updated on
Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Stax, Ledger Flex, Ledger Nano, Ledger Nano S, Ledger OS, Ledger Wallet, [LEDGER] (logo), [L] (logo) are trademarks owned by Ledger SAS.