@rareprotocol/rare-cli v1.2.2Node.js 22+Updated from 0e7a451

Rare CLI documentation

Command-line reference for deploying collections, minting NFTs, configuring RareMinter releases, running marketplace flows, bridging RARE, swapping tokens, and using the SDK or MCP server.

Install

npm install -g @rareprotocol/rare-cli

The package exposes the global rare command and requires Node.js 22 or newer. Verify the install with:

rare --help
The npm package also ships SDK exports for application code. You can install the same package locally and import the client, contract metadata, or pure utility helpers without using the global CLI.
npm install @rareprotocol/rare-cli viem

import { createRareClient } from "@rareprotocol/rare-cli/client";
import { contractAddresses, supportedChains } from "@rareprotocol/rare-cli/contracts";
import { buildUtilsTree, getUtilsTreeProof } from "@rareprotocol/rare-cli/utils";

Configure

Wallet

Store a private key, a 1Password reference, or generate a wallet.

Network

Use --chain or --chain-id. The default falls back to Sepolia.

Output

Pass --json globally for structured automation output.
# Store a private key in ~/.rare/config.json
rare configure --chain sepolia --private-key 0xYourPrivateKeyHere

# Prefer a 1Password secret reference when available
rare configure --chain sepolia \
  --private-key-ref op://Private/rare-sepolia/private-key

# Generate a new wallet and save it
rare wallet generate --chain sepolia --save
rare wallet address --chain sepolia

# Set RPC and Uniswap fallback routing credentials
rare configure --chain sepolia --rpc-url https://your-rpc-endpoint.com
rare configure --chain sepolia --uniswap-api-key-ref op://Private/uniswap/api-key

# Inspect or delete local config
rare configure --show
rare configure delete --yes

Plaintext private keys are written to ~/.rare/config.json. Secret references are resolved only when signing is needed.

Collections and Minting

The current CLI namespaces deploy and mint operations under rare collection. Use standard ERC-721 collections for upfront minting, lazy ERC-721 for RareMinter releases, and lazy batch mint collections for prepared collector minting.

# Standard Sovereign ERC-721 collection
rare collection deploy erc721 "My Collection" "MC"
rare collection deploy erc721 "My Collection" "MC" --max-tokens 1000

# Lazy ERC-721 collection for RareMinter release flows
rare collection deploy lazy-erc721 "My Release" "MR" --max-tokens 1000
rare collection deploy lazy-erc721 "Guarded Release" "GR" \
  --max-tokens 1000 \
  --contract-type lazy-royalty-guard

# Lazy batch mint collection
rare collection deploy lazy-batch-mint "My Lazy Collection" "MLC"
rare collection deploy lazy-batch-mint "My Lazy Collection" "MLC" --max-tokens 100
# Upload media to IPFS and mint in one step
rare collection mint \
  --contract 0x... \
  --name "My NFT" \
  --description "A description" \
  --image ./art.png

# Mint with an existing metadata URI
rare collection mint --contract 0x... --token-uri ipfs://Qm...

# Batch mint token IDs from baseUri/tokenId.json
rare collection mint-batch --contract 0x... --base-uri ipfs://... --amount 100

# Prepare lazy mint inventory, optionally approving a minter
rare collection prepare-lazy-mint --contract 0x... --base-uri ipfs://... --amount 100
rare collection prepare-lazy-mint --contract 0x... --base-uri ipfs://... --amount 100 --minter 0x...

Collection inspection

rare collection get <id>
rare collection list --account <address>
rare collection creator --contract <address> --token-id <id>
rare collection royalty status --contract <address> --token-id <id>

Metadata and royalties

rare collection metadata status --contract <address>
rare collection metadata update-base-uri --contract <address> --base-uri <uri>
rare collection metadata update-token-uri --contract <address> --token-id <id> --token-uri <uri>
rare collection metadata lock-base-uri --contract <address>
rare collection royalty set-default-receiver --contract <address> --receiver <address>
rare collection royalty set-token-receiver --contract <address> --token-id <id> --receiver <address>

