npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ericore-cli

v5.0.2

Published

Ericore Platform CLI Suite - Core monitoring and data indexing tools

Readme

Ericore CLI

🚀 Professional CLI tool for configuring Solana blockchain indexing with the Ericore system.

The Ericore CLI provides both interactive and direct command-line interfaces for setting up monitoring of Solana programs, tokens, and addresses with auto-detection, custom naming, and comprehensive management features.

✨ Features

  • 🔍 Auto-Detection: Automatically identifies SPL Token programs, Anchor programs, and token addresses
  • 🎨 Interactive Mode: Beautiful step-by-step configuration wizard
  • Direct Commands: Fast command-line interface for power users
  • 🏷️ Custom Naming: Create descriptive names for easy identification
  • 📊 Management Tools: List, delete, and view status of configurations
  • 🔗 IDL Support: Automatic IDL downloading for Anchor programs with 5-step fallback
  • 🌙 Dark Terminal Optimized: Colors that work perfectly in dark terminals
  • 💾 Modular Architecture: Clean TypeScript implementation with dependency injection

🏗️ Architecture

Core Components

  • Container: Dependency injection container for service management
  • CLI Commands: Command definitions and execution logic
  • Services: Business logic implementations
    • ConfigService: Configuration CRUD operations
    • ProgramDetector: Solana program type detection
    • OutputFormatter: Consistent CLI output formatting
    • IdlDownloader: Anchor IDL downloading and caching
    • InteractiveCLI: User-friendly interactive prompts

Directory Structure

src/
├── core/                 # Core framework components
│   ├── container.ts      # Dependency injection
│   └── cli-commands.ts   # Command definitions
├── services/             # Business logic services
│   ├── config-service.ts
│   ├── program-detector.ts
│   ├── output-formatter.ts
│   ├── idl-downloader.ts
│   └── interactive-cli.ts
├── types/                # TypeScript type definitions
│   └── core-types.ts
└── index.ts              # Main entry point

🎨 User Experience

Colors & Emojis

  • 🔍 Detection: Analysis and results
  • Success: Completion messages
  • ⚠️ Warning: Important notices
  • Error: Problems and failures
  • ℹ️ Info: Additional information
  • 📊 Data: Configuration details

Interactive Features

  • Step-by-step guidance with clear progress
  • Real-time validation with helpful error messages
  • Smart defaults based on detected program type
  • Confirmation prompts to prevent mistakes
  • Clean, minimal interface without visual clutter

🛠️ Installation

Prerequisites

  • Node.js 18+
  • TypeScript
  • npm or yarn

Install & Build

# Clone the repository
git clone <repository>
cd ericore-cli

# Install dependencies
npm install

# Build the project
npm run build

# Make globally available (optional)
npm link

⚙️ Configuration

The CLI uses environment variables for advanced features:

# IDL Download Configuration
ANCHOR_IDL_FETCH_ENABLED=true
ANCHOR_RPC_ENDPOINT=https://api.mainnet-beta.solana.com

# IDL Cache Directory
IDL_CACHE_DIR=./cache/idl

# Fallback API Settings
FALLBACK_API_ENABLED=true
FALLBACK_IDL_API_ENDPOINT=https://api.ericore.com/idl

# GitHub IDL Repository
GITHUB_IDL_FETCH_ENABLED=true
GITHUB_IDL_REPO_URL=https://api.github.com/repos/coral-xyz/anchor/contents/idls

🚀 Usage

Interactive Mode (Recommended for New Users)

Launch the interactive configuration wizard:

ericore start-index

Features:

  • 🎯 Step-by-step guidance
  • 🔍 Auto-detection with detailed explanations
  • 🎨 Beautiful, colorful interface
  • ✅ Validation and error handling
  • 📋 Configuration summary before creation

Direct Commands (Power Users & Automation)

Universal Auto-Detection Command

# Auto-detect and configure any Solana address or program
ericore [address_or_program_id] [flags]

# Examples:
ericore JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN --name Jupiter --accounts --transactions
ericore TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA --name SPL-Token --accounts

Specific Type Commands

# Anchor program with IDL auto-download
ericore anchor [program_id] --accounts --transactions --idl auto

# SPL Token program
ericore token [program_id] --accounts --transactions --slots

# Specific address monitoring
ericore address [address] --accounts --transactions

# Auto-detection command
ericore add [program_id_or_address] --accounts --transactions

Management Commands

List Configurations

# Simple list
ericore list

# Detailed list with all information
ericore list-all

Example Output:

📋 Found 3 configuration(s):

⚓ 1. anchor Jupiter_JUPyiwrY
   📋 Name: Jupiter_JUPyiwrY
   🔗 Address: JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN
   📊 Data Types: accounts, transactions

