Operate the RARE Protocol from a terminal or TypeScript.
The rare CLI covers collection deployment, minting, metadata, creator settings, direct-sale releases, marketplace actions, swaps, bridging, search, offline utilities, an SDK, and an MCP server.
Install and configure
npm install -g @rareprotocol/rare-cli@2.0.0
rare --help
rare configure --chain sepolia --private-key-ref op://Private/rare-sepolia/private-key
rare configure --chain sepolia --rpc-url https://your-rpc.example
rare configure --show
rare wallet addressRequires Node.js 22+. Configuration lives at ~/.rare/config.json. Prefer 1Password references for private keys, RPC credentials, and optional Uniswap API keys instead of plaintext values.
Collections and minting
mainnet or base explicitly and approve the signing action. Studio billing runs on Ethereum, but it never decides the chain for your NFT project.rare collection deploy erc721 "My Collection" "MC"
rare collection deploy lazy-erc721 "My Release" "MR" --max-tokens 1000
rare collection deploy lazy-batch-mint "My Lazy Collection" "MLC"
rare collection mint --contract 0x... --name "My NFT" --description "..." --image ./art.png
rare collection mint-batch --contract 0x... --base-uri ipfs://... --amount 100
rare collection prepare-lazy-mint --contract 0x... --base-uri ipfs://... --amount 100Releases and markets
rare listing release configure --contract 0x... --price 0.1 --max-mints 5
rare listing release mint --contract 0x... --quantity 1
rare listing create --contract 0x... --token-id 1 --price 1.0
rare listing buy --contract 0x... --token-id 1 --price 1.0
rare offer create --contract 0x... --token-id 1 --price 0.5
rare auction create --contract 0x... --token-id 1 --price 0.1 --end-time 1778586400The CLI includes create, inspect, accept, cancel, bid, settle, and batch variants where supported by deployed contracts. It also supports RareMinter release allowlists and per-wallet limits, Liquid Editions, supported ETH/USDC/RARE or raw ERC-20 currencies, swap quotes and execution, and bridge flows.
Read, search, and build
rare search nfts --query "portrait"
rare search nfts --mine
rare search collections
rare nft get --contract 0x... --token-id 1
rare user get 0x...
rare currencies --chain mainnet
rare mcp serve # read-only tools
rare mcp serve --allow-writesSearch, NFT, user, currency, event, metadata/media, and Merkle-proof utilities use SuperRare APIs where appropriate. Offline utility commands are available for Merkle trees and proofs.
TypeScript SDK
npm install @rareprotocol/rare-cli@2.0.0 viem
import { createRareClient } from "@rareprotocol/rare-cli/client";
import { contractAddresses, supportedChains } from "@rareprotocol/rare-cli/contracts";
import { buildUtilsTree, getUtilsTreeProof } from "@rareprotocol/rare-cli/utils";
const rare = createRareClient({ publicClient, walletClient });
