Skip to main content
The Crunch Protocol CLI packages:
  • @crunchdao/coordinator-cli
  • @crunchdao/cruncher-cli

Command-Line Options

These options can be used with any CLI command:

Network Options

  • -n, --network <network> - Solana network to connect to
    • Values: localnet, devnet, mainnet
    • Default: Uses value from global configuration

Wallet Options

  • -w, --wallet <wallet> - Path to wallet keypair file
    • Format: Absolute or relative file path
    • Default: Uses value from global configuration

Logging Options

  • -l, --loglevel <level> - Set logging verbosity
    • Values: debug, info, warn, error
    • Default: Uses value from global configuration

Usage Examples

Basic Usage

# Use default configuration
crunch-coordinator register "My Organization"

# Override network for single command
crunch-coordinator register "My Organization" --network devnet

Development and Testing

# Enable debug logging for troubleshooting
crunch-coordinator get-config --loglevel debug

Global Configuration

Instead of specifying options repeatedly, you can set them globally using the configuration system:
# Coordinator CLI configuration
crunch-coordinator config set network devnet
crunch-coordinator config set wallet accounts/my-keypair.json
crunch-coordinator config set loglevel info

# View current configuration
crunch-coordinator config show

Network Endpoints

Each network option connects to specific Solana RPC endpoints:
NetworkEndpointUse Case
localnethttp://127.0.0.1:8899Local development and testing
devnethttps://api.devnet.solana.comStaging and integration testing
mainnethttps://api.mainnet-beta.solana.comProduction deployment

Option Precedence

Configuration values are resolved in this order (highest to lowest priority):
  1. Command-line flags (--network devnet)
  2. Active configuration (values in CLI config files)
  3. Default values (built-in CLI defaults)

Security Considerations

Wallet Security

  • Store keypair files in secure, encrypted locations
  • Use appropriate file permissions (recommended: chmod 600)
  • Never commit wallet files to version control
  • Use different wallets for different environments

Network Verification

Always verify you’re connected to the intended network:
# Check current configuration before critical operations
crunch-coordinator config show

Troubleshooting

Common Issues

  1. “Insufficient SOL for transaction”
    # Check wallet balance
    solana balance --keypair path/to/wallet.json
    
    # Airdrop SOL on devnet
    solana airdrop 2 --keypair path/to/wallet.json --url devnet
    

Debug Mode

Enable debug logging to troubleshoot issues:
# Temporary debug mode
crunch-coordinator get-config --loglevel debug

# Permanent debug mode
crunch-coordinator config set loglevel debug