/dev
Standard flow to start the AIHelms local development environment.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/dev
Context preview
What this command does when you run it.
Standard flow to start the AIHelms local development environment.
Command definition
dev.mdStart Dev Environment
Standard flow to start the AIHelms local development environment.
Prerequisites
1. Docker is running 2. `.env` file exists (copy from `.env.example` if not) 3. Python environment activated (conda activate aihelms) 4. Node.js and npm available
Startup Flow
Step 1: First Time Setup
./dev/setup
Or manually:
cp .env.example .env
cd apps && pip install -e ".[dev]"
cd ui && npm install
Step 2: Start Middleware
./dev/start-docker-compose
Verify:
docker compose -f docker-compose.middleware.yaml -p aihelms ps
Step 3: Backend
./dev/start-api
Verify: `curl http://localhost:8000/api/health` returns `{"status":"ok"}`
Note: `start-api` simultaneously starts uvicorn (hot reload) and Celery worker.
Step 4: Frontend
./dev/start-web
Starts both admin (port 4001) and web (port 4002) dev servers.
Unified access via Nginx: `http://<NGINX_SERVER_NAME>:<WEB_PORT>/admin` and `http://<NGINX_SERVER_NAME>:<WEB_PORT>/`
Service Ports
| Service | Port | Description | |---------|------|-------------| | FastAPI | 8000 | Backend API | | Vue Admin | 4001 | Admin dev server | | Vue Web | 4002 | User app dev server | | Nginx | WEB_PORT (default 80) | Unified gateway (dev + prod) | | PostgreSQL | DB_PORT (default 5432) | Database | | Redis | REDIS_PORT (default 6379) | Cache | | LiteLLM | LITELLM_PORT (default 4000) | Model proxy |
Troubleshooting
Database connection failed
docker compose -f docker-compose.middleware.yaml -p aihelms ps db
docker compose -f docker-compose.middleware.yaml -p aihelms logs db
# Rebuild database (will clear data)
docker compose -f docker-compose.middleware.yaml -p aihelms down -v
docker compose -f docker-compose.middleware.yaml -p aihelms up -d
LiteLLM startup failed
docker compose -f docker-compose.middleware.yaml -p aihelms logs litellm
# Common cause: LITELLM_MASTER_KEY or LITELLM_SALT_KEY not set
grep LITELLM .env
Frontend dependency install failed
# Clear cache and reinstall
rm -rf node_modules packages/*/node_modules
npm install
Port already in use
lsof -i :8000
lsof -i :4001
lsof -i :4002
Read more
Start Dev Environment
Standard flow to start the AIHelms local development environment.
Prerequisites
1. Docker is running 2. `.env` file exists (copy from `.env.example` if not) 3. Python environment activated (conda activate aihelms) 4. Node.js and npm available
Startup Flow
Step 1: First Time Setup
./dev/setup
Or manually:
cp .env.example .env cd apps && pip install -e ".[dev]" cd ui && npm install
Step 2: Start Middleware
./dev/start-docker-compose
Verify:
docker compose -f docker-compose.middleware.yaml -p aihelms ps
Step 3: Backend
./dev/start-api
Verify: `curl http://localhost:8000/api/health` returns `{"status":"ok"}`
Note: `start-api` simultaneously starts uvicorn (hot reload) and Celery worker.
Step 4: Frontend
./dev/start-web
Starts both admin (port 4001) and web (port 4002) dev servers.
Unified access via Nginx: `http://<NGINX_SERVER_NAME>:<WEB_PORT>/admin` and `http://<NGINX_SERVER_NAME>:<WEB_PORT>/`
Service Ports
| Service | Port | Description | |---------|------|-------------| | FastAPI | 8000 | Backend API | | Vue Admin | 4001 | Admin dev server | | Vue Web | 4002 | User app dev server | | Nginx | WEB_PORT (default 80) | Unified gateway (dev + prod) | | PostgreSQL | DB_PORT (default 5432) | Database | | Redis | REDIS_PORT (default 6379) | Cache | | LiteLLM | LITELLM_PORT (default 4000) | Model proxy |
Troubleshooting
Database connection failed
docker compose -f docker-compose.middleware.yaml -p aihelms ps db docker compose -f docker-compose.middleware.yaml -p aihelms logs db # Rebuild database (will clear data) docker compose -f docker-compose.middleware.yaml -p aihelms down -v docker compose -f docker-compose.middleware.yaml -p aihelms up -d
LiteLLM startup failed
docker compose -f docker-compose.middleware.yaml -p aihelms logs litellm # Common cause: LITELLM_MASTER_KEY or LITELLM_SALT_KEY not set grep LITELLM .env
Frontend dependency install failed
# Clear cache and reinstall rm -rf node_modules packages/*/node_modules npm install
Port already in use
lsof -i :8000 lsof -i :4001 lsof -i :4002
企业级 AI 资源纳管平台,提供统一 AI网关、Token调度能力,纳管 OpenAI、Azure、Claude、DeepSeek 等主流模型,并支持 MCP 工具与 Skill 的集中注册分发。具备内外双轨定价、成本归因、统一身份认证、安全审计与效能报表,帮助企业精准控制成本、量化 ROI,高效治理 AI 资产。
Repo: beizhu-1209/AIHelms

