Skip to content

solcoder-xyz/solcoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

   @@@@@@    @@@@@@   @@@        @@@@@@@   @@@@@@   @@@@@@@   @@@@@@@@  @@@@@@@
  @@@@@@@   @@@@@@@@  @@@       @@@@@@@@  @@@@@@@@  @@@@@@@@  @@@@@@@@  @@@@@@@@
  !@@       @@!  @@@  @@!       !@@       @@!  @@@  @@!  @@@  @@!       @@!  @@@
  !@!       !@!  @!@  !@!       !@!       !@!  @!@  !@!  @!@  !@!       !@!  @!@
  !!@@!!    @!@  !@!  @!!       !@!       @!@  !@!  @!@  !@!  @!!!:!    @!@!!@!
   !!@!!!   !@!  !!!  !!!       !!!       !@!  !!!  !@!  !!!  !!!!!:    !!@!@!
       !:!  !!:  !!!  !!:       :!!       !!:  !!!  !!:  !!!  !!:       !!: :!!
      !:!   :!:  !:!   :!:      :!:       :!:  !:!  :!:  !:!  :!:       :!:  !:!
  :::: ::   ::::: ::   :: ::::   ::: :::  ::::: ::   :::: ::   :: ::::  ::   :::
  :: : :     : :  :   : :: : :   :: :: :   : :  :   :: :  :   : :: ::    :   : :

๐Ÿš€ Build Solana dApps at Light Speed

Transform your ideas into deployed Solana programs through natural conversation with an AI agentโ€”no boilerplate, no friction, no learning curve.


โœจ The Vision

SolCoder democratizes Solana development. Instead of wrestling with Rust, Anchor, and deployment workflows, you describe what you want and watch an AI agent build and deploy it.

Whether you're hacking on an idea at 2 AM, shipping to devnet in 60 seconds, or iterating on a production dAppโ€”SolCoder gets out of your way:

  • ๐ŸŽฏ Describe in English โ†’ "Create a token staking contract with 7-day lockup"
  • ๐Ÿค– AI handles the rest โ†’ Code generation, testing, deployment
  • โšก Deploy in seconds โ†’ From idea to live explorer link
  • ๐Ÿ”’ Your wallet, your keys โ†’ Encrypted locally, zero cloud storage

This is the hackathon MVP. The roadmap reaches further: DePIN inference, on-chain reputation, a network of AI agents improving Solana itself.


๐ŸŽฏ Why SolCoder?

The Pain Today

  • Week 1: Install Rust, Solana CLI, Anchor, Node, pray dependencies resolve
  • Week 2: Read 47 tutorials (all outdated), debate where to store keys
  • Week 3: Debug "account not initialized" errors, cry silently
  • Week 4: Finally deploy to devnet (but only localhost works)
  • Week 5: Give up, hire $200/hr consultant

Total cost: Weeks of time, countless tutorials, deep frustration.

The SolCoder Way

User:     "Build a token staking pool"
SolCoder: โœ“ Generated Anchor program
          โœ“ Wrote tests (92% coverage)
          โœ“ Built contract
          โœ“ Deployed to devnet
          Program: 8xQz...
          Explorer: solscan.io/...
Time:     ~90 seconds
Cost:     <$0.10 in LLM fees

๐Ÿ”‘ Core Features

๐Ÿค– Conversational Agent Interface

Talk to SolCoder like you'd talk to a developer:

You:       "I want an NFT mint with metadata and royalties"
SolCoder:  Creates a plan:
           1. Generate Anchor program with token metadata extension
           2. Add royalty logic to transfer hook
           3. Write comprehensive tests
           4. Deploy to devnet and verify

You:       "Looks good, proceed"
SolCoder:  [Builds, tests, deploys...]
           โœ“ Done! Your NFT mint is live

The agent thinks in plans (multi-step projects) and replies (quick answers). You can interrupt, ask questions, or let it run.

