Installation
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​
- v0.11 (rgb-cmd)
- v0.12 (rgb-wallet)
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 --locked 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.
rgb-wallet 0.12.0-rc.3 was published on 2025-07-15 from RGB-WG/rgb. It is a release candidate, and no later release exists as of 2026-10-21 (crates.io). Always give --version: a plain cargo install rgb-wallet installs the last stable version, 0.10.9, an old RGB v0.10 release.
cargo install --locked rgb-wallet --version 0.12.0-rc.3
rgb --help
rgb init
This rgb has no --version flag, so use --help to check the install. rgb init creates the data directory. Every other command refuses to run until the directory exists.
Defaults: the data directory is ~/.local/share/rgb on Linux (or $XDG_DATA_HOME/rgb; env RGB_DATA_DIR). The network is testnet4 (env RGB_NETWORK). All test networks share the subdirectory bitcoin.testnet.
With -n bitcoin, rgb-wallet 0.12.0-rc.3 panics with "Non-testnet networks are not yet supported" on every command that loads contracts, such as contracts or issue (cli/src/args.rs:137). init, create and wallets still run, so the refusal comes late. Use it with testnet, signet or regtest only.
Known rc.3 bugs
rgb create <name> …writes the wallet to<data>/<name>, but every other command loads<data>/<name>.wallet(cli/src/exec.rs:104vscli/src/args.rs). Name the wallet with the suffix, as inrgb create --wpkh alice.wallet …, and then refer to it as-w alice. The bug is still onmaster. Reported upstream: RGB-WG/rgb#323.- The Electrum environment variable is spelled
ELECRTUM_SERVER(cli/src/opts.rs:42). SettingELECTRUM_SERVERhas no effect. Pass--electrum=<URL>instead. Reported upstream: RGB-WG/rgb#322.
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. Give a full URL with the network already in it.
- Line A: a bare
--electrumusesmycitadel.io:50001, and a bare--esplorauseshttps://mempool.space/{network}/api, with{network}replaced by the network name (cli/src/args.rs,resolver). - Line B: a bare
--electrumuses the placeholderexample.com:50001, so always give a URL. A bare--esplorauseshttps://blockstream.info/{network}/api. In 0.11.1,{network}is replaced only when the wallet syncs (bp-wallet0.11.1-alpha.2src/cli/args.rs,indexer). The RGB resolver used byvalidate,acceptand contractimportgets the URL unchanged (rgb-cmdsrc/args.rs,resolver), so a URL that still contains{network}breaks those commands. The Electrum environment variable inbp-wallet0.11.1-alpha.2 has the same typo,ELECRTUM_SERVER. Reported upstream: rgb-api#14.
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 isn't on 0.11.1 final: demo.sh installs rgb-cmd 0.11.1-rc.7 (RGB_CMD_VER), and the README says it is "based on RGB version 0.11.1 RC 6" and installs rc.6 in its manual steps. The quick start walks through the manual version.
Libraries​
- v0.11 (rgb-cmd)
- v0.12 (rgb-wallet)
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"
As of 2026-10-21, a fresh cargo build stops with failed to select a version for the requirement `secp256k1 = "^0.32.0-beta.2"` : rgb-consensus 0.11.1-rc.11, which rgb-lib pins, needs that version, and it has been yanked from crates.io. Cargo still uses a yanked version that is already in Cargo.lock, so start from rgb-lib's lock file. In your project directory, run curl -LO https://raw.githubusercontent.com/RGB-Tools/rgb-lib/0.3.0-beta.7/Cargo.lock before the first build.
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.
rgb-lib 0.3.0-beta.7 still depends on rgb-ops 0.11.1-rc.11 and the strict libraries 1.0.2 (rgb-lib Cargo.toml), while rgb-cmd 0.11.1 uses 1.0.4 and 0.11.2-rc.1 uses 1.0.5 (release notes). rgb-lib's next branch moves to 0.11.2-rc.1, unreleased as of 2026-10-21.
API docs: docs.rs/rgb-lib builds. As of 2026-10-21, docs.rs failed to build rgb-api and rgb-ops 0.11.1, so run cargo doc --open in your project or read the source on GitHub. rgb-consensus and rgb-invoicing 0.11.1 do build.
The Rust runtime that the CLI uses is rgb-runtime (library name rgbp), built on rgb-std. Both are release candidates, so Cargo needs an exact pre-release requirement. A plain "0.12" doesn't match them.
[dependencies]
rgb-runtime = "=0.12.0-rc.3"
rgb-std = "=0.12.0-rc.3"
rgb-core 0.12.0 (final, 2025-07-10) comes in as a dependency. There are no bindings for other languages. API docs are on docs.rs/rgb-runtime and docs.rs/rgb-std.
Next steps​
- Quick start: issue and transfer a test asset.
- Testing: regtest stacks for your own project.
- CLI references: v0.11 and v0.12.