CLI Tools

Version

Installation

npm install -g @glitch-gremlin/cli

Environment Setup

The CLI requires these environment variables:

  • SOLANA_KEYPAIR_PATH: Path to your Solana keypair file

  • SOLANA_CLUSTER: (Optional) Solana cluster to use (defaults to 'devnet')

Commands

Test Management

# Create a new chaos test
glitch test -p <program-id> -t FUZZ -d 300 -i 5

# Options:
#   -p, --program <address>    Target program address
#   -t, --type <type>         Test type (FUZZ, LOAD, EXPLOIT, CONCURRENCY)
#   -d, --duration <seconds>   Test duration in seconds (default: 300)
#   -i, --intensity <level>    Test intensity 1-10 (default: 5)

# View test results
glitch test results <test-id>

# Cancel a running test
glitch test cancel <test-id>

Governance

Token Management

Examples

Basic Fuzz Test

Load Test

Create and Monitor Proposal

Error Handling

The CLI will display clear error messages for common issues:

  • Invalid parameters

  • Network connectivity problems

  • Insufficient token balance

  • Rate limiting

  • Permission denied

Example error output:

Configuration

The CLI looks for configuration in this order:

  1. Command line arguments

  2. Environment variables

  3. Configuration file (~/.config/glitch/config.json)

Example config file:

Best Practices

  1. Start with short duration, low intensity tests

  2. Use devnet for initial testing

  3. Monitor test results in real-time

  4. Save test IDs for future reference

  5. Use appropriate test types for your use case

Next Steps

  • Read the SDK Reference

  • Learn about Test Types

  • Explore Governance

Last updated