RareMinter Direct Sale Releases

After deploying and preparing a lazy collection, configure direct sale terms with listing release. Release configuration uses RareMinter and does not mint tokens until a buyer calls the release mint command.

rare listing release configure \
  --contract 0x... \
  --price 0.1 \
  --max-mints 5

# ERC20 currency, start time, and explicit payout splits
rare listing release configure \
  --contract 0x... \
  --price 100 \
  --currency rare \
  --start-time 2026-06-01T16:00:00Z \
  --max-mints 5 \
  --split 0x...artist=80 \
  --split 0x...collaborator=20

rare listing release status --contract 0x...
rare listing release status --contract 0x... --account 0x...
rare listing release mint --contract 0x... --quantity 1 --yes
# Build an allowlist artifact
rare listing release allowlist build \
  --input ./allowlist.csv \
  --output ./allowlist-artifact.json

# Configure the on-chain allowlist window
rare listing release allowlist set \
  --contract 0x... \
  --input ./allowlist-artifact.json \
  --end-time 2026-06-01T16:00:00Z

# Create a portable proof and mint during the allowlist window
rare listing release allowlist proof \
  --input ./allowlist-artifact.json \
  --account 0x... \
  --output ./proof.json

rare listing release mint --contract 0x... --quantity 2 --proof ./proof.json

# Optional creator-facing limits
rare listing release limits set-mint --contract 0x... --limit 2
rare listing release limits set-tx --contract 0x... --limit 1

Marketplace

Listings

rare listing create --contract 0x... --token-id 1 --price 1.0 --yes
rare listing create --contract 0x... --token-id 1 --price 100 --currency rare --target 0x...buyer
rare listing create --contract 0x... --token-id 1 --price 1.0 \
  --split 0xCollab=30 \
  --split 0xMyWallet=70 \
  --yes

rare listing buy --contract 0x... --token-id 1 --price 1.0 --yes
rare listing cancel --contract 0x... --token-id 1
rare listing status --contract 0x... --token-id 1
rare listing list --account 0x...

Offers

rare offer create --contract 0x... --token-id 1 --price 0.5 --yes
rare offer create --contract 0x... --token-id 1 --price 100 --currency usdc --yes
rare offer accept --contract 0x... --token-id 1 --price 0.5 \
  --split 0xCollab=30 \
  --split 0xMyWallet=70 \
  --yes

rare offer cancel --contract 0x... --token-id 1
rare offer status --contract 0x... --token-id 1
rare offer list --account 0x... --side maker

Auctions

# Reserve auction
rare auction create \
  --contract 0x... \
  --token-id 1 \
  --price 0.1 \
  --end-time 1778586400 \
  --yes

# Scheduled auction
rare auction create \
  --contract 0x... \
  --token-id 1 \
  --type scheduled \
  --start-time 1778500000 \
  --price 0.1 \
  --end-time 1778586400 \
  --yes

rare auction bid --contract 0x... --token-id 1 --price 0.5 --yes
rare auction settle --contract 0x... --token-id 1
rare auction cancel --contract 0x... --token-id 1
rare auction status --contract 0x... --token-id 1
rare auction list --account 0x... --side taker
Marketplace commands accept --currency for eth, rare, usdc, or an ERC20 address. Use rare currencies to inspect the chain-aware mapping.

Batch Marketplace and Merkle Tools

Batch listings, offers, and auctions operate on token Merkle roots, but you do not need to build the root yourself for the normal create flow. Batch create commands accept CSV or JSON token input directly and can register the batch config in one step.

# Register a batch listing directly from CSV
rare listing batch create \
  --input ./tokens.csv \
  --currency eth \
  --price 0.012 \
  --yes

