Skip to content

AI-Powered Solana Development Suite πŸ€–βš‘ The next-generation Solana development environment combining blazing-fast localnet performance with integrated AI assistance. Build faster, debug smarter, ship sooner.

License

Notifications You must be signed in to change notification settings

nitishxyz/solforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ SolForge

AI-Powered Solana Development Suite πŸ€–βš‘
The next-generation Solana development environment combining blazing-fast localnet performance with integrated AI assistance. Build faster, debug smarter, ship sooner.

Version License Powered by LiteSVM AI Enabled


🎯 What is SolForge?

SolForge started as a lightning-fast alternative to solana-test-validator, but has evolved into something far more powerful: a complete AI-powered Solana development suite that combines:

  • πŸš€ Ultra-Fast Localnet - Sub-second startup (~50MB vs 500MB+)
  • πŸ€– Integrated AI Assistant - Built-in coding assistant powered by Claude, GPT-4, or your choice of LLM
  • 🎨 Modern Web Dashboard - Full-featured GUI with AI chat sidebar
  • πŸ› οΈ Complete Dev Toolkit - Program cloning, token minting, unlimited airdrops
  • πŸ”Œ Drop-in Compatible - Works with Anchor, web3.js, @solana/kit, and all existing tooling

Think of it as: Your localnet, your dev tools, and your AI pair programmerβ€”all in one command.


✨ Why SolForge?

The All-in-One Development Suite

Feature SolForge solana-test-validator
Startup Time < 1s 10-30s
Memory Usage ~50MB 500MB+
AI Assistant βœ… Built-in ❌ None
Web Dashboard βœ… Modern React UI ❌ CLI only
Program Cloning βœ… One command ❌ Manual
Token Cloning βœ… Automatic ❌ Complex
Unlimited Airdrops βœ… Instant ⚠️ Rate limited
WebSocket Support βœ… Real-time βœ… Yes

πŸš€ Quick Start

Installation

# One-liner install (recommended)
curl -fsSL https://install.solforge.sh | sh

# Or with Bun
bun install -g solforge

# Or with npm
npm install -g solforge

**GitLab CI:**
```yaml
script:
  - npm install -g solforge
  - solforge --ci &
  - sleep 5
  - anchor test --skip-local-validator
# Bind to all interfaces for LAN access
solforge --network
# Note: Keep SolForge local-only in production for security
test = "anchor test --skip-local-validator"
### Start SolForge
solforge

### Start Everything

```bash
# Initialize config

This launches:

  • 🌐 RPC Server: http://127.0.0.1:8899
  • πŸ“‘ WebSocket: ws://127.0.0.1:8900
  • 🎨 Web Dashboard: http://127.0.0.1:42069
  • πŸ€– AI Assistant: http://127.0.0.1:3456/ui (if enabled) This runs interactive setup (first time) and launches all services:

Get Coding in 30 Seconds

# Configure Solana CLI
solana config set -u http://127.0.0.1:8899

# Get some SOL
solana airdrop 1000

# You're ready! πŸŽ‰

πŸ€– AI-Powered Development

Enable the AI Assistant

Add this to your sf.config.json:

{
  "agi": {
    "enabled": true
  }
}

That's it! The AI server starts automatically with smart defaults. No API keys required initially (uses AGI's defaults).

What Can the AI Do?

  1. πŸ› Debug Your Programs

    "Why is my PDA derivation failing?"
    "Explain this transaction error: Program failed..."
    
  2. πŸ“ Generate Code

    "Create an Anchor program for a token swap"
    "Write a TypeScript client for my NFT program"
    
  3. πŸŽ“ Learn Solana

    "What's the difference between a PDA and a keypair?"
    "How do cross-program invocations work?"
    
  4. πŸ” Review & Optimize

    "Review this program for security issues"
    "How can I optimize these compute units?"
    
  5. πŸš€ Deployment Help

    "Deploy this program to devnet"
    "Set up CI/CD for my Anchor project"
    