๐Ÿ’ณ Built-In Wallet

  • Generate or restore Solana keypairs (BIP39 mnemonic support)
  • Military-grade encryption: PBKDF2 (390k iterations) + AES-GCM
  • Session budgets: Never overspendโ€”cap how much SOL per session
  • Automated airdrops: Request devnet funds with one command
  • Balance tracking: Real-time updates in status bar
/wallet create              # Generate new keypair
/wallet status              # Check balance & lock state
/wallet address             # Show current public key

๐Ÿ“ฆ Blueprint Templates

Start from production-ready projects:

  • Counter โ€” Basic on-chain state mutation
  • NFT Mint โ€” Full SPL Token with metadata
  • Token Staking โ€” Lockup periods and yield distribution (coming soon)
  • DAO Voting โ€” Governance with quadratic voting (coming soon)

Each includes:

  • Full Rust implementation with comments
  • Comprehensive test suite (80%+ coverage)
  • Client stubs for off-chain interaction
  • Deployment scripts and README

๐Ÿ“š Offline Solana Knowledge Base

Built-in expertise on:

  • Anchor macros and patterns
  • SPL Token-2022 standards
  • Solana runtime concepts and best practices
  • Common pitfalls and how to avoid them

Zero external callsโ€”uses local FAISS embeddings for semantic search. Stay offline-capable without losing context.

โš™๏ธ Smart Environment Detection

Missing Rust? Solana CLI? Node? SolCoder detects gaps and walks you through installation:

/env diag                   # Diagnose what's missing
/env install rust           # Auto-install via rustup

๐ŸŽ›๏ธ Flexible Control Modes

  • Assistive (default) โ†’ Agent runs autonomously
  • Guided โ†’ Confirm before each tool invocation
  • Manual โ†’ Slash commands only, no agentic behavior

Toggle anytime:

/settings mode assistive    # Full autonomy
/settings mode guided       # Confirm each step
/settings mode manual       # Slash commands only

๐Ÿ” Three-Tier Configuration

  1. Global defaults โ†’ ~/.solcoder/config.toml
  2. Project overrides โ†’ .solcoder/config.toml (in your workspace)
  3. CLI flags โ†’ Override everything at runtime

Example:

poetry run solcoder --llm-model gpt-5-codex --llm-reasoning high

๐Ÿ“Š Session Persistence

Every conversation is saved. Pick up where you left off:

poetry run solcoder --session abc123def456    # Resume session
poetry run solcoder --dump-session abc123     # Export transcript

Sessions stored in ~/.solcoder/sessions/<id>/state.json with full history, tool calls, and metadata.


๐Ÿš€ Quick Start (3 Minutes)

Prerequisites

  • Python 3.11+
  • Git
  • (Optional) Rust, Solana CLI, Anchor โ€” SolCoder can install these for you

Installation

Option A: Global Install via pipx (Recommended)

git clone https://github.com/solcoder/SolCoder.git
cd SolCoder
./scripts/install_pipx.sh

# Now run from any directory
solcoder

Option B: Local Development via Poetry

git clone https://github.com/solcoder/SolCoder.git
cd SolCoder
poetry install
poetry run solcoder

Option C: Makefile Helpers

make install              # Global install via pipx
make install-local        # Local editable install
poetry run solcoder       # Launch

Your First Project (60 Seconds)

  1. Start SolCoder:

    poetry run solcoder
  2. Configure LLM (first time only):

    • Enter your OpenAI/Anthropic API key (encrypted, cached locally)
    • Choose model and reasoning effort
  3. Create/restore wallet:

    • Generate new keypair or restore from mnemonic
    • Set session spend cap (optional, default 0.1 SOL)
  4. Describe your dApp:

    You: "Build a token staking pool with 7-day lockup and 5% APY"
    
  5. Watch it build:

    SolCoder: Creating plan:
             1. Generate Anchor program structure
             2. Implement staking logic with timelock
             3. Add yield calculation
             4. Write tests
             5. Build and deploy
    
    [Proceeds autonomously...]
    
    โœ“ Deployed!
    Program ID: 8xQz...
    Explorer: solscan.io/...
    

๐Ÿ’ฌ Real Agent Conversations

Scenario 1: Multi-Step Project (Using Agent Loop)