# Optional: build reusable token tree and proof artifacts first
rare utils tree build --input batch-tokens.csv --chain-id 11155111 --output token-tree.json
rare utils tree proof --input token-tree.json --contract 0x... --token-id 1 --output proof.json
rare utils tree verify --input token-tree.json --contract 0x... --token-id 1 --proof proof.json

# Legacy-compatible proof helper for batch marketplace artifacts
rare utils merkle proof --input root.json --contract 0x... --token-id 1 --output proof.json

Use rare utils tree build when you want to inspect or save the token tree artifact, reuse the same root later, generate proofs offline, or separate building the root from registering the listing. It is not required before rare listing batch create --input ./tokens.csv.

Batch listings

rare listing batch create --input ./tokens.csv
rare listing batch create --input ./tokens.csv --currency eth --price 0.012 --yes
rare listing batch buy --proof ./proof.json --creator 0x...seller --currency eth --price 0.012 --yes
rare listing batch status --root ./root.json --creator 0x...seller
rare listing batch cancel --input ./root.json

Batch offers

rare offer batch create --input tokens.csv --price 1 --currency eth --end-time 1778586400 --yes
rare offer batch accept --creator 0x...buyer --contract 0x... --token-id 1 --root 0x... --yes
rare offer batch revoke --root 0x...
rare offer batch status --creator 0x... --root 0x...

Batch auctions

rare auction batch create --input tokens.csv --price 0.1 --end-time 1778586400 --yes
rare auction batch bid --creator 0x...seller --contract 0x... --token-id 1 --price 0.2 --yes
rare auction batch settle --contract 0x... --token-id 1
rare auction batch cancel --root 0x...

Liquid Editions, Bridge, and Swaps

Liquid Editions

For an end-to-end app scaffold, start with the liquid editions starter kit.

# Preview the generated curve without submitting
rare liquid-edition deploy multicurve "My Liquid Edition" "MLE" \
  --curve-preset medium-demand \
  --description "A liquid edition" \
  --image ./art.png \
  --preview

# Submit deployment
rare liquid-edition deploy multicurve "My Liquid Edition" "MLE" \
  --curve-preset medium-demand \
  --description "A liquid edition" \
  --image ./art.png \
  --yes

rare liquid-edition status --contract 0x...
rare liquid-edition token-uri --contract 0x...
rare liquid-edition set-render-contract --contract 0x... --render-contract 0x...

Bridge and swaps

# Bridge RARE between supported chains
rare bridge quote --amount 100 --destination-chain base
rare bridge send --amount 100 --destination-chain base --recipient 0x... --yes

# Quote and execute swaps
rare swap buy-token --token 0x... --amount-in 0.1 --quote-only
rare swap buy-token --token 0x... --amount-in 0.1 --slippage-bps 50 --yes
rare swap sell-token --token 0x... --amount-in 10 --quote-only
rare swap buy-rare --amount-in 0.1 --quote-only

# Execute a prebuilt raw liquid-router swap
rare swap tokens \
  --token-in 0x... \
  --amount-in 10 \
  --token-out 0x... \
  --min-amount-out 9.5 \
  --commands 0x... \
  --inputs-file ./router-inputs.json \
  --yes

MCP Server and SDK

MCP server

# Read-only Rare SDK tools
rare mcp serve

# Explicitly enable write-capable tools
rare mcp serve --allow-writes

# Inspect tools locally
npx @modelcontextprotocol/inspector rare mcp serve

SDK package subpaths

npm install @rareprotocol/rare-cli viem

import { createRareClient } from "@rareprotocol/rare-cli/client";
import { contractAddresses, supportedChains } from "@rareprotocol/rare-cli/contracts";
import { buildUtilsTree, getUtilsTreeProof } from "@rareprotocol/rare-cli/utils";

Supported Chains and Key Contracts

mainnet

1

Full protocol feature set

sepolia

11155111

Full protocol feature set

base

8453

Core, bridge, liquid, swap

base-sepolia

84532

Core, bridge, liquid, swap

