> ## Documentation Index
> Fetch the complete documentation index at: https://protocol.crunchdao.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cruncher & Staking Commands

> Participant operations and staking using the unified Crunch Protocol CLI (@crunchdao/cli). Includes cruncher registration, model submission, reward claiming, and token staking.

## Cruncher Commands

Cruncher commands handle participant operations — creating a profile, registering for competitions, managing models, and claiming rewards.

```bash theme={null}
crunch-cli cruncher <command> [options] [arguments]
```

### `cruncher create`

Create a new Cruncher profile.

```bash theme={null}
crunch-cli cruncher create <name>
```

**Arguments:**

| Argument | Description          |
| -------- | -------------------- |
| `name`   | Name of the cruncher |

**Example:**

```bash theme={null}
crunch-cli cruncher create "CruncherX"
```

***

### `cruncher register`

Register for a competition.

```bash theme={null}
crunch-cli cruncher register <crunchName> <cruncherName>
```

**Arguments:**

| Argument       | Description                      |
| -------------- | -------------------------------- |
| `crunchName`   | Name of the crunch competition   |
| `cruncherName` | Name of the cruncher to register |

**Example:**

```bash theme={null}
crunch-cli cruncher register "iris_classifier" "CruncherX"
```

***

### `cruncher get`

Get Cruncher information by wallet address.

```bash theme={null}
crunch-cli cruncher get [walletAddress]
```

**Arguments:**

| Argument        | Description                                           |
| --------------- | ----------------------------------------------------- |
| `walletAddress` | Wallet address (optional, defaults to current wallet) |

**Examples:**

```bash theme={null}
# Get your own Cruncher info
crunch-cli cruncher get

# Get info for a specific wallet
crunch-cli cruncher get 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
```

***

### `cruncher get-address`

Get cruncher PDA address from a wallet address.

```bash theme={null}
crunch-cli cruncher get-address <walletAddress>
```

***

### `cruncher get-claim-record`

Get the claim record for a cruncher in a competition.

```bash theme={null}
crunch-cli cruncher get-claim-record <crunchName> <cruncherWalletAddress>
```

**Example:**

```bash theme={null}
crunch-cli cruncher get-claim-record "iris_classifier" 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM
```

Shows the claim record address and cruncher index for the specified competition.

***

### `cruncher get-claimable-checkpoints`

Get claimable checkpoints for the current wallet.

```bash theme={null}
crunch-cli cruncher get-claimable-checkpoints <crunchName>
```

**Example:**

```bash theme={null}
crunch-cli cruncher get-claimable-checkpoints "iris_classifier"
```

Lists all available checkpoints with amounts that can be claimed.

***

### `cruncher claim`

Claim available checkpoint rewards from a competition.

```bash theme={null}
crunch-cli cruncher claim <crunchName>
```

**Example:**

```bash theme={null}
crunch-cli cruncher claim "iris_classifier"
```

***

## Model Commands

Model commands are subcommands of `cruncher` for managing model submissions within competitions.

```bash theme={null}
crunch-cli cruncher model <command> [options] [arguments]
```

### `cruncher model add`

Submit a new model to a competition.

```bash theme={null}
crunch-cli cruncher model add <crunchName> <modelId> <submissionId> <resourceId> <hardwareType> <desiredState> [--skip-signature]
```

**Arguments:**

| Argument       | Description                          |
| -------------- | ------------------------------------ |
| `crunchName`   | Name of the crunch competition       |
| `modelId`      | Unique model identifier              |
| `submissionId` | Submission identifier                |
| `resourceId`   | Resource identifier                  |
| `hardwareType` | Hardware type (`cpu`, `gpu`, etc.)   |
| `desiredState` | Desired state (`active`, `inactive`) |

**Options:**

| Option             | Description        |
| ------------------ | ------------------ |
| `--skip-signature` | Skip model signing |

**Example:**

```bash theme={null}
crunch-cli cruncher model add "iris_classifier" "model_123" "sub_456" "res_789" "gpu" "active"
```

***

### `cruncher model update`

Update an existing model's results or metadata.

```bash theme={null}
crunch-cli cruncher model update <crunchName> <modelId> <updateData> [--skip-signature]
```

**Arguments:**

| Argument     | Description                    |
| ------------ | ------------------------------ |
| `crunchName` | Name of the crunch competition |
| `modelId`    | Model identifier to update     |
| `updateData` | Update data as JSON string     |

**Example:**

```bash theme={null}
crunch-cli cruncher model update "iris_classifier" "model_123" '{"desiredState": "inactive"}'
```

The `updateData` JSON can include any of: `submissionId`, `resourceId`, `hardwareType`, `desiredState`.

***

### `cruncher model get`

Get detailed information about a specific model.

```bash theme={null}
crunch-cli cruncher model get <modelId>
```

**Example:**

```bash theme={null}
crunch-cli cruncher model get "model_123"
```

***

### `cruncher model get-crunch-models`

Get all models submitted to a competition.

```bash theme={null}
crunch-cli cruncher model get-crunch-models <crunchName>
```

**Example:**

```bash theme={null}
crunch-cli cruncher model get-crunch-models "iris_classifier"
```

***

## Staking Commands

Staking commands manage token deposits, delegation, and rewards.

```bash theme={null}
crunch-cli staking <command> [options] [arguments]
```

