CLI Tools
Installation
npm install -g @glitch-gremlin/cliEnvironment Setup
The CLI requires these environment variables:
SOLANA_KEYPAIR_PATH: Path to your Solana keypair fileSOLANA_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:
Command line arguments
Environment variables
Configuration file (~/.config/glitch/config.json)
Example config file:
Best Practices
Start with short duration, low intensity tests
Use devnet for initial testing
Monitor test results in real-time
Save test IDs for future reference
Use appropriate test types for your use case
Next Steps
Read the SDK Reference
Learn about Test Types
Explore Governance
Last updated