Sahadabdullacp/devos

GitHub: Sahadabdullacp/devos

一个语音控制的 AI 操作系统,帮助开发者自动化代码审查、故障响应与团队协作。

Stars: 0 | Forks: 0

# DevOS — 面向开发者的自主 AI 操作系统 一个智能的、语音控制的 AI 系统,能够自主管理您的开发工作流程,支持实时 GitHub 集成、子代理和活动监控。 ![DevOS Dashboard](https://img.shields.io/badge/Next.js-14-black?style=flat&logo=next.js) ![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?style=flat&logo=typescript) ![Groq AI](https://img.shields.io/badge/Groq_AI-llama--3.3-orange?style=flat) ![License](https://img.shields.io/badge/license-MIT-green) ## ✨ 功能特性 - 🎤 **语音命令中心** - 通过自然语言语音执行开发任务 - 🤖 **智能子代理** - Bug 修复器、代码审查员、事件代理、晨会机器人 - 📊 **实时仪表板** - 带有 Supabase 实时同步的代理活动动态 - 🔗 **GitHub 集成** - 监控仓库、审查 PR、跟踪工作流 - 📈 **指标与分析** - 今日已审查的 PR、修复的 Bug、解决的事件 - 🗺️ **代码库健康地图** - 被监控仓库的可视化健康评分 - 💬 **文本转语音输出** - 浏览器原生的语音响应 - 🌐 **100% 免费技术栈** - 使用 Groq AI 和 Supabase 免费额度,零成本 ## 🚀 技术栈 - **前端**: Next.js 14(应用路由)、TypeScript、Tailwind CSS - **AI 引擎**: Groq AI(llama-3.3-70b-versatile) - 每日 14,400 次免费请求 - **数据库**: Supabase(PostgreSQL + 实时订阅) - **语音 I/O**: Web Speech API(识别)+ 浏览器 speechSynthesis - **GitHub**: 带有 HMAC Webhook 验证的 REST API 集成 - **状态管理**: Zustand ## 📦 安装 1. **克隆仓库** ```bash git clone https://github.com/Sahadabdullacp/devos.git cd devos ``` 2. **安装依赖** ```bash npm install ``` 3. **设置环境变量** 创建 `.env.local` 文件: # Groq AI(从 https://console.groq.com 获取) GROQ_API_KEY=gsk_your_groq_api_key_here # Supabase(从 https://supabase.com 获取) NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key_here SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here # GitHub(从 https://github.com/settings/tokens 获取) GITHUB_TOKEN=ghp_your_github_token_here # 被监控的仓库 NEXT_PUBLIC_WATCHED_REPOS=microsoft/vscode,vercel/next.js ``` 4. **设置 Supabase 数据库** 在 Supabase SQL 编辑器中运行 SQL 架构(请参考 `supabase-schema.sql`) 5. **运行开发服务器** ```bash npm run dev ``` 6. **打开浏览器** ``` http://localhost:3000 ``` ## 🔑 API 密钥设置 ### Groq AI(免费) 1. 访问 [console.groq.com](https://console.groq.com) 2. 注册(无需信用卡) 3. 导航至 API Keys → Create API Key 4. 复制密钥(以 `gsk_` 开头) 5. 添加到 `.env.local` **免费额度**: 每日 14,400 次请求,每分钟 30 次请求,每秒 500+ 个 token ### Supabase(免费) 1. 访问 [supabase.com](https://supabase.com) 2. 创建新项目 3. 进入 Project Settings → API 4. 复制 URL 和匿名密钥 5. 复制服务角色密钥(用于后端操作) 6. 在 SQL 编辑器中运行 `supabase-schema.sql` **免费额度**: 500MB 数据库,无限 API 请求 ### GitHub 令牌(免费) 1. 访问 [github.com/settings/tokens](https://github.com/settings/tokens) 2. 生成新令牌(经典) 3. 选择作用域:`repo`、`workflow`、`read:org` 4. 复制令牌(以 `ghp_` 开头) ## 🎯 使用方法 ### 语音命令 点击麦克风按钮并说出指令: - “修复失败的测试” - “审查最新 PR” - “晨会” - “事件报告” ### 快速命令按钮 点击任意预配置的命令按钮即可立即执行。 ### 被监控的仓库 在 `.env.local` 中编辑 `NEXT_PUBLIC_WATCHED_REPOS` 以监控您的仓库。 ## 🤖 子代理 ### Bug 修复器 - 分析 GitHub 工作流中的失败测试 - 提供根本原因分析 - 建议有针对性的修复方案 ### 代码审查员 - 审查开放的 Pull Request - 检查安全性、性能、架构问题 - 提供可操作的建议 ### 事件代理 - 响应生产事件 - 评估严重性和影响 - 建议缓解措施 ### 晨会机器人 - 生成每日团队简报 - 汇总昨日活动 - 识别阻塞项和优先级 ## 📊 架构 ``` ┌─────────────────┐ │ Voice Input │ │ Web Speech API │ └────────┬────────┘ │ ▼ ┌─────────────────┐ ┌──────────────┐ │ Next.js API │─────▶│ Groq AI │ │ /api/voice │ │ Orchestrator│ └────────┬────────┘ └──────┬───────┘ │ │ │ ▼ │ ┌───────────────┐ │ │ Sub-Agents │ │ │ (Parallel) │ │ └───────┬───────┘ │ │ ▼ ▼ ┌─────────────────┐ ┌──────────────┐ │ Supabase │◀─────│ GitHub API │ │ (Real-time DB) │ │ Integration │ └────────┬────────┘ └──────────────┘ │ ▼ ┌─────────────────┐ │ Live Dashboard │ │ Activity Feed │ └─────────────────┘ ``` ## 🛠️ 开发 ``` # 安装依赖 npm install # 运行开发服务器 npm run dev # 生产环境构建 npm run build # 启动生产服务器 npm start # 代码检查 npm run lint ``` ## 📝 环境变量 | 变量 | 是否必需 | 描述 | |------|----------|------| | `GROQ_API_KEY` | ✅ | 用于代理编排的 Groq AI API 密钥 | | `NEXT_PUBLIC_SUPABASE_URL` | ✅ | Supabase 项目 URL | | `NEXT_PUBLIC_SUPABASE_ANON_KEY` | ✅ | Supabase 匿名密钥(公开) | | `SUPABASE_SERVICE_ROLE_KEY` | ✅ | Supabase 服务角色密钥(后端) | | `GITHUB_TOKEN` | ✅ | GitHub 个人访问令牌 | | `NEXT_PUBLIC_WATCHED_REPOS` | ✅ | 逗号分隔的仓库列表(owner/name) | ## 🚢 部署 ### Vercel(推荐) 1. 将代码推送到 GitHub 2. 在 [Vercel](https://vercel.com) 中导入项目 3. 在 Vercel 仪表板中添加所有环境变量 4. 部署 ### 环境配置 请确保将所有的 `.env.local` 变量添加到 Vercel 的环境变量部分。 ## 📄 许可证 MIT 许可证 - 可自由用于个人或商业项目。 ## 📧 联系 如有疑问或反馈,请在 GitHub 上打开 issue。 # 或 pnpm dev # 或 bun dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. ## 了解更多 To learn more about Next.js, take a look at the following resources: - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! ## 在 Vercel 上部署 The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. ```
标签:AI编程助手, GitHub集成, Groq AI, HMAC webhook, PostgreSQL, Sub-agent, Supabase, Tailwind CSS, TypeScript, Web Speech API, Zustand, 代码审查, 代码库健康地图, 免费技术栈, 威胁情报, 安全插件, 实时仪表板, 开发者工具, 开发者效率, 指标分析, 文本转语音, 智能代理, 站立会议, 自动化攻击, 语音合成, 语音命令中心, 语音控制, 错误修复