---
name: devflow:start
description: 启动 DevFlow 服务端（API + Dashboard），显示访问信息
required_mcp_tools: []
---

# DevFlow Start

启动 DevFlow 开发环境。使用 `npx devflow start` 命令，无论在哪个目录下调用都能正确启动 DevFlow 服务。

## 执行步骤

1. **使用 npx devflow start 启动**
   ```bash
   npx devflow start
   ```
   
   Server 启动后同时提供：
   - REST API（默认端口 13337）
   - Dashboard（由 Server 在同一端口提供静态文件服务）

2. **显示启动信息**
   服务启动后，显示以下信息：

   ```
   ╔═══════════════════════════════════════════════════════════╗
   ║  DevFlow Started!                                      ║
   ╠═══════════════════════════════════════════════════════════╣
   ║  Server + Dashboard: http://localhost:13337            ║
   ║                                                        ║
   ║  Press Ctrl+C to stop                                  ║
   ╚═══════════════════════════════════════════════════════════╝
   ```

3. **保持运行**
   - `devflow start` 会持续运行直到 Ctrl+C
   - API 和 Dashboard 由 CLI 统一管理生命周期

## 注意事项

- Server 和 Dashboard 共用端口 13337（Dashboard 作为静态文件由 server 提供）
- 使用 `npx devflow start` 从任意目录启动，不依赖当前工作目录
- 如果端口被占用，提示用户 `lsof -i :13337` 检查

## 故障排除

如果启动失败：
1. 检查端口是否被占用：`lsof -i :13337`
2. 确认 devflow 已安装：`npx devflow --version`
3. 如需后台运行：`npx devflow start --background`
