# Ledger Developer Portal — full markdown > All documentation pages concatenated into a single file. > Updated automatically from MDX sources. --- --- title: OpenPGP encryption category: explanation description: How your Ledger acts as an OpenPGP key to protect secrets used by your agents and tools. --- # OpenPGP encryption > **Note:** **For advanced users.** This app is intended for developers already proficient with OpenPGP and GnuPG. > **Warning:** **Back up your keys.** Keys do not automatically persist across devices, OS updates, or app reinstalls. Follow the backup and restore instructions in the [app-openpgp repository](https://github.com/LedgerHQ/app-openpgp) — losing your keys means losing access to anything encrypted against them. Your Ledger can hold an OpenPGP private key that controls access to encrypted secrets—files, environment variables, API tokens, and any sensitive material your agents or tools consume. Because the private key never leaves the device, anything encrypted against your Ledger is unreadable without it physically present. ## How it works When you set up OpenPGP on your Ledger, a key pair is generated and stored on the device. You encrypt sensitive material against that public key. From that point, decryption requires the Ledger to be connected. Unplug the device and the secrets are opaque ciphertext to any process on the machine—including agents. A stricter mode requires a manual tap on the device for each decryption event. In that mode, your Ledger becomes an active approval gate: even a process already running on your machine cannot read a secret without your explicit, on-device confirmation. This is the hardware-level expression of the principle running through all of Ledger's AI tools—agents propose, humans verify. ## In the context of AI tools This matters most in agent workflows where automation handles sensitive material. An agent that needs API keys or credentials to do its work can only access those secrets when your signer is present. In tap-required mode, it needs your confirmation for every individual access. ## Further reading - [OpenPGP on Ledger](https://support.ledger.com/fr/article/115005200649-zd): setup and usage in the Ledger Help Center - [Ledger Wallet CLI](../ledger-cli): manage accounts and run agent workflows from the terminal --- --- title: Security Key category: explanation description: How your Ledger acts as a FIDO2 hardware security key to gate access to services like GitHub, npm, and 1Password. --- # Security Key Your Ledger can act as a FIDO2 hardware security key, adding a physical gate to sign-in flows for services such as GitHub, npm, 1Password, and Discord. ## How it works FIDO2 replaces or supplements passwords with a cryptographic challenge that only the registered physical device can answer. When you register your Ledger as a security key for a service, that service requires the device at sign-in. If credentials are leaked or stolen, the account remains locked without the physical hardware. The private key used to answer the challenge is generated on-device and never exposed. This creates a meaningful constraint for agent-assisted workflows. Agents operating in your environment can use a session you have already opened, but they cannot independently start a new authenticated session to a hardware-gated service. The human had to be present to open the session—that is the guarantee. ## In the context of AI tools Hardware-gated sign-in means agents always operate within sessions that required human presence to establish. For developers building processes where agents call external services, gating those services behind hardware authentication is one of the most direct ways to enforce a human-in-the-loop requirement without building a custom approval layer. > **Note:** The Security Key app on Ledger supports FIDO2 and U2F. Service-specific setup varies; check the service's documentation alongside the Ledger Help Center article linked below. ## Further reading - [Security Key setup guide](https://support.ledger.com/fr/article/12350325732893-zd): step-by-step setup in the Ledger Help Center - [Ledger Wallet CLI](../ledger-cli): manage accounts and run agent workflows from the terminal --- --- title: Ledger Wallet CLI category: how-to description: Install the Ledger Wallet CLI, optional agent skill, and use accounts, send, receive, swap, earn, and key ring encryption from the terminal with device confirmation. agent_skills: - label: Wallet CLI Usage url: https://raw.githubusercontent.com/LedgerHQ/agent-skills/main/skills/wallet-cli/wallet-cli-usage/SKILL.md role: primary refs: - label: Business Logic url: https://raw.githubusercontent.com/LedgerHQ/agent-skills/main/skills/wallet-cli/wallet-cli-usage/references/business-logic.md --- ## Agent Skills - [Wallet CLI Usage](https://raw.githubusercontent.com/LedgerHQ/agent-skills/main/skills/wallet-cli/wallet-cli-usage/SKILL.md) (primary) - [Business Logic](https://raw.githubusercontent.com/LedgerHQ/agent-skills/main/skills/wallet-cli/wallet-cli-usage/references/business-logic.md) # 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. > **Note:** This CLI manages **personal accounts**. Looking for something else? The [Ledger Enterprise CLI](https://help.enterprise.ledger.com/api-documentation-v2/guides/develop-with-ai) covers institutional, policy-enforced workflows. The [Ledger Enterprise Multisig CLI](https://help.multisig.ledger.com/guides/cli-guides) 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. ```bash 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**. | 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 ```bash pnpm add -g @ledgerhq/wallet-cli ``` ### npm ```bash npm i -g @ledgerhq/wallet-cli ``` ### yarn ```bash yarn global add @ledgerhq/wallet-cli ``` ### bun ```bash bun add -g @ledgerhq/wallet-cli ``` ```bash wallet-cli --version wallet-cli v2.1.0 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 skill Agent skill commands (list, retrieve, install, doctor) 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. Since wallet-cli 2.1.0 the skill ships embedded in the binary, so the CLI installs it for you: ```bash # Install the embedded skill into your agent's skills directory wallet-cli skill install --agent cursor # also: claude, codex, or generic "agents" # Detect drift between an installed skill and the one in your binary wallet-cli skill doctor ``` If you have not installed the CLI yet, pull the skill from the repository instead: ```bash 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. ```bash # 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