🪙 2. token SPL_TokenkegQ
   📋 Name: SPL_TokenkegQ
   🔗 Address: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
   📊 Data Types: accounts, transactions, slots

Interactive Deletion

ericore delete

Features:

  • 🎯 Select from list of configurations
  • ⚠️ Confirmation prompts for safety
  • 🚫 Cancel option at any step

Configuration Status

ericore status

Shows:

  • 📊 Detailed configuration information
  • ✅ File status and validation
  • 🔧 Type-specific recommendations
  • 📁 File locations

Direct Removal

ericore remove [type] [program_id]

# Examples:
ericore remove anchor ABC123...
ericore remove token TokenkegQ...
ericore remove address JUPyiwrY...

🎛️ Command Flags

Data Types

  • --accounts: Monitor account state changes and balances
  • --transactions: Track transaction details and signatures
  • --slots: Index slot timing and consensus data
  • --blocks: Capture complete block information

Configuration Options

  • --name [string]: Custom configuration name (e.g., --name Jupiter)
  • --idl [string]: IDL configuration for Anchor programs
    • auto: Auto-download IDL (default for Anchor)
    • path/to/file.json: Use local IDL file
    • "": Skip IDL (basic parsing only)

📁 Output Files

Configurations are saved as JSON files in ../configs/:

# Examples:
../configs/Jupiter_JUPyiwrY.json
../configs/anchor_ABC12345.json
../configs/token_Tokenkeg.json

File Structure:

{
  "id": "Jupiter_JUPyiwrY",
  "type": "address",
  "programId": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",
  "slots": false,
  "accounts": true,
  "transactions": true,
  "blocks": false,
  "idl": "",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z"
}

🔍 Auto-Detection Logic

The CLI automatically detects:

🪙 SPL Token Programs

  • Known program IDs (TokenkegQ..., TokenzQd...)
  • Token program bytecode patterns

⚓ Anchor Programs

  • On-chain IDL availability
  • Anchor-specific bytecode patterns
  • Program metadata analysis

📍 Token/Account Addresses

  • Non-executable accounts
  • Individual token accounts
  • Fallback for unrecognized inputs

🔗 IDL Management (Anchor Programs)

5-Step Fallback Mechanism:

  1. Anchor On-Chain Fetch: Uses anchor idl fetch
  2. Metadata PDA: Fetches from program metadata PDA
  3. Bytecode Extraction: Extracts IDL from program bytecode
  4. Fallback API: Custom API endpoint for IDL retrieval
  5. GitHub IDL Repository: Fetches from public IDL repositories

Features:

  • 💾 Automatic caching
  • 🔄 Retry logic with exponential backoff
  • ✅ JSON validation
  • 📝 Comprehensive logging

🔧 Development

Scripts

# Development with hot reload
npm run dev

# Build for production
npm run build

# Start built application
npm start

# Clean build directory
npm run clean

Code Style

  • TypeScript: Strict type checking enabled
  • Modular Design: Clean separation of concerns
  • Dependency Injection: Testable and maintainable architecture
  • Error Handling: Comprehensive error types and handling
  • Documentation: Extensive JSDoc comments

🔧 Advanced Usage

Scripting & Automation

#!/bin/bash
# Batch configuration script

# Configure multiple tokens
ericore TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA --name SPL-Token --accounts --transactions
ericore JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN --name Jupiter --accounts --transactions

# Configure Anchor program with custom IDL
ericore anchor ABC123... --name MyDApp --accounts --transactions --idl ./my-program.json

Environment Variables

# Enable debug logging
export LOG_LEVEL=debug

# Custom configs directory
export CONFIGS_DIR=/custom/path/configs

# Custom RPC endpoint
export ANCHOR_RPC_ENDPOINT=https://my-rpc-endpoint.com

📖 Examples

Basic Token Monitoring

ericore JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN --name Jupiter --accounts --transactions

Anchor Program with IDL

ericore anchor MyProgramID123... --name MyDApp --accounts --transactions --idl auto

Interactive Setup

ericore start-index
# Follow the prompts for guided setup

Management Operations

# View all configurations
ericore list-all

# Check specific status
ericore status
# Select configuration from interactive list

# Clean up old configurations
ericore delete
# Select and confirm deletion

🤝 Integration

The generated configuration files are designed to work seamlessly with:

  • Ericore Indexer: Main indexing service
  • Database Storage: Structured data storage
  • Real-time Monitoring: Live blockchain data tracking
  • Analytics Platforms: Data analysis and visualization

🆘 Help & Support

# General help
ericore --help

# Command-specific help
ericore start-index --help
ericore anchor --help
ericore list-all --help

📄 License

MIT


🚀 Built for the Solana ecosystem with ❤️ by the Ericore team