### `staking deposit`

Deposit CRNCH tokens to stake.

```bash theme={null}
crunch-cli staking deposit <amount>
```

**Example:**

```bash theme={null}
crunch-cli staking deposit 1000
```

***

### `staking withdraw`

Withdraw CRNCH tokens from stake.

```bash theme={null}
crunch-cli staking withdraw <amount>
```

**Example:**

```bash theme={null}
crunch-cli staking withdraw 500
```

***

### `staking delegate`

Delegate tokens to a coordinator.

```bash theme={null}
crunch-cli staking delegate <coordinator> <amount>
```

**Arguments:**

| Argument      | Description                        |
| ------------- | ---------------------------------- |
| `coordinator` | Coordinator address to delegate to |
| `amount`      | Amount of tokens to delegate       |

**Example:**

```bash theme={null}
crunch-cli staking delegate 7x8yF...3k9L 500
```

***

### `staking undelegate`

Undelegate tokens from a coordinator.

```bash theme={null}
crunch-cli staking undelegate <coordinator> <amount>
```

**Example:**

```bash theme={null}
crunch-cli staking undelegate 7x8yF...3k9L 500
```

***

### `staking positions`

Show your current staking positions.

```bash theme={null}
crunch-cli staking positions
```

***

### `staking available`

Show available balance for staking.

```bash theme={null}
crunch-cli staking available
```

***

### `staking rewards`

Show claimable staking rewards.

```bash theme={null}
crunch-cli staking rewards
```

***

### `staking claim`

Claim pending staking rewards.

```bash theme={null}
crunch-cli staking claim
```

***

### `staking accounts`

Show staking account addresses.

```bash theme={null}
crunch-cli staking accounts
```

***

### `staking positions-accounts`

Show position account addresses.

```bash theme={null}
crunch-cli staking positions-accounts
```

***

## Command Reference Summary

| Category     | Command                              | Description                      |
| ------------ | ------------------------------------ | -------------------------------- |
| **Cruncher** | `cruncher create`                    | Create a Cruncher profile        |
|              | `cruncher register`                  | Register for a competition       |
|              | `cruncher get`                       | Get Cruncher info by wallet      |
|              | `cruncher get-address`               | Get Cruncher PDA address         |
|              | `cruncher get-claim-record`          | Get claim record                 |
|              | `cruncher get-claimable-checkpoints` | Get claimable checkpoints        |
|              | `cruncher claim`                     | Claim checkpoint rewards         |
| **Models**   | `cruncher model add`                 | Submit a new model               |
|              | `cruncher model update`              | Update model results             |
|              | `cruncher model get`                 | Get model information            |
|              | `cruncher model get-crunch-models`   | Get all models for a competition |
| **Staking**  | `staking deposit`                    | Deposit CRNCH tokens             |
|              | `staking withdraw`                   | Withdraw CRNCH tokens            |
|              | `staking delegate`                   | Delegate tokens to a coordinator |
|              | `staking undelegate`                 | Undelegate tokens                |
|              | `staking positions`                  | Show staking positions           |
|              | `staking available`                  | Show available balance           |
|              | `staking rewards`                    | Show claimable rewards           |
|              | `staking claim`                      | Claim staking rewards            |
|              | `staking accounts`                   | Show staking accounts            |
|              | `staking positions-accounts`         | Show position accounts           |

## Common Workflows

### Participating in a Competition

<Steps>
  <Step title="Create Profile">
    ```bash theme={null}
    crunch-cli cruncher create "MyTeamName"
    ```
  </Step>

  <Step title="Register for Competition">
    ```bash theme={null}
    crunch-cli cruncher register "iris_classifier" "MyTeamName"
    ```
  </Step>

  <Step title="Submit Model">
    ```bash theme={null}
    crunch-cli cruncher model add "iris_classifier" "model1" "sub1" "res1" "gpu" "active"
    ```
  </Step>

  <Step title="Update Model">
    ```bash theme={null}
    crunch-cli cruncher model update "iris_classifier" "model1" '{"desiredState": "active"}'
    ```
  </Step>

  <Step title="Check Rewards">
    ```bash theme={null}
    crunch-cli cruncher get-claimable-checkpoints "iris_classifier"
    ```
  </Step>

  <Step title="Claim Rewards">
    ```bash theme={null}
    crunch-cli cruncher claim "iris_classifier"
    ```
  </Step>
</Steps>

### Staking Workflow

<Steps>
  <Step title="Deposit Tokens">
    ```bash theme={null}
    crunch-cli staking deposit 1000
    ```
  </Step>

  <Step title="Delegate to Coordinator">
    ```bash theme={null}
    crunch-cli staking delegate 7x8yF...3k9L 500
    ```
  </Step>

  <Step title="Monitor Positions">
    ```bash theme={null}
    crunch-cli staking positions
    ```
  </Step>

  <Step title="Check Rewards">
    ```bash theme={null}
    crunch-cli staking rewards
    ```
  </Step>

  <Step title="Claim Rewards">
    ```bash theme={null}
    crunch-cli staking claim
    ```
  </Step>
</Steps>

## Related

* [Coordinator & Crunch Commands](/cli/coordinator-and-crunch-commands) — Competition management and coordinator operations
* [Installation & Global Options](/cli/installation-and-global-options) — Configuration and shared options
