Dev server supervisor for AI coders
Project description
devpilot
Dev server supervisor for AI coders.
AI coding agents (Claude Code, Cursor, Copilot) break dev servers constantly — editing files mid-reload, causing port conflicts, spawning zombie processes. Then they panic: kill random PIDs, rotate ports, nuke all Python processes. It gets worse.
devpilot gives AI coders structured, reliable process awareness. It manages dev server lifecycles, detects reloads, checks health, and returns JSON that AI can parse and act on — so the panic cycle never starts.
Install
pip install devpilot-ai
Or with pipx for global CLI use:
pipx install devpilot
Quick Start
Auto-detect and configure your project
devpilot init
Scans for pyproject.toml, requirements.txt, package.json and generates .devpilot.yaml with the right framework profiles.
Start your dev server under devpilot
devpilot run api "uvicorn main:app --reload --port 8000"
Or attach to an already-running server
devpilot attach api --port 8000
Check what happened after editing a file
devpilot changed src/main.py
Returns structured JSON:
[{
"service": "api",
"reload": "reloaded",
"reload_time_ms": 340,
"healthy": true,
"response_time_ms": 12
}]
Manage everything at once
devpilot up # start all services from .devpilot.yaml
devpilot down # stop all services
devpilot status # health check everything
Why This Exists
When an AI coder edits your code, the dev server reloads. But the AI has no way to know:
- Did the reload succeed or crash?
- Is the server healthy?
- Which service was affected by that file change?
- Should it wait, retry, or escalate?
Without answers, AI coders guess. They kill processes they shouldn't, rotate ports randomly, and create cascading failures. devpilot closes this feedback loop with structured, reliable signals.
How It Works
Two modes:
- Managed (
devpilot run) — devpilot spawns the process, captures stdout, detects reload patterns, owns the full lifecycle - Attached (
devpilot attach) — devpilot monitors an existing process by port, health-check only, never kills what it didn't start
Three recovery tiers:
| Tier | Action | Example |
|---|---|---|
| Silent | Auto-restart with backoff | Process crashed, retry up to 3x |
| Report | Auto-recover + notify | Repeated crashes, port reassignment |
| Escalate | Report only, never act | Unknown process on port, code errors |
Core principle: devpilot never rotates ports randomly, never kills processes it didn't start, never nukes all Python tasks.
Built-in Framework Profiles
| Framework | Detection | Default Port |
|---|---|---|
| FastAPI/Uvicorn | uvicorn in command |
8000 |
| Flask | flask in command |
5000 |
| Django | manage.py runserver |
8000 |
| Vite | vite in command |
5173 |
| Next.js | next dev in command |
3000 |
| Create React App | react-scripts start |
3000 |
Custom frameworks can be added in .devpilot.yaml.
Configuration
.devpilot.yaml (generated by devpilot init or written manually):
services:
api:
cmd: "uvicorn main:app --reload --port 8000"
port: 8000
health: /health
file_patterns:
- "src/**/*.py"
reload_patterns:
- "Started reloading"
- "Application startup complete"
frontend:
cmd: "npm run dev"
port: 3000
file_patterns:
- "src/**/*.tsx"
- "src/**/*.css"
recovery:
max_retries: 3
backoff_seconds: [1, 3, 5]
auto_port_reassign: true
All Commands
| Command | Description |
|---|---|
devpilot init |
Auto-detect project and generate .devpilot.yaml |
devpilot run <name> <cmd> |
Start a managed service |
devpilot attach <name> --port N |
Monitor an existing service |
devpilot status [name] |
Health check one or all services |
devpilot changed <filepath> |
Report file change, get reload/health result |
devpilot stop [name] [--all] |
Stop managed services |
devpilot restart <name> |
Restart a managed service |
devpilot log [name] |
Show recent events |
devpilot cleanup |
Remove stale state and dead PIDs |
devpilot up |
Start all services from config |
devpilot down |
Stop all services |
Every command returns structured JSON to stdout with exit codes 0 (success), 1 (all failed), or 2 (partial).
For AI Tool Authors
devpilot is designed to be called programmatically. The JSON output and deterministic exit codes make it straightforward to integrate into any AI coding workflow:
import subprocess, json
result = subprocess.run(
["devpilot", "changed", "src/main.py"],
capture_output=True, text=True
)
changes = json.loads(result.stdout)
for svc in changes:
if not svc["healthy"]:
# check the reload status before panicking
if svc["reload"] == "reload_failed":
print(f"Code error in {svc['service']}: {svc.get('error')}")
elif svc["reload"] == "timeout":
print(f"Reload slow for {svc['service']}, waiting...")
Requirements
- Python 3.10+
- Works on Windows, macOS, and Linux
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 devpilot_ai-0.1.1.tar.gz.
File metadata
- Download URL: devpilot_ai-0.1.1.tar.gz
- Upload date:
- Size: 52.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9495eb6848b97d39679720b7076692b4f3d7cf2d0ba7d23083ba6e19c972cace
|
|
| MD5 |
fe31da8d2732ed9dca190ba6450147da
|
|
| BLAKE2b-256 |
abe0b33f68d922c390dbd4a06e81b0bf4bb8184dd06fde893fe04fc41d9d7f1a
|
Provenance
The following attestation bundles were made for devpilot_ai-0.1.1.tar.gz:
Publisher:
publish.yml on benzsevern/devpilot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devpilot_ai-0.1.1.tar.gz -
Subject digest:
9495eb6848b97d39679720b7076692b4f3d7cf2d0ba7d23083ba6e19c972cace - Sigstore transparency entry: 1188898292
- Sigstore integration time:
-
Permalink:
benzsevern/devpilot@b505d602a48218ca204adc5c31c8b54f52698453 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/benzsevern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b505d602a48218ca204adc5c31c8b54f52698453 -
Trigger Event:
release
-
Statement type:
File details
Details for the file devpilot_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: devpilot_ai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33d596ddd8148c762757de3faa604afd031cc2cf5858dc8ead557f9e05c7c244
|
|
| MD5 |
c621ded74fc7dfb302f0a50a900f1c0e
|
|
| BLAKE2b-256 |
c9f9731cf1f3a6ac13aff28db94f60e9d91835a4c26cadd29faa746821e9cb38
|
Provenance
The following attestation bundles were made for devpilot_ai-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on benzsevern/devpilot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devpilot_ai-0.1.1-py3-none-any.whl -
Subject digest:
33d596ddd8148c762757de3faa604afd031cc2cf5858dc8ead557f9e05c7c244 - Sigstore transparency entry: 1188898304
- Sigstore integration time:
-
Permalink:
benzsevern/devpilot@b505d602a48218ca204adc5c31c8b54f52698453 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/benzsevern
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b505d602a48218ca204adc5c31c8b54f52698453 -
Trigger Event:
release
-
Statement type: