The Helius CLI enables AI agents to autonomously create Helius accounts and obtain API keys without human intervention. Through the Helius MCP server, AI tools can guide agents through the full signup workflow.
Capabilities
| Capability | Description |
|---|
| Generate keypairs | Create Solana wallets programmatically via helius keygen |
| Self-service signup | Create Helius accounts for a payment of 1 USDC via helius signup |
| Manage projects | List and view project details via helius projects |
| Access API keys | Retrieve and create API keys via helius apikeys |
| Monitor usage | Check credit consumption via helius usage |
| Get RPC endpoints | Display mainnet and devnet URLs via helius rpc |
| JSON output mode | Machine-readable output with --json flag on any command |
Commands Reference
| Command | Description |
|---|
helius keygen | Generate a new Solana keypair |
helius signup | Pay 1 USDC + create account + project |
helius login | Authenticate with existing wallet |
helius projects | List all projects |
helius project [id] | Get project details |
helius apikeys [project-id] | List API keys for project |
helius apikeys create [project-id] | Create new API key |
helius usage [project-id] | Show credits usage |
helius rpc [project-id] | Show RPC endpoints |
Exit Codes
| Code | Meaning | Agent Action |
|---|
| 0 | Success | Proceed to next step |
| 1 | General error | Log error and inform user |
| 10 | Not logged in | Run helius login |
| 11 | Keypair not found | Run helius keygen |
| 20 | Insufficient SOL | Request 0.001 SOL to wallet |
| 21 | Insufficient USDC | Request 1 USDC to wallet |
| 30 | No projects found | Projects list is empty |
| 31 | Project not found | Invalid project ID |
| 40 | API error | Retry with backoff |
Complete Agent Workflow
# 1. Generate keypair
helius keygen
# Save the wallet address from the output
# 2. Wait for user to fund wallet (1 USDC + ~0.001 SOL)
# 3. Signup and create account
helius signup --json
# 4. Get projects and API keys
helius projects --json
helius apikeys <project-id> --json
# 5. Get RPC endpoints
helius rpc <project-id> --json
Always use the --json flag when calling commands programmatically. Parse the JSON response for reliable data extraction.
Keypair Management
The CLI stores files in ~/.helius-cli/:
~/.helius-cli/
├── config.json # JWT authentication token
└── keypair.json # Solana keypair (if generated)
Override the default keypair path with -k:
helius login -k /path/to/custom/keypair.json
helius signup -k /path/to/custom/keypair.json
Example Agent Prompts
Use these prompts with an AI tool connected to the Helius MCP server:
- “Help me set up a new Helius account using the CLI”
- “What commands do I need to get an API key for my agent?”
- “Show me the full workflow for autonomous Helius signup”
- “How do I check my remaining credits using the Helius CLI?”
- “What exit codes should I handle when using helius signup?”
Related Pages
Resources