# Sweep — AI Junior Developer for GitHub > AI-powered GitHub bot that turns issues into pull requests. Sweep reads your codebase, plans changes, writes code, and handles review feedback automatically. ## Install Save as a script file and run: ## Quick Use 1. Install the GitHub App: [github.com/apps/sweep-ai](https://github.com/apps/sweep-ai) 2. Create an issue with the prefix `Sweep:` 3. Sweep reads your codebase, plans changes, and opens a PR ```markdown Issue title: Sweep: Add dark mode toggle to settings page Issue body: Add a dark mode toggle in the user settings. Use the existing ThemeProvider. ``` ## What is Sweep? Sweep is an AI-powered GitHub bot that turns issues into pull requests. When you create an issue prefixed with "Sweep:", it reads your entire codebase, plans the necessary changes, writes the code, and opens a PR — then iterates based on your review comments. **Answer-Ready**: Sweep is an AI GitHub bot that converts issues into pull requests automatically. It reads your codebase, plans multi-file changes, writes code, runs tests, and responds to review comments. Works with any GitHub repository. **Best for**: Teams wanting to automate routine coding tasks via GitHub issues. **Works with**: Any GitHub repository (public or private). **Setup time**: Under 2 minutes (GitHub App install). ## Core Features ### 1. Issue-to-PR Pipeline ``` GitHub Issue "Sweep: ..." → Codebase analysis → Change plan (posted as comment) → Code changes across multiple files → PR with description and diff → Responds to review comments ``` ### 2. Codebase Understanding Sweep indexes your entire repo to understand: - Project structure and patterns - Import relationships - Naming conventions - Test patterns ### 3. Multi-File Changes Unlike simple code generators, Sweep handles coordinated changes: ``` Sweep: Add user avatar upload → Modified: src/api/users.ts (new endpoint) → Modified: src/components/AvatarUpload.tsx (new component) → Modified: src/types/user.ts (updated interface) → Created: tests/avatar-upload.test.ts (new tests) ``` ### 4. Review Comment Handling ```markdown Review comment: "Use presigned URLs instead of direct upload" Sweep: Updates the implementation, pushes new commits ``` ### 5. Configuration ```yaml # .sweep/config.yaml description: "E-commerce platform using Next.js and Prisma" rules: - "Always use TypeScript strict mode" - "Follow the existing error handling pattern in src/lib/errors.ts" - "Write tests for all new API endpoints" blocked_dirs: - "vendor/" - "generated/" ``` ## Use Cases | Task | Example Issue | |------|--------------| | Bug fixes | "Sweep: Fix null pointer in user search" | | Features | "Sweep: Add CSV export to reports page" | | Refactoring | "Sweep: Convert class components to hooks" | | Tests | "Sweep: Add unit tests for auth module" | | Docs | "Sweep: Add JSDoc to all exported functions" | ## FAQ **Q: Is Sweep free?** A: Free for public repos. Paid plans for private repos starting at $480/year. **Q: How accurate is it?** A: Best for well-defined, scoped tasks. Complex architectural changes may need human guidance. **Q: Does it run tests?** A: Yes, Sweep runs your CI pipeline and fixes failures when possible. ## Source & Thanks > Created by [Sweep AI](https://github.com/sweepai). Licensed under AGPL-3.0. > > [sweepai/sweep](https://github.com/sweepai/sweep) — 7k+ stars ## 快速使用 1. 安装 GitHub App: [sweep-ai](https://github.com/apps/sweep-ai) 2. 创建以 `Sweep:` 开头的 Issue 3. Sweep 自动读代码、规划变更、开 PR ## 什么是 Sweep? Sweep 是 AI GitHub 机器人,将 Issue 自动转化为 Pull Request。读取整个代码库,规划多文件变更,编写代码,响应评审评论。 **一句话总结**:Sweep 是 AI GitHub 机器人,自动将 Issue 转化为 PR,支持多文件变更、测试运行和评审响应。 **适合人群**:希望通过 GitHub Issue 自动化日常编码任务的团队。**安装时间**:2 分钟内。 ## 核心功能 ### 1. Issue 到 PR 流水线 创建 Issue → 代码分析 → 变更计划 → 编码 → 开 PR。 ### 2. 多文件协调变更 理解项目结构,跨文件协调修改。 ### 3. 评审响应 根据 Code Review 评论自动修改代码。 ### 4. 可配置规则 通过 `.sweep/config.yaml` 定义项目规范。 ## 常见问题 **Q: 免费吗?** A: 公开仓库免费,私有仓库付费($480/年起)。 **Q: 会跑测试吗?** A: 会,运行 CI 流水线并尝试修复失败。 ## 来源与致谢 > [sweepai/sweep](https://github.com/sweepai/sweep) — 7k+ stars, AGPL-3.0 --- Source: https://tokrepo.com/en/workflows/c1ba884a-121d-417e-a80b-606662d24f48 Author: Script Depot