> For the complete documentation index, see [llms.txt](https://ggai.gitbook.io/ggai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ggai.gitbook.io/ggai-docs/developer-tools-and-documentation/getting-started.md).

# 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

```bash
npm install @glitch-gremlin/sdk
```

#### CLI Installation

```bash
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

```typescript
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

```typescript
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

```bash
# 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
