A command-line interface for managing Helius webhooks.
- Configure API key and base URL
- List all webhooks
- Get webhook details by ID
- Create new webhooks
- Delete webhooks
- More features coming soon!
- Node.js 14 or higher
- npm or yarn
npm install -g helius-cli- Clone the repository:
git clone https://github.com/yourusername/helius-cli.git
cd helius-cli- Install dependencies:
npm install- Build the CLI:
npm run build- Link the CLI globally:
npm linkBefore using the CLI, you need to configure your Helius API key:
helius setupThis will prompt you to enter your Helius API key.
Alternatively, you can set the value manually:
helius config set apiKey YOUR_API_KEYhelius webhooks listhelius webhooks get <webhookID>You can create a webhook in interactive mode, which will guide you through the process:
helius webhooks create --interactiveOr 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" --interactiveAvailable options:
--urlor-u: Webhook URL (required for non-interactive mode)--typeor-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-headeror-a: Authorization header (optional)--statusor-s: Transaction status (optional) - One of: all, success, failed--interactive: Use interactive mode to create webhook (no other options required)
helius webhooks delete <webhookID>You can skip the confirmation prompt by using the --force or -f flag:
helius webhooks delete <webhookID> --forcehelius config showhelius config set apiKey YOUR_API_KEY
helius config set baseUrl https://api.helius.xyz/v0helius config resetYou can also configure the CLI using environment variables:
HELIUS_API_KEY: Your Helius API keyHELIUS_BASE_URL: The Helius API base URL (defaults to https://api.helius.xyz/v0)
ISC