Getting Started
Getting Started with Glitch Gremlin AI
Prerequisites
Solana CLI tools installed
Node.js 14+
A Solana wallet with some $GLITCH tokens
Test Coverage
Our SDK has been thoroughly tested with:
Core SDK functionality (10 tests)
Governance features (4 tests)
Redis worker integration (2 tests)
Installation
SDK Installation
npm install @glitch-gremlin/sdk
CLI Installation
npm install -g @glitch-gremlin/cli
# Configure your Solana environment
export SOLANA_CLUSTER=devnet # or mainnet-beta
export SOLANA_KEYPAIR_PATH=/path/to/your/keypair.json
The CLI requires these environment variables:
SOLANA_CLUSTER
: The Solana cluster to connect to ('devnet' or 'mainnet-beta')SOLANA_KEYPAIR_PATH
: Path to your Solana keypair file
Basic Usage
1. Initialize the SDK
import { GlitchSDK } from '@glitch-gremlin/sdk';
const sdk = new GlitchSDK({
cluster: 'devnet', // or 'mainnet-beta'
wallet: yourWallet // Your Solana wallet instance
});
2. Create Your First Chaos Test
const request = await sdk.createChaosRequest({
targetProgram: "Your program ID",
testType: "FUZZ",
duration: 300, // 5 minutes
intensity: 5 // Scale of 1-10
});
// Wait for results
const results = await request.waitForCompletion();
console.log("Test Results:", results);
3. Using the CLI
# Initialize a new chaos test
glitch test create --program <PROGRAM_ID> --type FUZZ
# Check test status
glitch test status <TEST_ID>
# View test results
glitch test results <TEST_ID>
Next Steps
Explore different test types
Learn about governance
Set up automated testing
Last updated