πŸŽ‰ LIVE IN SAN FRANCISCO
DSPy Code Banner

Claude Code for DSPy

Comprehensive CLI to Build and Optimize Your DSPy Code

Develop DSPy Applications β€’ Optimize with GEPA

⚑
Fast
From idea to DSPy
🎯
Quality
Modular DSPy code
πŸš€
Optimized
GEPA-powered

πŸ’‘ Note

DSPy Code is in its initial release and under active development. The quality and effectiveness of generated code depends on several factors: the language model you connect, MCP (Model Context Protocol) servers you integrate, and the context you provide to DSPy Code. We're continuously improving based on community feedback.

See It In Action

Watch DSPy Code generate production-ready code in real-time

dspy-code● LIVE

Watch Demo

See DSPy Code in action with a complete walkthrough

What is DSPy Code?

Your AI-Powered DSPy Development Assistant

πŸ—οΈ

Starting a New DSPy Project

Perfect for building a new AI application from scratch, prototyping ideas quickly, and learning DSPy fundamentals.

  • Complete project structure
  • Configuration files
  • Example programs
  • Best practices setup
  • Ready to code in 2 minutes

Example: I want to build a customer support chatbot with sentiment analysis and automated responses.

🧬

Optimizing DSPy Programs with GEPA

Perfect for improving accuracy of existing programs, automatic prompt engineering, and production optimization.

  • Real GEPA execution
  • Automated metric functions
  • Progress tracking & resumption
  • Production-ready optimized code
  • Performance improvements documented

Example: My sentiment analyzer needs optimization. Optimize it with GEPA to improve accuracy.

πŸ”§

Adding DSPy to Existing Projects

Perfect for enhancing existing Python applications, adding AI capabilities to current systems, and modernizing legacy code.

  • Minimal setup (no disruption)
  • Scans your existing code
  • Understands your project structure
  • Generates code that fits your style
  • Works alongside your current code

Example: I have a Django app. I want to add AI-powered document summarization.

πŸ“š

Learning DSPy (No Docs Required!)

Perfect for first time using DSPy, understanding DSPy concepts, and exploring different patterns.

  • No reading required
  • Learn by building
  • Ask questions in natural language
  • Answers using YOUR installed DSPy version

Example: What is a DSPy Signature? How does ChainOfThought work?

πŸ”—

Connecting to MCP Servers

DSPy Code is an MCP Client! Connect to any MCP server to supercharge your DSPy programs with external tools, APIs, and data sources.

  • Access external tools
  • Read from data sources
  • Execute commands
  • Integrate services
  • Build powerful workflows

Example: Build a RAG system that uses MCP to query my company's database and generate answers.

πŸš€

Building Production AI Applications

Perfect for enterprise applications, production deployments, and mission-critical systems.

  • Validated, production-ready code
  • Best practices built-in
  • Error handling and logging
  • Type hints and documentation
  • Optimized performance
  • Export as packages

Quality score: 90+ out of 100 automatically!

The Complete Workflow

Develop β†’ Validate β†’ Optimize with GEPA β†’ Deploy

From idea to production-ready DSPy application in one platform

Phase 1: Development

Build your DSPy application from scratch or enhance existing code.

1./init - Initialize project
2.Natural language commands to generate code
3./validate - Ensure best practices
4.Test and iterate
Start Developing

Phase 2: Optimization

Optimize your working code with GEPA for production.

1./data - Generate training examples
2./optimize - Run GEPA optimization
3./eval - Evaluate improvements
4./export - Package for deployment
Start Optimizing

🎯 The Result

Production-ready DSPy applications with optimized performance, evolved prompts, and documented improvements

Who is This For?

DSPy Code is designed for everyone, from beginners to production teams

Complete Beginners

Never used DSPy before? Perfect! Start here and learn by doing. The CLI teaches you DSPy concepts as you build real programs.

No prerequisites needed.

DSPy Developers

