Running Locally
Run the PlanSpec server for local development and Claude integration.
Quick Start
Start the server with default settings:
bash
planspec serve
The server runs at http://127.0.0.1:3000 by default.
Configuration
Port and Host
bash
# Custom port
planspec serve --port 8080
# Listen on all interfaces
planspec serve --host 0.0.0.0
# Both
planspec serve --host 0.0.0.0 --port 8080
Environment Variables
| Variable | Description | Default |
|---|---|---|
PLANSPEC_PORT | Server port | 3000 |
PLANSPEC_HOST | Bind address | 127.0.0.1 |
PLANSPEC_LOG | Log level | info |
bash
PLANSPEC_PORT=8080 PLANSPEC_LOG=debug planspec serve
Working Directory
By default, the server watches the current directory for plan files.
bash
# Serve plans from a specific directory
cd /path/to/project
planspec serve
# Or specify the directory
planspec serve --dir /path/to/project
Development Mode
Enable hot reload during development:
bash
planspec serve --watch
Changes to plan files are automatically detected.
Health Check
Verify the server is running:
bash
curl http://localhost:3000/health
Response:
json
{
"status": "ok",
"version": "0.1.0"
}
CORS Configuration
For browser-based clients:
bash
planspec serve --cors-origin "http://localhost:3001"
Allow multiple origins:
bash
planspec serve --cors-origin "http://localhost:3001,http://localhost:5173"
Docker
Run in a container:
bash
docker run -p 3000:3000 -v $(pwd):/plans ghcr.io/exponential-build/planspec serve
Next Steps
- API Overview — Explore the API endpoints
- Claude Integration — Connect with Claude