Skip to content

dll21/helius-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Helius CLI

A command-line interface for managing Helius webhooks.

Features

  • Configure API key and base URL
  • List all webhooks
  • Get webhook details by ID
  • Create new webhooks
  • Delete webhooks
  • More features coming soon!

Installation

Prerequisites

  • Node.js 14 or higher
  • npm or yarn

Install from npm (Coming Soon)

npm install -g helius-cli

Install from Source

  1. Clone the repository:
git clone https://github.com/yourusername/helius-cli.git
cd helius-cli
  1. Install dependencies:
npm install
  1. Build the CLI:
npm run build
  1. Link the CLI globally:
npm link

Usage

Initial Setup

Before using the CLI, you need to configure your Helius API key:

helius setup

This will prompt you to enter your Helius API key.

Alternatively, you can set the value manually:

helius config set apiKey YOUR_API_KEY

Managing Webhooks

List all webhooks

helius webhooks list

Get webhook details by ID

helius webhooks get <webhookID>

Create a new webhook

You can create a webhook in interactive mode, which will guide you through the process:

helius webhooks create --interactive

Or you can specify all parameters directly:

helius webhooks create \
  --url "https://your-webhook-url.com" \
  --type "enhanced" \
  --types "NFT_SALE,SOL_TRANSFER" \
  --addresses "address1,address2" \
  --auth-header "your-auth-header" \
  --status "all"

You can also track all NFTs from a specific collection:

helius webhooks create \
  --url "https://your-webhook-url.com" \
  --type "enhanced" \
  --types "NFT_SALE,SOL_TRANSFER" \
  --collection "25EDBwCQQrJy9SMcXw97RymxEs4qiXHLY6EcF1sBxd5t" \
  --auth-header "your-auth-header" \
  --status "all"

Or combine collection tracking with interactive mode:

helius webhooks create --collection "25EDBwCQQrJy9SMcXw97RymxEs4qiXHLY6EcF1sBxd5t" --interactive

Available options:

  • --url or -u: Webhook URL (required for non-interactive mode)
  • --type or -t: Webhook type (required for non-interactive mode) - One of: raw, rawDevnet, enhanced, enhancedDevnet, discord, discordDevnet
  • --types: Transaction types to monitor (comma-separated, required for non-interactive mode) - See available types in interactive mode
  • --addresses: Account addresses to monitor (comma-separated, required for non-interactive mode unless --collection is specified)
  • --collection: NFT collection address to track all NFTs from (optional)
  • --auth-header or -a: Authorization header (optional)
  • --status or -s: Transaction status (optional) - One of: all, success, failed
  • --interactive: Use interactive mode to create webhook (no other options required)

Delete a webhook

helius webhooks delete <webhookID>

You can skip the confirmation prompt by using the --force or -f flag:

helius webhooks delete <webhookID> --force

Configuration

Show current configuration

helius config show

Set configuration values

helius config set apiKey YOUR_API_KEY
helius config set baseUrl https://api.helius.xyz/v0

Reset configuration

helius config reset

Environment Variables

You can also configure the CLI using environment variables:

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published