Access the AI

  • Web Dashboard: Built-in chat sidebar at http://127.0.0.1:42069
  • Standalone UI: Direct access at http://127.0.0.1:3456/ui
  • API: Programmatic access via REST/SSE endpoints

πŸ“– Detailed Guide: AGI_QUICKSTART.md


🎨 Web Dashboard

The modern web interface combines all your dev tools in one place:

Features

  • πŸ“Š Real-time Monitoring - Slots, blocks, transactions
  • πŸ’Έ Instant Airdrops - Visual SOL distribution
  • πŸͺ™ Token Management - Create, clone, and mint tokens
  • πŸ€– AI Chat Sidebar - Get help without leaving your workspace
  • πŸ” Transaction Inspector - Debug transactions visually
  • πŸ“ˆ Network Stats - Live performance metrics

Access at http://127.0.0.1:42069 when SolForge is running.


πŸ› οΈ Complete Development Toolkit

Program Development

# Clone programs from mainnet
solforge program clone TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

# Clone with all associated accounts
solforge program clone <PROGRAM_ID> --with-accounts

# Load your own program
solforge program load --file ./target/deploy/my_program.so

Token Operations

# Clone USDC to localnet
solforge token clone EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

# Create new token with metadata
solforge mint

# Interactive token creation wizard
solforge token create

Instant Airdrops

# No rate limits, no waiting
solforge airdrop --to <PUBKEY> --sol 1000

# Or use the web dashboard for visual control

πŸ“ Configuration

Create sf.config.json to customize everything:

{
  "name": "my-solana-project",
  "server": {
    "rpcPort": 8899,
    "wsPort": 8900
  },
  "gui": {
    "enabled": true,
    "port": 42069
  },
  "agi": {
    "enabled": true,
    "port": 3456,
    "provider": "openrouter",
    "model": "anthropic/claude-3.5-sonnet"
  },
  "clone": {
    "programs": [
      "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
    ],
    "tokens": [
      {
        "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "symbol": "USDC"
      }
    ]
  },
  "bootstrap": {
    "airdrops": [
      {
        "address": "YOUR_WALLET_ADDRESS",
        "amountSol": 100
      }
    ]
  }
}

Configuration Options

Section Purpose Docs
server RPC/WebSocket ports docs/CONFIGURATION.md
gui Web dashboard settings apps/web/README.md
agi AI assistant configuration AGI_QUICKSTART.md
clone Auto-clone programs/tokens docs/CONFIGURATION.md
bootstrap Auto-airdrops on startup docs/CONFIGURATION.md

πŸ”Œ Framework Integration

Anchor

# Anchor.toml
[provider]
cluster = "http://127.0.0.1:8899"
wallet = "~/.config/solana/id.json"

[scripts]
test = "solforge &&  anchor test --skip-local-validator"

@solana/web3.js

import { Connection, PublicKey, LAMPORTS_PER_SOL } from "@solana/web3.js";

const connection = new Connection("http://127.0.0.1:8899", "confirmed");

// Request airdrop
await connection.requestAirdrop(
  new PublicKey("YOUR_WALLET"),
  100 * LAMPORTS_PER_SOL
);

// Get balance
const balance = await connection.getBalance(publicKey);

@solana/kit (Recommended)

import { createSolanaRpc } from "@solana/kit";
import { address, lamports } from "@solana/web3.js";

const rpc = createSolanaRpc("http://127.0.0.1:8899");

// Request airdrop
await rpc
  .requestAirdrop(address("YOUR_WALLET"), lamports(100_000_000_000n))
  .send();

// Get balance
const balance = await rpc.getBalance(address("YOUR_WALLET")).send();

πŸ“Š Performance & Comparison

Speed Matters

# solana-test-validator
$ time solana-test-validator
$ time solforge
Startup: ~15-30 seconds
Memory: 500-800 MB
CPU: 5-10% idle
$ time solforge

# SolForge
$ time solforge
Startup: < 1 second
Memory: ~50 MB
CPU: < 1% idle