You: "Create an NFT collection manager with on-chain metadata and royalties"

SolCoder: I'll help you build that. Here's my plan:
         1. Generate Anchor program with SPL Token extension
         2. Add metadata store for collection info
         3. Implement royalty logic in transfer hook
         4. Write tests for edge cases
         5. Deploy to devnet

You: "Skip the royalties, I'll add later"

SolCoder: Updated plan:
         1. Generate Anchor program with SPL Token extension
         2. Add metadata store for collection info
         3. Write tests for core functionality
         4. Deploy to devnet

[SolCoder runs each step, showing progress...]

โœ“ All done! Your NFT manager is live at 8xQz...

Scenario 2: Quick Question (Instant Reply)

You: "What's the SPL Token-2022 format for metadata?"

SolCoder: The SPL Token-2022 metadata extension uses:
         - Mint extension: stores key metadata (name, symbol, URI)
         - Group pointer: links to token group for fungibles
         - Metadata pointer: embeds metadata on-chain

         You can use:
         spl_token_metadata_interface::state::TokenMetadata

         Query it with:
         let metadata = TokenMetadata::deserialize(&data)?;
         println!("Name: {}", metadata.name);

Scenario 3: Debugging (With Agent Assistance)

You: "My test is failing with 'insufficient funds' error"

SolCoder: Let me check your test and fix it. [Reads test file...]

         I found the issue: Your test needs to request an airdrop
         before creating the staking account.

         [Generates fix...]

         โœ“ Fixed! Run tests again: poetry run pytest

You: "Done, all green now"

SolCoder: Excellent! Ready to deploy to devnet?

๐ŸŽฎ Interactive Commands (Slash Syntax)

For quick, deterministic actions, use slash commands (no LLM):

Command Purpose
/help List all available commands
/wallet create Generate new keypair
/wallet status Check balance & lock state
/wallet address Show current public key
/env diag Diagnose missing tools (Rust, Solana, Anchor)
/env install <tool> Auto-install (rust, solana, anchor, node)
/template list Show available blueprint templates
/blueprint counter Create a Counter program from template
/new Initialize new Anchor workspace
/init Convert existing folder to Anchor project
/deploy Build and deploy current workspace to devnet
/deploy verify Verify deployment on devnet
/toolkits list Show available tools for the agent
/toolkits <name> tools Show tools in a toolkit
/settings mode <level> Change control mode (assistive/guided/manual)
/settings spend <sol> Set session budget
/todo add <task> Add TODO item
/todo list Show all TODO items
/todo done <id> Mark TODO as done
/session list Show all saved sessions
/session resume <id> Load previous session
/logs View session logs
/quit Exit SolCoder gracefully

Command Examples

# Check what needs installing
/env diag

# Auto-install missing tools
/env install rust

# Create a new Anchor workspace
/new

# List templates
/template list

# Scaffold a Counter program
/blueprint counter

# Deploy it
/deploy

# Check wallet balance
/wallet status

# Set session budget
/settings spend 0.5

# Resume previous session
/session resume abc123def456

