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

# Helius CLI

> Command-line interface for Helius with 95+ commands for account management, Solana queries, transaction sending, webhooks, streaming, and staking automation.

The [Helius CLI](https://www.npmjs.com/package/helius-cli) is a full-featured command-line interface for the Helius platform. It provides 95+ commands for account management, blockchain data queries, transaction sending, webhooks, real-time streaming, staking, ZK Compression, and more — with machine-readable JSON output for every command.

> [!TIP]
>
> **Using an MCP-compatible AI tool?** The [Helius MCP server](https://www.helius.dev/docs/agents/mcp.md) is the recommended way for AI agents to interact with Helius — it provides 10 routed tools with structured inputs/outputs, including built-in account signup. Use the CLI for shell scripts, CI/CD pipelines, or when MCP is not available.

## Installation

```bash theme={"system"}
npm install -g helius-cli
```

## Quick Start — Existing Users

If you already have a Helius API key, just set it and go:

```bash theme={"system"}
helius config set-api-key YOUR_API_KEY
```

Get your key from [dashboard.helius.dev](https://dashboard.helius.dev). That's it — skip the signup steps below.

## Quick Start — New Users

> [!NOTE]
>
> Account-creating `helius signup` invocations require `--email`, `--first-name`, and `--last-name` — including the Agent plan. Your wallet is only used to pay; it does not replace your contact details. `helius signup --resume`, which finalizes an existing signup after paying via the hosted link, needs no other flags.

**1. Generate a keypair**

```bash theme={"system"}
helius keygen
```

Output:

```
✓ Keypair generated
  Path:    ~/.helius/keypair.json
  Address: 7xKp...3nQm

To use this wallet, fund it with:
  - ~0.001 SOL for transaction fees
  - USDC for your chosen plan:
      agent          $10 (one-time)
      developer      $49/mo
      business       $499/mo
      professional   $999/mo

Then run: helius signup --email <email> --first-name <name> --last-name <name>
  Options: --plan <plan> --period monthly|yearly --coupon <code> --pay
```

The funding hint above only applies if you'll use autopay — skip funding if you plan to pay via the hosted link.

**2. Create account**

Two payment modes: hosted link (pay from any wallet, nothing to fund) or autopay (pay USDC from the local keypair, which must hold \~0.001 SOL + the plan amount).

```bash theme={"system"}
# Default: print a hosted payment link, pay with any wallet in the browser
helius signup --email you@example.com --first-name Jane --last-name Doe

# After paying via link, finalize the account
helius signup --resume

# Or autopay from the local keypair
helius signup --plan agent --pay --email you@example.com --first-name Jane --last-name Doe
```

**3. Get your API keys and endpoints**

```bash theme={"system"}
helius projects
helius apikeys <project-id>
helius rpc <project-id>
```

> [!WARNING]
>
> Your API key is sensitive information that grants access to your Helius account. Never expose it in client-side code, public repos, or browser-accessible areas.

## Plans & Pricing

You can purchase any Helius shared plan directly through the CLI. Pass `--plan` during signup or use `helius upgrade` later:

> [!NOTE]
>
> All prices shown in dollars are in United States dollars (USD).

| Plan | Price | Credits | `--plan` value |
| - | - | - | - |
| Agent | \$10 one-time | 1,000,000 | `agent` |
| Developer | \$49/mo | 10,000,000 | `developer` |
| Business | \$499/mo | 100,000,000 | `business` |
| Professional | \$999/mo | 200,000,000 | `professional` |

> [!NOTE]
>
> The **Agent** plan (`agent`) is the default. It costs \$10 (paid in USDC) to prevent abuse and gives you 1,000,000 credits. For higher rate limits and more credits, sign up with a paid plan or upgrade later.

### Signup with a specific plan

```bash theme={"system"}
# Default: Agent plan ($10)
helius signup --email you@example.com --first-name Jane --last-name Doe

# Developer plan ($49/mo)
helius signup --plan developer --email you@example.com --first-name Jane --last-name Doe

# Yearly billing (paid plans only)
helius signup --plan business --period yearly --email you@example.com --first-name Jane --last-name Doe
```

### Upgrade an existing account

```bash theme={"system"}
helius upgrade --plan developer --email you@example.com --first-name Jane --last-name Doe
```

### Pay a renewal

When a subscription renewal is due (monthly or yearly), Helius creates a **payment intent** — a pending payment with a unique ID, amount, and expiration. You'll receive the payment intent ID via email or the [dashboard](https://dashboard.helius.dev).

```bash theme={"system"}
helius pay <payment-intent-id>
```

The command fetches the intent details, shows the amount and expiration, asks for confirmation, then sends the USDC payment from your keypair wallet.

## Command Reference

The CLI provides 95+ commands across 14 categories. Every command supports `--json` for machine-readable output and `--api-key <key>` / `--network <net>` global overrides.

> [card] [Full Command Reference](https://www.helius.dev/docs/agents/cli/commands.md)
>
> All 95+ commands — account management, blockchain queries, DAS API, wallet, webhooks, transaction sending, WebSockets, staking, ZK compression, and more

## JSON Output Mode

Add `--json` to any command for machine-readable output:

```bash theme={"system"}
helius projects --json
helius balance Gh9ZwEm... --json
helius asset owner 86xCnPe... --json
```

Example:

```json theme={"system"}
{
  "projects": [
    {
      "id": "67b9d260-726b-4ba3-8bb0-dbbf794641bf",
      "name": "My Project",
      "plan": "free"
    }
  ]
}
```

## Exit Codes

Agents should check exit codes for reliable automation:

| Code | Meaning |
| - | - |
| 0 | Success |
| 1 | General error |
| 10 | Not logged in |
| 11 | Keypair not found |
| 20 | Insufficient SOL |
| 21 | Insufficient USDC |
| 30 | No projects found |
| 31 | Project not found |
| 40 | API error |

## Configuration

Config is stored in `~/.helius/`:

```
~/.helius/
├── config.json    # JWT token, API key, network, default project
└── keypair.json   # Solana keypair (if generated with keygen)
```

Manage config with:

```bash theme={"system"}
helius config show              # View current config
helius config set-api-key <key> # Set API key
helius config set-network devnet # Switch to devnet
helius config set-project <id>  # Set default project
helius config clear             # Reset everything
```

### API Key Resolution Order

API keys are resolved in this order:

1. `--api-key <key>` flag (per-command override)
2. `HELIUS_API_KEY` environment variable
3. `~/.helius/config.json` (set via `helius config set-api-key`)

## Global Options

All commands accept these flags:

| Flag | Description |
| - | - |
| `--api-key <key>` | Override the configured API key |
| `--network <net>` | Override the network (`mainnet` or `devnet`) |
| `--json` | Output in JSON format |
| `-k, --keypair <path>` | Path to keypair file (commands that require signing) |

## Full Agent Workflow

```bash theme={"system"}
# Step 1: Generate keypair
helius keygen

# Step 2: Create account (default: hosted payment link, pay from any wallet)
helius signup --email you@example.com --first-name Jane --last-name Doe
helius signup --resume   # Finalize after paying via link
# Or autopay from the local keypair (requires ~0.001 SOL + plan USDC):
# helius signup --plan agent --pay --email you@example.com --first-name Jane --last-name Doe

# Step 3: Get API keys
helius projects
helius apikeys <project-id>

# Step 4: Get RPC endpoints
helius rpc <project-id>

# Step 5: Start querying
helius balance <address>
helius asset owner <wallet-address>
helius tx history <address> --limit 10
```

## Next Steps

> [card] [Agents Overview](https://www.helius.dev/docs/agents/overview.md)
>
> API guidance, workflows, and error handling for agents

> [card] [Helius MCP](https://www.helius.dev/docs/agents/mcp.md)
>
> Connect AI tools directly to Helius APIs

> [card] [View Plans](https://www.helius.dev/docs/billing/plans.md)
>
> Understand Helius plans and upgrade options

> [card] [Dashboard](https://dashboard.helius.dev)
>
> Monitor your API usage and manage keys

## Support

> [card] [Discord Community](https://discord.com/invite/6GXdee3gBj)
>
> Join our Discord for real-time help and community support

> [card] [Email Support](mailto:support@helius.xyz)
>
> Contact our support team directly


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.