Skip to main content

Commands Reference

Complete reference for all Privacy Boost CLI commands.

Global Options

Available for all commands:
privacy-boost [OPTIONS] <COMMAND>
privacy-boost <COMMAND> [OPTIONS]

Options:
  -n, --network <PRESET>       Network preset (local, op-sepolia)
  -c, --config <FILE>          Configuration file path
  -k, --private-key <KEY>      Private key (hex string, with or without 0x prefix)
      --indexer-url <URL>      Indexer URL (overrides config)
      --prover-url <URL>       Prover URL (overrides config)
      --rpc-url <URL>          RPC URL (overrides config)
      --chain-id <ID>          Chain ID (overrides config)
      --shield-contract <ADDR> Shield contract address (overrides config)
      --weth-contract <ADDR>   WETH contract address (overrides config)
  -o, --output <FORMAT>        Output format: json, text (default: text)
  -h, --help                   Print help
  -V, --version                Print version

Configuration Commands

init

Initialize a configuration file at ~/.privacy-boost/config.toml.
privacy-boost init [OPTIONS]
Options:
  • -n, --network <PRESET> - Network preset to use (default: local)
If a config file already exists, the command prints a warning and does nothing. Delete the existing file first to reinitialize. You can also import an existing config file:
privacy-boost init --config /path/to/my-config.toml
Examples:
# Initialize with local dev defaults
privacy-boost init

# Initialize with OP Sepolia preset
privacy-boost init --network op-sepolia

# Import an existing config as the default
privacy-boost init --config ~/my-project-config.toml

Authentication Commands

login

Connect wallet, derive privacy keys, and authenticate with the backend. Saves the session so future commands don’t require --private-key.
privacy-boost login --private-key <KEY>
Examples:
# Using flag
privacy-boost login --private-key 0x...

# Using environment variable
export PRIVATE_KEY="0x..."
privacy-boost login
Output:
Logged in!
  Wallet Address:  0x1234...5678
  Privacy Address: 0x9abc...def0
  MPK:             0xfedc...ba98

Session saved! Future commands won't require --private-key.

logout

Clear saved session.
privacy-boost logout

sessions

List saved sessions and their expiry status.
privacy-boost sessions

status

Show current connection and authentication status.
privacy-boost status
Output:
Status
  Connected:     Yes
  Authenticated: Yes
  Wallet Address:  0x1234...5678
  Privacy Address: 0x9abc...def0

Balance Commands

balance

Query shielded balance for a specific token.
privacy-boost balance --token <ADDRESS>
Options:
  • -t, --token <ADDRESS> - Token contract address (use 0x0 for ETH)
Examples:
privacy-boost balance --token 0x4200000000000000000000000000000000000006

balances

Query all token balances.
privacy-boost balances

Vault Commands

deposit

Deposit tokens into the shielded pool.
privacy-boost deposit [OPTIONS]
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei
  • --human - Parse amount as human-readable (e.g., 1.5 instead of wei)
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:
# Deposit in wei
privacy-boost deposit --token $WETH --amount 1000000000000000000

# Deposit in human-readable format
privacy-boost deposit --token $WETH --amount 1.0 --human

withdraw

Withdraw tokens from the shielded pool to a public address.
privacy-boost withdraw [OPTIONS]
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei
  • -r, --recipient <ADDRESS> - Recipient Ethereum address (required)
  • --human - Parse amount as human-readable
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:
privacy-boost withdraw \
  --token $WETH \
  --amount 0.5 \
  --recipient 0x1234... \
  --human

send

Send a private transfer to a privacy address or Ethereum address.
privacy-boost send [OPTIONS]
Options:
  • -t, --token <ADDRESS> - Token contract address (required)
  • -a, --amount <VALUE> - Amount in wei
  • -r, --recipient <ADDRESS> - Recipient privacy address (194 chars) or Ethereum address (42 chars)
  • --human - Parse amount as human-readable
  • --decimals <N> - Decimals for human-readable parsing (default: 18)
Examples:
privacy-boost send \
  --token $WETH \
  --amount 0.1 \
  --recipient 0x[194-char-privacy-address] \
  --human

History Commands

history

View transaction history.
privacy-boost history [OPTIONS]
Options:
  • -t, --tx-type <TYPE> - Filter by type (shield, unshield, transact)
  • --token <ADDRESS> - Filter by token address
  • -l, --limit <N> - Maximum number of results
Examples:
# All transactions
privacy-boost history

# Deposits only
privacy-boost history --tx-type shield

# JSON output with limit
privacy-boost history --limit 10 --output json

Utility Commands

search-address

Look up a user’s identity by Ethereum address or MPK.
privacy-boost search-address <IDENTIFIER>
Arguments:
  • <IDENTIFIER> - Ethereum address (42 chars) or MPK (66 chars)
Examples:
privacy-boost search-address 0x1234567890123456789012345678901234567890

version

Show version information.
privacy-boost version

Environment Variables

VariableDescription
PRIVATE_KEYWallet private key
PRIVACY_BOOST_NETWORKNetwork preset
PRIVACY_BOOST_CONFIGConfig file path
PRIVACY_BOOST_INDEXER_URLIndexer URL
PRIVACY_BOOST_PROVER_URLProver URL
PRIVACY_BOOST_RPC_URLRPC URL
PRIVACY_BOOST_CHAIN_IDChain ID
PRIVACY_BOOST_SHIELD_CONTRACTShield contract address
PRIVACY_BOOST_WETH_CONTRACTWETH contract address

Next Steps