๐Ÿงฐ How Tools Work (Agent's Capabilities)

The agent has access to these toolkits:

Toolkit Purpose
solcoder.planning Generate structured project plans
solcoder.code File operations (read, write, insert)
solcoder.blueprint Scaffold programs from templates
solcoder.deploy Build, test, and deploy
solcoder.wallet Wallet operations
solcoder.knowledge Search Solana KB
solcoder.diagnostics Environment checks
solcoder.workspace Detect and validate projects
solcoder.token Create SPL tokens quickly
solcoder.metadata Manage token metadata
solcoder.command Run shell commands safely

You see these in action automaticallyโ€”the agent chooses the right tool for each step.


๐Ÿ› ๏ธ Development & Testing

Run Tests

poetry run pytest                    # Full suite
poetry run pytest -m "not slow"      # Quick feedback
poetry run pytest --cov=solcoder     # Coverage report (target โ‰ฅ80%)

Code Quality

poetry run ruff check src tests      # Lint
poetry run black src tests           # Format
poetry run black src tests --check   # Check (CI mode)

LLM Configuration

# Test connectivity once
poetry run solcoder --dry-run-llm

# Use offline stubs (for demos)
poetry run solcoder --offline-mode

# Override provider & model
poetry run solcoder --llm-provider openai --llm-model gpt-5-codex

# Control reasoning effort
poetry run solcoder --llm-reasoning high

Knowledge Base

# Rebuild embeddings after editing docs
poetry run python scripts/build_kb_index.py

๐Ÿ“ Project Layout

SolCoder/
โ”œโ”€โ”€ src/solcoder/
โ”‚   โ”œโ”€โ”€ cli/                 # REPL, commands, branding
โ”‚   โ”œโ”€โ”€ core/                # Agent loop, tool registry, config
โ”‚   โ”œโ”€โ”€ solana/              # Wallet, RPC, build/deploy
โ”‚   โ””โ”€โ”€ session/             # Session persistence
โ”œโ”€โ”€ templates/               # Blueprint projects (Counter, NFT)
โ”œโ”€โ”€ tests/                   # Unit, integration, e2e
โ”œโ”€โ”€ docs/                    # PRD, roadmap, WBS
โ”œโ”€โ”€ knowledge/               # Solana KB & embeddings
โ”œโ”€โ”€ scripts/                 # Build scripts
โ””โ”€โ”€ poetry.lock              # Dependencies

๐Ÿ“Š Roadmap: Building the Future

โœ… Phase 1: Hackathon MVP (Live Now)

  • CLI agent with JSON schema contracts
  • Conversational interface (plan โ†’ tool โ†’ result loops)
  • Built-in wallet with encryption (PBKDF2 + AES-GCM)
  • Anchor scaffolding & deployment to devnet
  • Counter & NFT Mint templates
  • Offline Solana knowledge base
  • Session persistence & resumption
  • Multi-provider LLM support (OpenAI, Anthropic)

๐ŸŽฏ Phase 2: DePIN-Powered Inference (Q3 2025)

Decentralized LLM inference network backed by Solana:

  • Integrate with DePIN platforms (Gradient, Gensyn, etc.)
  • Transparent Solana-settled pricing (no middleman)
  • Multi-provider LLM routing for redundancy
  • Advanced patch pipeline & safety checks
  • Web search spike for knowledge augmentation

Vision: Users pay only for compute they use, verified on-chain.

๐ŸŸฃ Phase 3: SolCoder Token (SCR) (Q1 2026)

Native token enabling ecosystem growth:

  • Launch SCR token on Solana
  • Pay-for-inference with SCR
  • Staking rewards for inference providers
  • Governance voting (template priorities, fund allocation)
  • Community grants fund (distribute SCR to contributors)

Why token? Aligns incentivesโ€”the more builders use SolCoder, the more nodes run, the better inference becomes.

๐ŸŒŒ Phase 4: Agentic Contribution Network (Q2 2026+)

The boldest vision: AI agents maintaining the Solana ecosystem

How it works:

  1. Deploy Your Node

    solcoder --network-mode
    โ””โ”€ Lock SCR as collateral
    
  2. Accept Contribution Tasks Agents propose and execute:

    • ๐Ÿ› Find & fix bugs in popular Solana crates
    • ๐Ÿ”ง Extend Anchor macro library
    • ๐Ÿ“š Improve documentation
    • ๐Ÿงช Write test coverage
    • ๐ŸŽฏ Design SPL standards
  3. Earn On-Chain Reputation & Rewards

    Contribution โ†’ Code Review โ†’ Validation โ†’ SCR Reward
                                  โ†“
                           Public Reputation on-chain
    
  4. Solana Ecosystem Accelerates

    • Hundreds of AI agents working 24/7
    • Bugs caught earlier, features shipped faster
    • Community-vetted, cryptographically signed PRs
    • Sustainable incentives via SCR rewards

Example flow:

Node Operator submits to network:
  "I can fix bugs in anchor-lang"
    โ†“
Agent network proposes task:
  "Add missing tests to macro module"
    โ†“
Agent executes:
  - Audit code
  - Identify gaps
  - Write tests
  - Submit PR with explanation
    โ†“
Community validates:
  - Code review passes
  - Tests pass
  - Maintainers approve
    โ†“
Agent earns SCR + public reputation

End Goal: 10,000+ AI agents maintaining Solana, enabling 100x developer velocity.


๐Ÿค Contributing

SolCoder is 100% open-source under MIT. We welcome contributions from builders of all levels.

How to Contribute

  1. Share feedback

  2. Improve code

    • Fork the repo โ†’ Create feature branch โ†’ Make changes โ†’ Test โ†’ PR
    • Follow CLAUDE.md for architecture & coding standards
    • Target โ‰ฅ80% coverage in src/solcoder/core and src/solcoder/solana
  3. Add templates

    • Create Anchor blueprint in templates/
    • Include tests, client stubs, README
    • Submit PR with use-case
  4. Expand knowledge base

    • Write Solana deep-dives in knowledge/
    • Improve Anchor patterns docs
    • Submit PRs or Discussions
  5. Improve docs & UX

    • Write tutorials for beginners
    • Improve error messages
    • Translate to other languages

Development Workflow

# Setup
poetry install
poetry run solcoder --dry-run-llm     # Verify LLM config

# Make changes
# ...

# Before committing
poetry run ruff check src tests
poetry run black src tests
poetry run pytest --maxfail=1

# Commit (Conventional Commits)
git commit -m "feat: add staking template"

# Push & open PR
git push origin feat/staking-template

Areas We Need Help

  • ๐ŸŽจ UI/UX โ€” Improve REPL styling, themes, error messages
  • ๐Ÿงช Testing โ€” Expand e2e coverage, edge cases
  • ๐Ÿ“š Docs โ€” Tutorials, guides, API reference
  • ๐Ÿ”— Templates โ€” Token Staking, DAO Voting, AMM, Escrow
  • ๐ŸŒ Localization โ€” Translate docs and messages
  • ๐Ÿ”’ Security โ€” Audit, fuzzing, vulnerability research

Future: SCR Token Rewards

Early contributors (Phase 1-3) will receive retroactive airdrops and governance power when SCR launches in Q1 2026.


๐Ÿ“– Documentation

Document Purpose
README This fileโ€”overview & quick start
CLAUDE.md Deep-dive on architecture, patterns, config system
AGENTS.md Contributor guidelines & style standards
PRD Product requirements & vision statement
WBS Work breakdown structure (tasks & owners)
Roadmap Detailed phase plans & milestones
Whitepaper Full vision & technical approach

๐Ÿ†˜ Support & Feedback

  • ๐Ÿ’ฌ GitHub Discussions โ€” Ask questions, share ideas, show demos
  • ๐Ÿ› GitHub Issues โ€” Report bugs or request features
  • ๐Ÿฆ Twitter/X โ€” Latest updates and announcements
  • ๐Ÿ“ง Email โ€” Direct contact
  • ๐Ÿ’ฌ Telegram โ€” Community chat

๐Ÿ“œ License & Security

  • License: MIT (open-source, use freely)
  • Security: For wallet or deployment issues, include CLI output (with API keys redacted)
  • Privacy: Keys stored locally only, encrypted with PBKDF2 + AES-GCM
  • No telemetry: SolCoder doesn't phone home

๐Ÿ™ Acknowledgments

Built with love by the SolCoder team and inspired by the Solana community. Special thanks to:

  • Anchor team โ€” Excellent framework that made this possible
  • Solana validators & DePIN pioneers โ€” Infrastructure backbone
  • Hackathon judges & mentors โ€” Early feedback and support
  • You โ€” For believing in a vision where anyone can build on Solana

โšก Ready to Build?

poetry run solcoder

Transform your Solana ideas into deployed dApps at light speed.

๐Ÿš€ SolCoder โ€” Where AI meets blockchain.


Made with โค๏ธ for the Solana ecosystem | GitHub | Twitter | Whitepaper

About

SolCoder CLI App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages