Skip to main content

Installation

npm install -g @crunchdao/cruncher-cli

Usage

crunch-cruncher <command> [options] [arguments]

Cruncher Commands

cruncher create

Create a new Cruncher profile. Usage:
crunch-cruncher create <name>
Arguments:
  • name - Name of the cruncher
Example:
crunch-cruncher create "CruncherX"
Description: Creates a new Cruncher profile with the specified name.

cruncher register

Register as a Cruncher for a specific competition. Usage:
crunch-cruncher register <crunchName> <cruncherName>
Arguments:
  • crunchName - Name of the crunch competition
  • cruncherName - Name of the Cruncher to register
Example:
crunch-cruncher register "iris_classifier" "CruncherX"
Description: Registers the current wallet as a Cruncher for the specified competition with the given Cruncher name.

cruncher get-address

Get the address of a Cruncher by name. Usage:
crunch-cruncher get-address <name>
Arguments:
  • name - Name of the cruncher
Example:
crunch-cruncher get-address "CruncherX"
Description: Returns the Solana public key address associated with the specified Cruncher name.

cruncher get

Get Cruncher information by wallet address. Usage:
crunch-cruncher get [walletAddress]
Arguments:
  • walletAddress - Wallet address of the Cruncher (optional, defaults to current wallet)
Examples:
crunch-cruncher get "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
# Or get your own Cruncher info:
crunch-cruncher get
Description: Retrieves detailed information about a Cruncher using their wallet address.

cruncher get-claim-record

Get claim record for a specific Cruncher in a competition. Usage:
crunch-cruncher get-claim-record <crunchName> <cruncherWalletAddress>
Arguments:
  • crunchName - Name of the crunch competition
  • cruncherWalletAddress - Wallet address of the cruncher
Example:
crunch-cruncher get-claim-record "iris_classifier" "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
Description: Retrieves the claim record showing what rewards have been claimed by the specified cruncher.

cruncher get-claimable-checkpoints

Get claimable checkpoints for the current wallet holder. Usage:
crunch-cruncher get-claimable-checkpoints <crunchName>
Arguments:
  • crunchName - Name of the crunch competition
Example:
crunch-cruncher get-claimable-checkpoints "iris_classifier"
Output Example:
[
  {
    "amount": 1000,
    "currency": "USDC",
    "timestamp": 1640995200,
    "checkpointIndex": 1,
    "claimed": false
  }
]
Description: Shows all available checkpoints that can be claimed by the current wallet holder for the specified competition.

Model Commands

model add

Submit a new model to a competition. Usage:
crunch-cruncher model add <crunchName> <modelId> <submissionId> <resourceId> <hardwareType> <desiredState> [--skip-signature]
Arguments:
  • crunchName - Name of the crunch competition
  • modelId - Unique model identifier
  • submissionId - Submission identifier
  • resourceId - Resource identifier
  • hardwareType - Type of hardware used
  • desiredState - Desired state of the model
Options:
  • --skip-signature - Skip model signing (optional)
Example:
crunch-cruncher model add "iris_classifier" "model_123" "sub_456" "res_789" "GPU" "ACTIVE"
Description: Submits a new model to the specified competition with the given parameters.

model update

Update model results with new data. Usage:
crunch-cruncher model update <crunchName> <modelId> <updateData> [--skip-signature]
Arguments:
  • crunchName - Name of the crunch competition
  • modelId - Model identifier to update
  • updateData - Update data as JSON string
Options:
  • --skip-signature - Skip model signing (optional)
Example:
crunch-cruncher model update "iris_classifier" "model_123" '{"accuracy": 0.95, "loss": 0.05}'
Description: Updates an existing model with new results or metadata.

model get

Get detailed information about a specific model. Usage:
crunch-cruncher model get <modelId>
Arguments:
  • modelId - Model identifier
Example:
crunch-cruncher model get "model_123"
Description: Retrieves detailed information about the specified model including its current state and results.

model get-crunch-models

Get all models submitted to a specific competition. Usage:
crunch-cruncher model get-crunch-models <crunchName>
Arguments:
  • crunchName - Name of the crunch competition
Example:
crunch-cruncher model get-crunch-models "iris_classifier"
Description: Returns a list of all models that have been submitted to the specified competition.

Claim Commands

claim

Claim available checkpoint rewards. Usage:
crunch-cruncher claim <crunchName>
Arguments:
  • crunchName - Name of the crunch competition
Example:
crunch-cruncher claim "iris_classifier"
Description: Claims all available checkpoint rewards for the current wallet holder in the specified competition.

Configuration

The CLI uses a configuration system for managing settings. Use the config commands to manage your configuration:
# Set configuration values
crunch-cruncher config set <key> <value>

# Show current configuration
crunch-cruncher config show

# Use a specific profile
crunch-cruncher config use-profile <profile>

Configuration Options

  • network (string) - Solana network (localnet, devnet, mainnet)
  • wallet (string) - Path to wallet keypair file
  • loglevel (string) - Log level (debug, info, warn, error)

Default Configuration

{
  "network": "localnet",
  "wallet": "./accounts/coordinator.json",
  "loglevel": "info"
}

Command Reference Summary

CommandDescription
getGet crunch account details
cruncher createCreate a Cruncher profile
cruncher registerRegister as a Cruncher for a competition
cruncher get-addressGet Cruncher address by name
cruncher getGet Cruncher info by wallet address
cruncher listList crunchers for a competition
cruncher get-claim-recordGet claim record for a Cruncher
cruncher get-claimable-checkpointsGet claimable checkpoints
model addSubmit a new model
model updateUpdate model results
model getGet model information
model get-crunch-modelsGet all models for a competition
claimClaim checkpoint rewards
configConfiguration management

Common Workflows

Participating in a Competition

  1. Create Cruncher Profile:
    crunch-cruncher create "MyTeamName"
    
  2. Register for Competition:
    crunch-cruncher register "Competition Name" "MyTeamName"
    
  3. Submit Models:
    crunch-cruncher model add "Competition Name" "model1" "submission1" "resource1" "GPU" "ACTIVE"
    
  4. Update Model Results:
    crunch-cruncher model update "Competition Name" "model1" '{"accuracy": 0.95}'
    
  5. Check Claimable Rewards:
    crunch-cruncher get-claimable-checkpoints "Competition Name"
    
  6. Claim Rewards:
    crunch-cruncher claim "Competition Name"
    

Best Practices

  1. Monitor Rewards: Regularly check for claimable checkpoints
  2. Secure Wallets: Keep wallet keys secure and backed up