Why It's Fast

  • LiteSVM: Built on an optimized Solana Virtual Machine implementation
  • Minimal Overhead: No unnecessary validators or consensus
  • Efficient Architecture: Bun runtime + smart resource management
  • Optimized RPC: Direct SVM access without validator overhead

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        SolForge CLI                          β”‚
β”‚  Entry point - orchestrates all components                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚
            β”œβ”€β”€> πŸš€ LiteSVM RPC Server (packages/server)
            β”‚    β€’ Full Solana RPC API (90+ methods)
            β”‚    β€’ WebSocket subscriptions
            β”‚    β€’ ~50MB memory, sub-second startup
            β”‚
            β”œβ”€β”€> 🎨 Web Dashboard (apps/web)
            β”‚    β€’ React + TypeScript + Vite
            β”‚    β€’ Real-time monitoring
            β”‚    β€’ Token & airdrop tools
            β”‚    β€’ AGI chat sidebar integration
            β”‚
            └──> πŸ€– AGI Server (@agi-cli/server)
                 β€’ Embedded AI assistant
                 β€’ Multi-provider support (OpenRouter, Anthropic, OpenAI)
                 β€’ Specialized Solana development agents
                 β€’ REST API + SSE streaming

Project Structure

solforge/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ cli/              # Main CLI entry point
β”‚   β”‚   β”œβ”€β”€ commands/     # start, init, mint, etc.
β”‚   β”‚   β”œβ”€β”€ services/     # Process management, token cloning
β”‚   β”‚   └── config/       # Configuration management
β”‚   └── web/              # React dashboard
β”‚       β”œβ”€β”€ components/   # UI components + AGI sidebar
β”‚       └── routes/       # Dashboard pages
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ server/           # LiteSVM RPC/WebSocket server
β”‚   β”‚   β”œβ”€β”€ methods/      # 90+ RPC method implementations
β”‚   β”‚   └── ws-server/    # WebSocket subscription server
β”‚   └── install/          # Installation CLI
└── docs/                 # Architecture & guides

πŸŽ“ Use Cases

For Hackathons πŸ†

  • Fast Iteration: Sub-second restart means rapid development
  • AI Pair Programming: Debug faster with integrated AI
  • Complete Toolkit: Everything you need in one tool
  • Visual Debugging: Web dashboard for real-time insights

For Learning πŸ“š

  • Beginner Friendly: AI explains Solana concepts as you code
  • Interactive: Web GUI makes concepts visual
  • Fast Feedback: Instant airdrops and program deployment
  • Production-Ready: Same RPC API as mainnet

For Teams πŸ‘₯

  • Consistent Environments: Same config across all devs
  • Faster Onboarding: One command to start developing
  • AI Knowledge Base: Team can query AI for project patterns
  • Remote Development: --network flag for LAN access

For CI/CD πŸ”„

  • Fast Tests: Startup time doesn't bottleneck pipelines
  • Scriptable: Full CLI automation support
  • Docker Ready: Minimal resource footprint
  • Reliable: Deterministic behavior for testing

πŸ“š Documentation

πŸ“– Complete Documentation - All documentation is now hosted on the website as a single source of truth.

Quick links:


πŸ”§ Advanced Usage

AI Configuration

{
  "agi": {
    "enabled": true,
    "port": 3456,
    "provider": "openrouter",
    "model": "anthropic/claude-3.5-sonnet",
    "agent": "general"
  }
}

Supported Providers:

  • OpenRouter (recommended - access to all models with one key)
  • Anthropic (Claude 3.5 Sonnet)
  • OpenAI (GPT-4 Turbo)

Agent Types:

  • general - General Solana development & debugging
  • build - Build processes & deployment tasks

Network Mode

Make your localnet accessible on your LAN:

solforge --network

Now accessible at http://YOUR_IP:8899 from other devices.

Bootstrap Configurations

Auto-setup on every start:

