本地 AI 代码仓库分析助手,使用 Go、SQLite 和火山方舟模型。
- 安全打开并索引本地代码仓库
- 忽略依赖、构建产物、Git 数据和二进制文件
- 文件树筛选与带行号的代码预览
- 80 行重叠代码切片与关键词/路径混合检索
- GLM 5.2、DeepSeek V4 Pro 和 Flash 模型切换
- SQLite 会话、消息和文件引用持久化
- 回答引用点击跳转
- API Key 隔离、路径校验、请求限制和上游错误映射
要求 Go 1.26 或更高版本。在 PowerShell 中:
cd D:\code\piagent
$env:ARK_API_KEY="你的火山方舟API Key"
.\web-playground\start.cmd浏览器会打开 http://127.0.0.1:4173。首次打开仓库时会在本地建立索引。
SQLite 数据保存在 web-playground/data/assistant.sqlite,不会提交到 Git。API Key 只存在于 Go 服务进程环境变量中。
cd D:\code\piagent\web-playground
go test ./...piagent启动
$env:PI_CODING_AGENT_DIR="D:\code\piagent\.pi-local"
.\node_modules\.bin\tsx.cmd --tsconfig .\tsconfig.json .\packages\coding-agent\src\cli.ts `
--provider volcengine `
--model glm-5-2-260617