@crunchdao/cruncher-cli
v5.1.21
Published
CrunchDAO Cruncher Participation CLI - Model submission and claim operations
Readme
Cruncher CLI Documentation
The Cruncher CLI (@crunchdao/cruncher-cli) provides participant operations for the CrunchDAO Protocol. This includes cruncher registration, model submission, claim operations, and crunch information retrieval.
For competition management operations (creating competitions, starting/ending them, managing rewards and checkpoints), see @crunchdao/coordinator-cli.
Installation
npm install -g @crunchdao/cruncher-cliUsage
crunch-cruncher <command> [options] [arguments]Global Options
All commands support these global options:
-n, --network <network>- Solana network to use (localnet, devnet, mainnet)-w, --wallet <wallet>- Path to wallet keypair file-l, --loglevel <loglevel>- Log level for program output (debug, info, warn, error)
Commands
create
Create a new cruncher profile.
Usage:
crunch-cruncher create <name>Arguments:
name- Name of the cruncher
Example:
crunch-cruncher create "MyDataScienceTeam"Description: Creates a new cruncher profile with the specified name.
register
Register as a cruncher for a specific competition.
Usage:
crunch-cruncher register <crunchName> <cruncherName>Arguments:
crunchName- Name of the crunch competitioncruncherName- Name of the cruncher to register
Example:
crunch-cruncher register "Q4 2024 Trading Challenge" "MyDataScienceTeam"Description: Registers the current wallet as a cruncher for the specified competition with the given cruncher name.
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 "MyDataScienceTeam"Description: Returns the Solana public key address associated with the specified cruncher name.
get
Get cruncher information by wallet address.
Usage:
crunch-cruncher get [walletAddress]Arguments:
walletAddress- Wallet address of the cruncher (optional, defaults to current wallet)
Example:
crunch-cruncher get "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
# Or get your own cruncher info:
crunch-cruncher getDescription: Retrieves detailed information about a cruncher using their wallet address.
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 competitioncruncherWalletAddress- Wallet address of the cruncher
Example:
crunch-cruncher get-claim-record "Q4 2024 Trading Challenge" "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"Description: Retrieves the claim record showing what rewards have been claimed by the specified 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 "Q4 2024 Trading Challenge"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 competitionmodelId- Unique model identifiersubmissionId- Submission identifierresourceId- Resource identifierhardwareType- Type of hardware useddesiredState- Desired state of the model
Options:
--skip-signature- Skip model signing (optional)
Example:
crunch-cruncher model add "Q4 2024 Trading Challenge" "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 competitionmodelId- Model identifier to updateupdateData- Update data as JSON string
Options:
--skip-signature- Skip model signing (optional)
Example:
crunch-cruncher model update "Q4 2024 Trading Challenge" "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 "Q4 2024 Trading Challenge"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 "Q4 2024 Trading Challenge"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 fileloglevel(string) - Log level (debug, info, warn, error)
Default Configuration
{
"network": "localnet",
"wallet": "./accounts/coordinator.json",
"loglevel": "info",
}Command Reference Summary
| Command | Description |
|---------|-------------|
| create | Create a cruncher profile |
| register | Register as a cruncher for a competition |
| get-address | Get cruncher address by name |
| get | Get cruncher info by wallet address |
| get-claim-record | Get claim record for a cruncher |
| get-claimable-checkpoints | Get claimable checkpoints |
| model add | Submit a new model |
| model update | Update model results |
| model get | Get model information |
| model get-crunch-models | Get all models for a competition |
| claim | Claim checkpoint rewards |
| config | Configuration management |
Related Packages
@crunchdao/coordinator-cli- Competition management operations (creating, starting, ending competitions, managing rewards and checkpoints)@crunchdao/admin-cli- Administrative operations
Support
For issues and questions, please refer to the main repository documentation or create an issue in the project repository.