Batch listing, batch offer, batch auction, RareMinter release, Liquid Edition, and swap flows are currently available on mainnet and sepolia. Base and Base Sepolia support the deployed contract families listed in the CLI contracts export.

Contract roles below are cross-checked against superrare/core commit f715b8a. The CLI's auction address points to SuperRareBazaar, the unified contract for listings, offers, and single-token auction flows.

ContractMainnetSepolia

Collection factory

Deploys standard Sovereign ERC-721 collections.

0xAe8E375a268Ed6442bEaC66C6254d6De5AeD4aB10x3c7526a0975156299ceef369b8ff3c01cc670523

Bazaar marketplace

Unified contract behind listings, offers, and single-token auctions.

0x6D7c44773C52D396F43c2D511B81aa168E9a7a420xC8Edc7049b233641ad3723D6C60019D1c8771612

RareMinter

Configures and mints direct-sale releases with allowlists and limits.

0x5fa112EFeD8297bec0010b312208d223E0cE891E0xd28Dc0B89104d7BBd902F338a0193fF063617ccE

Batch listings

Registers and fills Merkle-root fixed-price listings.

0x6a190885A806D39A0A8C348bfA1ac762D72E608d0xF2bE72d4343beD375Cb6d0E799a3c003163860e0

Batch offers

Creates and accepts Merkle-root offers over token sets.

0xe15cf80b25272ade261532efdb7912f9104851d40x371cca54ef859bb0c7b910581a528ee47773fd56

Batch auctions

Runs standard and Merkle-root auction flows with V2 market config.

0x71742c7196f1c334C4c038ce6dcDcEE98097F9Da0x293AE7701A7830B1d38A7608EdF86A106d9E2645

ERC20 approval manager

Handles ERC20 allowance flows for batch marketplace payments.

0xa837a7eAff154Ab837617Cf7250648D3Ec0A44360x4619eB29e84392CE91C27FC936A5c94d1D14b93f

ERC721 approval manager

Handles NFT approval flows for batch marketplace transfers.

0x4bb0Deea6d1A30C601338aAB776d394C2AE5c0F80x5fa0a461d3a2Ea3bFDf03e8BD37CAbB4ae84205E

Liquid factory

Deploys Liquid Edition multicurve contracts.

0x25f993C222fE5e891128a782A5168f1C786295400xb1777091C953fa2aC1fD67f2b3e2f61343F5Ce5e

RARE bridge

Sends RARE across supported CCIP routes.

0x88135dd0e7a8a2e42272dda89849a997ce2e83f70xdC168291658f6C5F1D0b33E573c4d289DCA9dD08

Best Practices

Use Sepolia first

Dry-run collection, release, marketplace, and batch workflows before moving to mainnet.

Prefer secret references

Use 1Password refs for private keys and API keys when possible. Plaintext config lives in ~/.rare/config.json.

Confirm write commands intentionally

Commands that approve, buy, bid, list, bridge, swap, or deploy may prompt. Pass --yes only in trusted automation.

Use exact price assertions

Offer accepts, listing buys, and bids use the provided price as a safety assertion against stale state.

Keep batch artifacts

Store token trees, roots, proofs, and allowlist artifacts with your release operations.

Use JSON for automation

The global --json flag is the cleanest interface for scripts, MCP clients, and CI workflows.

Command Reference

Core commands

rare configure [options]
rare configure delete [--yes]
rare wallet generate [--save]
rare wallet address
rare currencies
rare status --contract <address> [--token-id <id>]
rare import erc721 --contract <address>

Primary namespaces

rare collection ...
rare listing ...
rare offer ...
rare auction ...
rare liquid-edition ...
rare bridge ...
rare swap ...
rare search ...
rare utils ...
rare mcp serve
This page reflects upstream 0e7a451 from May 29, 2026. For the exhaustive generated Commander map, read rare-cli-commands.md.
v1.2.2|MIT License|Requires Node.js 22+|Install CLI|GitHub