A CLI tool for creating and serving DSPy projects
Project description
dspy-cli
CLI for deploying DSPy programs as HTTP APIs. Auto-generates endpoints, OpenAPI specs, and Docker configs.
Reduces deployment setup from hours to minutes for developers embedding LLM features in applications.
Quick Start
# Install
uv tool install dspy-cli
# Create project
dspy-cli new blog-tagger -s "post -> tags: list[str]"
cd blog-tagger
# Serve locally
dspy-cli serve
Test the endpoint:
curl -X POST http://localhost:8000/BlogTaggerPredict \
-H "Content-Type: application/json" \
-d '{"post": "How to build Chrome extensions with AI..."}'
Response:
{
"tags": ["chrome-extensions", "ai", "development", "javascript"]
}
Features
- Auto-discovery of modules as HTTP endpoints
- Docker configs and OpenAPI specs generated
- Hot reload development server
- Model switching via config file
- MCP tool support
Commands
dspy-cli new <name> [-s "input -> output"] # Create project
dspy-cli serve [--ui] # Start HTTP server
dspy-cli g scaffold <program> [-m CoT] # Add module to project
See Command Reference for complete documentation.
Documentation
- Getting Started - Quickstart guide
- Commands - CLI reference
- Deployment - Production deployment
- Configuration - Model and environment settings
- Examples - Sample projects
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dspy_cli-0.1.6.tar.gz.
File metadata
- Download URL: dspy_cli-0.1.6.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afcb78e604ae72add41bd0c3154d5009d1b9a059bea2811f8fabd26880821dd1
|
|
| MD5 |
be0e6ee8f8a0a4f6b9c06fc1e2172672
|
|
| BLAKE2b-256 |
c8ac3f61094c2c5c4d27909a03e6bbebfcb1e8f38ee52d4aca064f786dac488d
|
File details
Details for the file dspy_cli-0.1.6-py3-none-any.whl.
File metadata
- Download URL: dspy_cli-0.1.6-py3-none-any.whl
- Upload date:
- Size: 68.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3b3c16a98b37da16a7e14c97021135b4da2824e3f45c05983815484c4453ab1
|
|
| MD5 |
714676b7abed12554d89c4177d048f0e
|
|
| BLAKE2b-256 |
abc30378fc5dbc0ad6ad22c47f0617840c9b0467ddeffa2069c88bc943e53b14
|