> For the complete documentation index, see [llms.txt](https://help.multisig.ledger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.multisig.ledger.com/guides/cli-guides/installation.md).

# Installation

### What you'll learn

* Install `lem` globally or invoke it ad-hoc with `npx`.
* Verify the installation.
* Set up the prerequisites for hardware signing on a Ledger device.

### Prerequisites

* **Node.js 22+** (run node --version to check).
* **macOS, Linux, or Windows**. On Linux, USB access to a Ledger device requires the [Ledger udev rules](https://support.ledger.com/article/115005165269-zd).
* **Ledger device** with the Ethereum app installed (only required when signing with hardware. Read-only commands like `lem safe info` work without one).

### Install

**Global install (recommended)**

```
npm install -g les-multisig-cli
```

After install, `lem` is available on your `$PATH`.

```
lem --version
```

**npx (no install)**

```
npx les-multisig-cli@latest --version
```

Use this for one-off invocations or CI jobs that don't want to maintain a global install.

**Build from source**

For contributors or anyone who needs to run an unreleased build:

```
git clone https://github.com/LedgerHQ/les-multisig.git
cd les-multisig
pnpm install
pnpm --filter les-multisig-cli build
ln -sf "$(pwd)/packages/cli/dist/index.mjs" ~/.local/bin/lem
```

### Verify

Run any read-only command. No device or config is required:

```
lem --help
lem safe scan --help
```

`lem --version` should print the installed CLI version.

### Ledger device setup

Before running commands that sign or execute transactions:

1. Plug your Ledger device into a USB port.
2. Unlock it with your PIN.
3. Open the **Ethereum** app on the device.
4. Make sure **Blind signing** is enabled if you plan to sign payloads that contain calldata the Ethereum app cannot decode natively. Ledger Multisig surfaces clear-signing where it can.

Your device must be unlocked and on the Ethereum app each time `lem` talks to it.

### Tips and pitfalls

* **No device, no problem.** Read-only commands (`safe scan`, `safe info`, `safe balances`, `safe nonce`, `tx list`, `tx show`) do not need a connected device or a `lem connect` session.
* **Don't run as root.** USB access on Linux should be granted via udev rules, not by running `lem` with `sudo`.
* **Conflicting installs.** If `lem --version` doesn't match what you just installed, check for a stale build symlinked into `~/.local/bin` or another directory ahead of npm's global bin on `$PATH`.

### Next steps

* **Quickstart**
* **Configuring a signer**
