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

# Usage

> Complete reference for HopX CLI usage commands - view usage summary, plans, history, and sandbox usage statistics.

Monitor usage statistics using the `usage` command. View usage summary, available plans, usage history, and sandbox usage.

## Command Syntax

```bash theme={null}
hopx usage <subcommand> [options]
```

## Subcommands

### `summary`

View usage summary.

**Syntax:**

```bash theme={null}
hopx usage summary [OPTIONS]
```

**Examples:**

```bash theme={null}
# View usage summary
hopx usage summary
```

**Expected Output:**

```
┌─────────────┬─────────────────────────────────────┐
│ Metric      │ Value                               │
├─────────────┼─────────────────────────────────────┤
│ Sandboxes   │ 15 / 100 (15%)                      │
│ Compute     │ 50h / 200h (25%)                    │
│ Storage     │ 5 GB / 50 GB (10%)                  │
│ Period      │ January 2025                        │
└─────────────┴─────────────────────────────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

### `plans`

View available plans.

**Syntax:**

```bash theme={null}
hopx usage plans [OPTIONS]
```

**Examples:**

```bash theme={null}
# View plans
hopx usage plans
```

**Expected Output:**

```
┌──────────────┬──────────────┬─────────────┐
│ Plan         │ Price       │ Features    │
├──────────────┼──────────────┼─────────────┤
│ Free         │ $0          │ 10 sandboxes│
│ Pro          │ $29/mo      │ 100 sandboxes│
│ Enterprise   │ Custom      │ Unlimited   │
└──────────────┴──────────────┴─────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

### `history`

View usage history.

**Syntax:**

```bash theme={null}
hopx usage history [OPTIONS]
```

**Options:**

* `--limit INTEGER` - Number of records to show
* `--output, -o FORMAT` - Output format: `table`, `json`, `plain` (default: `table`)

**Examples:**

```bash theme={null}
# View usage history
hopx usage history

# View with limit
hopx usage history --limit 20
```

**Expected Output:**

```
┌──────────────┬──────────────┬─────────────┐
│ Date         │ Sandboxes    │ Compute     │
├──────────────┼──────────────┼─────────────┤
│ 2025-01-27   │ 15           │ 2.5h        │
│ 2025-01-26   │ 12           │ 2.0h        │
└──────────────┴──────────────┴─────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

### `sandboxes`

View sandbox usage statistics.

**Syntax:**

```bash theme={null}
hopx usage sandboxes [OPTIONS]
```

**Options:**

* `--output, -o FORMAT` - Output format: `table`, `json`, `plain` (default: `table`)

**Examples:**

```bash theme={null}
# View sandbox usage
hopx usage sandboxes
```

**Expected Output:**

```
┌──────────────┬──────────────┬─────────────┐
│ Sandbox ID   │ Runtime      │ Resources   │
├──────────────┼──────────────┼─────────────┤
│ sb_abc123    │ 2h 15m       │ 2 CPU, 4GB  │
│ sb_def456    │ 1h 30m       │ 1 CPU, 2GB  │
└──────────────┴──────────────┴─────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

## Related

* **[CLI Quickstart](/cli/quickstart)** - Get started with CLI
* **[Billing](/cli/commands/billing)** - Manage billing
* **[Organization Commands](/cli/commands/org)** - Manage organizations

## Next Steps

* Learn about [Billing](/cli/commands/billing) to manage payments
* Explore [Organization Management](/cli/commands/org) to manage organization settings
* Review [Dashboard](https://console.hopx.dev) for detailed usage analytics
