Skip to main content

CLI Quickstart

Get started with Privacy Boost CLI in 5 minutes.

Installation

From Binary

Head to https://github.com/testinprod-io/privacy-boost/releases to download the latest release for your platform.
# macOS (Apple Silicon)
curl -L https://github.com/testinprod-io/privacy-boost/releases/latest/download/privacy-boost-darwin-arm64.tar.gz | tar xz
sudo mv privacy-boost /usr/local/bin/

# macOS (Intel)
curl -L https://github.com/testinprod-io/privacy-boost/releases/latest/download/privacy-boost-darwin-amd64.tar.gz | tar xz
sudo mv privacy-boost /usr/local/bin/

# Linux (x86_64)
curl -L https://github.com/testinprod-io/privacy-boost/releases/latest/download/privacy-boost-linux-amd64.tar.gz | tar xz
sudo mv privacy-boost /usr/local/bin/

# Linux (ARM64)
curl -L https://github.com/testinprod-io/privacy-boost/releases/latest/download/privacy-boost-linux-arm64.tar.gz | tar xz
sudo mv privacy-boost /usr/local/bin/

Quick Example

1. Login with Private Key

Create a configuration file at ~/.privacy-boost/config.toml:
# Network configuration
indexer_url = "https://test-api.privacy-boost.sunnyside.io/indexer"
prover_url = "https://test-api.privacy-boost.sunnyside.io/prover"
chain_id = 11155420
shield_contract = "0xB22fD661b322F10d4B7cd0cFcb9578C485423119"
weth_contract = "0x4200000000000000000000000000000000000006"
rpc_url = "https://eth.llamarpc.com"
timeout_secs = 30
# Set your private key (do not use in production scripts!)
export PRIVATE_KEY="0x..."

# Login (connects wallet, derives privacy keys, authenticates)
privacy-boost login

2. Check Status

# View connection status and privacy address
privacy-boost status
Output:
Status
  Connected:     Yes
  Authenticated: Yes
  Wallet Address:  0x1234...5678
  Privacy Address: 0x9abc...def0

3. Check Balance

# Check shielded balance for a token
privacy-boost balance --token 0x...token-address

# Check all balances
privacy-boost balances

4. Deposit

# Deposit tokens (amount in wei)
privacy-boost deposit \
  --token 0x...token-address \
  --amount 1000000000000000000

# Deposit with human-readable amount
privacy-boost deposit \
  --token 0x...token-address \
  --amount 1.0 \
  --human

5. Transfer

# Send privately to another privacy address
privacy-boost send \
  --recipient 0x04...recipient-privacy-address \
  --token 0x...token-address \
  --amount 500000000000000000

6. Withdraw

# Withdraw to a public address
privacy-boost withdraw \
  --token 0x...token-address \
  --amount 250000000000000000 \
  --recipient 0x...recipient-address

7. View History

# View recent transactions
privacy-boost history

# Filter by type
privacy-boost history --tx-type shield
privacy-boost history --tx-type transact
privacy-boost history --tx-type unshield

Configuration File

Create ~/.privacy-boost/config.toml:
indexer_url = "https://test-api.privacy-boost.sunnyside.io/indexer"
prover_url = "https://test-api.privacy-boost.sunnyside.io/prover"
chain_id = 11155420
shield_contract = "0xB22fD661b322F10d4B7cd0cFcb9578C485423119"
weth_contract = "0x4200000000000000000000000000000000000006"
Or initialize with a preset:
privacy-boost init --network op-sepolia

Session Management

# Sessions are saved automatically on login.
# List saved sessions:
privacy-boost sessions

# Logout and clear session:
privacy-boost logout

Scripting Example

#!/bin/bash
set -e

# Login (uses PRIVATE_KEY env var automatically)
privacy-boost login --network op-sepolia

# Deposit if balance is low
BALANCE=$(privacy-boost balance --token "$TOKEN" --output json | jq -r '.shielded_balance')
if [ "$BALANCE" -lt "1000000000000000000" ]; then
    privacy-boost deposit --token "$TOKEN" --amount 10000000000000000000
fi

# Daily transfer
privacy-boost send \
  --recipient "$RECIPIENT" \
  --token "$TOKEN" \
  --amount 100000000000000000

echo "Daily transfer complete!"

JSON Output

Use --output json (or -o json) for machine-readable output:
# Get balance as JSON
privacy-boost balance --token 0x... --output json

# Parse with jq
privacy-boost balance --token 0x... -o json | jq '.shielded_balance'

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