Skip to main content

Installation

Applies to both RGB lines

Each line has its own CLI, crates and data directory, so the tabs below are separate. See Two RGB lines for which one to use.

Both lines install a binary called rgb, and the two binaries are incompatible. Install only one per PATH, or use cargo install --root <dir> to keep them apart.

Rust toolchain​

Both CLIs are built from source with Cargo. Both declare rust-version = "1.85.0" (Cargo.toml of RGB-WG/rgb at v0.12.0-rc.3 and of rgb-protocol/rgb-api at 0.11.1). rgb-lib needs Rust 1.88.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update stable

Command-line tool​

rgb-cmd 0.11.1 was published on 2026-09-16 from rgb-protocol/rgb-api.

cargo install --locked rgb-cmd --version 0.11.1
rgb --version

rgb --version prints rgb-cmd 0.11.1.

rgb-cmd does RGB work only. To sign transactions you need a Bitcoin wallet that holds the keys. The official sandbox uses bp-wallet for this, installing its bp and bp-hot tools:

cargo install bp-wallet --version 0.11.1-alpha.2 --root ./bp-wallet --features=cli,hot

Defaults: the data directory is ~/.lnp-bp (env LNPBP_DATA_DIR) and the network is testnet3 (env LNPBP_NETWORK). Data goes in a per-network subdirectory, such as ~/.lnp-bp/regtest. There is no init step: the directory is created on first use.

Blockchain access​

Neither CLI talks to Bitcoin Core RPC. Both read the chain through an indexer that you choose per command: --electrum=<URL> or --esplora=<URL>, and on Line B also --mempool=<URL>. The = is required. In an Esplora or Mempool URL, {network} is replaced with the network name.

  • Line A: a bare --electrum uses mycitadel.io:50001, and a bare --esplora uses https://mempool.space/{network}/api.
  • Line B: a bare --electrum uses the placeholder example.com:50001, so always give a URL. A bare --esplora uses https://blockstream.info/{network}/api. The Electrum environment variable in bp-wallet 0.11.1-alpha.2 has the same typo, ELECRTUM_SERVER.

For local testing, run regtest with an Electrum server. rgb-sandbox (below) packages bitcoind and electrs with Docker Compose.

Line B: regtest sandbox​

rgb-protocol/rgb-sandbox is the official regtest demo. It needs git, cargo, Docker with Compose, and the SQLite development headers (libsqlite3-dev).

git clone https://github.com/rgb-protocol/rgb-sandbox --recurse-submodules --shallow-submodules
cd rgb-sandbox
bash demo.sh

demo.sh installs bp-wallet and rgb-cmd into the project directory, starts the services, issues an asset, runs transfers and cleans up. As of its last commit (2026-09-22), the sandbox README says it is "based on RGB version 0.11.1 RC 6", not the 0.11.1 final this site is pinned to. The quick start walks through the manual version.

Libraries​

Wallets and apps: use rgb-lib (RGB-Tools). It handles Bitcoin walleting (through BDK) and RGB together, and has official bindings for Kotlin, Swift, Python, Node.js and C/C++ (bindings list). Version 0.3.0-beta.7 (2026-07-17) is built on rgb-ops 0.11.1-rc.11 and needs Rust 1.88.

[dependencies]
rgb-lib = "=0.3.0-beta.7"
Use each wallet on one device only

The rgb-lib README warns that using the same mnemonic on more than one device "can lead to RGB asset loss due to improper UTXO management".

Lower-level crates, the ones rgb-cmd is built from:

[dependencies]
rgb-api = "=0.11.1"
rgb-ops = "=0.11.1"
rgb-consensus = "=0.11.1"
rgb-schemas = "=0.11.1"

Pin these exactly. 0.11.2 (release candidate since 2026-10-09) changes the consignment format. API docs are on docs.rs/rgb-api and docs.rs/rgb-lib.

Next steps​