Already know DSPy? Supercharge your workflow with AI-powered code generation, validation, and optimization.

Build faster, optimize smarter.

Production Teams

Building production DSPy applications? Get validated, optimized, production-ready code with GEPA optimization and best practices built-in.

Ship with confidence.

✨ Key Features

Everything you need to build and optimize DSPy applications

Natural Language Interface

Describe what you want in plain English. The CLI generates complete, working DSPy code.

"Build a RAG system for document Q&A"

Real GEPA Optimization

Not mocked. Real GEPA (Genetic Pareto) optimization that improves your programs by 10-30% automatically.

Real GEPA optimization that improves accuracy automatically!

Smart Validation

Every generated code is validated for quality, best practices, and correctness. Score: 90+/100.

Ship with confidence

Version-Aware Intelligence

Adapts to YOUR installed DSPy version. Answers questions using your actual code, not outdated docs.

Always current. Always accurate.

Built-in MCP Client

Connect to any MCP server to access external tools, APIs, databases, and services in your DSPy programs.

Build powerful, connected AI applications.

Learn as You Build

No docs, books, or tutorials needed. Ask questions, get answers from your code, build in real-time.

Interactive learning experience.

Codebase Knowledge

Indexes your DSPy installation and project. Ask questions about your own code!

"Explain my RAG module" - Done!

Universal Model Support

Connect to any LLM: Ollama (local), OpenAI, Anthropic, Gemini. Switch anytime.

Your choice, your control.

Visual Workflow

See how DSPy Code transforms your development process

Type Command

Natural language

AI Generates

Complete code

Validated

Best practices

Deploy

Production ready

πŸ’¬ Real Workflows

See how different users leverage DSPy Code

Workflow 1: Complete Beginner

  • β†’Install DSPy Code
  • β†’/init --fresh
  • β†’"What is DSPy?"
  • β†’"Create a simple text classifier"
  • β†’/save my_first_program.py
  • β†’/run

Result: Working DSPy program, understanding of basics

Workflow 2: Building Production App

  • β†’dspy-code /init in existing project
  • β†’Generate signatures, modules, programs
  • β†’Generate 200 training examples
  • β†’Optimize with GEPA
  • β†’Validate code quality
  • β†’Export as package
  • β†’Deploy

Result: Production-ready AI application

Workflow 3: Learning Advanced Patterns

  • β†’"Show me how ReAct works"
  • β†’"Create a multi-agent system"
  • β†’"Explain GEPA optimization"
  • β†’"Build a RAG system with custom retrieval"

Result: Deep understanding through hands-on building

Quick Start

Get started in minutes

1

Install

pip install dspy-code
2

Start

dspy-code
3

Build

/init
/connect ollama
Create a [your app]

Why DSPy Code?

The only CLI that combines AI-powered code generation with real GEPA optimization

AI-Powered

Natural language to production code. No manual coding required.

Real GEPA

Actual Genetic Pareto optimization, not mocked. Real performance improvements.

Validated Code

Every generated code is validated for quality, best practices, and correctness.

Version-Aware

Adapts to YOUR installed DSPy version. Always current, always accurate.

Common Questions

Do I need to know DSPy first?

No! That's the whole point. DSPy Code teaches you as you build. Just start creating and ask questions when you need help.

Can I use this with my existing DSPy code?

Yes! Run /init in your project directory. DSPy Code will scan your code and help you extend it.

What models can I use?

Any! Ollama (local), OpenAI, Anthropic, Gemini. Connect with one command: /connect ollama llama3.1:8b

Is the optimization real or mocked?

Real GEPA optimization! Actual Genetic Pareto optimization that improves accuracy by 10-30%.

Do I need to read documentation?

No! Just ask DSPy Code. It answers questions using your actual installed DSPy version.

Start Building in 2 Minutes

No docs to read. No tutorials to follow. Just start building.

Installation
pip install --upgrade dspy-code
Free & Open Source
MIT License
Active Development