{
  "clone": {
    "programs": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
    "tokens": [
      {
        "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "symbol": "USDC"
      }
    ]
  },
  "bootstrap": {
    "airdrops": [
      { "address": "YOUR_WALLET", "amountSol": 100 }
    ]
  }
}
    steps:
      - uses: actions/checkout@v4
      - run: npm install -g solforge
      - run: solforge --ci &
      - run: sleep 5 && anchor test --skip-local-validator

run: |

  • name: Run Tests run: | anchor test --skip-local-validator

---

## πŸ—οΈ Building from Source

### Prerequisites

- [Bun](https://bun.sh) runtime

### Build Commands

```bash
# Clone & install
git clone https://github.com/nitishxyz/solforge.git
cd solforge
bun install

# Run from source
bun apps/cli/index.ts start

# Build binary for your platform
bun run --filter @solforge/cli build:bin

# Build for all platforms
bun run --filter @solforge/cli build:bin:all

Platform-Specific Builds

# macOS (Apple Silicon)
bun run build:bin:darwin-arm64

# macOS (Intel)
bun run build:bin:darwin-x64

# Linux x64
bun run build:bin:linux-x64

# Linux ARM64
bun run build:bin:linux-arm64

# Windows x64
bun run build:bin:windows-x64

πŸ” Troubleshooting

Port Already in Use

# Check what's using the port
lsof -i :8899

# Use different port
solforge --port 9999

AI Server Not Starting

# Check API key (if using specific provider)
echo $OPENROUTER_API_KEY

# Start with debug logs
solforge --debug

# Use minimal config (no API key needed)
{
  "agi": { "enabled": true }
}

GUI Not Loading

# Check if port is available
lsof -i :42069

# Use different port
export SOLFORGE_GUI_PORT=3000
solforge

Connection Refused

Quick Reference

solforge              # Start everything
solforge stop         # Stop everything
solforge mint         # Mint tokens
solforge token clone  # Clone token from mainnet

πŸ“š API Coverage

βœ… Fully Implemented (90+ methods)

  • Account Operations: getAccountInfo, getMultipleAccounts, getProgramAccounts
  • Transaction Processing: sendTransaction, simulateTransaction, getTransaction
  • Block & Slot Queries: getBlock, getSlot, getBlockHeight, getEpochInfo
  • Token Operations: getTokenAccountsByOwner, getTokenSupply, getTokenAccountBalance
  • Program Deployment: Full program deployment support
  • WebSocket Subscriptions: accountSubscribe, signatureSubscribe, programSubscribe

🚧 In Progress

  • Additional WebSocket subscription types
  • Stake account operations
  • Vote account queries

πŸ“‹ Planned

  • Snapshot/restore functionality
  • Time-travel debugging
  • Multi-tenant support
  • Enhanced transaction inspection

🀝 Contributing

We welcome contributions! Whether you're:

  • Adding new RPC methods
  • Improving AI prompts
  • Enhancing the web dashboard
  • Writing documentation
  • Reporting bugs

See AGENTS.md for development guidelines.

Development Workflow

# Run tests
bun test

# Lint code
bun run lint

# Format code
bun run format

πŸ™ Acknowledgments

SolForge is built on the shoulders of giants:

  • LiteSVM - Fast Solana VM implementation
  • Bun - Lightning-fast JavaScript runtime
  • @agi-cli - AI coding assistant framework
  • Solana Labs - For building an incredible blockchain platform
  • The Solana Community - For inspiration and feedback

πŸ“„ License

MIT License - see LICENSE for details.


πŸ”— Links


🌟 Star History

If SolForge helps you build faster, please consider starring the repo! ⭐


Made with ❀️ for Solana developers
From a simple localnet to an AI-powered development suite

Get Started β€’ AI Docs β€’ Full Docs β€’ Support

About

AI-Powered Solana Development Suite πŸ€–βš‘ The next-generation Solana development environment combining blazing-fast localnet performance with integrated AI assistance. Build faster, debug smarter, ship sooner.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •