Skip to main content

Sweep software chores

Project description

Bug Reports & Feature Requests ⟶  Code Changes

Landing Page Docs PyPI
Sweep - Sweep is an AI-powered junior dev on your team. | Product Hunt

Sweep is an AI junior developer that transforms bug reports & feature requests into code changes.

Describe bugs, small features, and refactors like you would to a junior developer, and Sweep:

  1. 🔍 reads your codebase
  2. 📝 plans the changes
  3. writes a pull request with code

See highlights at https://docs.sweep.dev/examples.

Demo

🌠 Sweep

  • 🔧 Turns issues directly into pull requests (without an IDE)
  • 👀 Addresses developer replies & comments on its PRs
  • 🕵️‍♂️ Uses embedding-based code search, with popularity reranking for repository-level code understanding (🔍 Rebuilding our Search Engine in a Day)
  • 🎊 New: Fixes PRs based on Github Actions feedback
  • 🎊 New: Sweep Chat, a local interface for Sweep (see below)

🚀 Getting Started

🍲 Recipes

To get the best performance from Sweep, we recommend the following approach to writing github issues/chats.

For harder problems, try to provide the same information a human would need. For simpler problems, providing a single line and a file name should suffice.

A good issue might include:

Where to look
[file name or function name]
What to do
[change the logic to do this]
Additional Context (optional)
[there's a bug/we need this feature/there's this dependency]
In sweepai/app/ui.py use an os-agnostic temp directory N/A
In on_comment.py we should not fire an event because it's possible that the comment is on a closed PR
In the config loader in packages/server/src/config.ts add a third option called "env" to load the config settings from environment variables At present, there are two options: 1. ... and 2. ...

If you want Sweep to use a file, try to mention the full path. Similarly, to have Sweep use a function, try to mention the class method or what it does. Also see ✨ Tips and tricks for Sweep.

Limitations:

Sweep is unlikely to complete complex issues on the first try, similar to the average junior developer. Here are Sweep's limitations(for now):

  • Try to change less than 200 lines of code
  • Try to modify less than 3 files
  • Do not include files with more than 1500 lines of code

✨ Sweep Github App

Setting up Sweep is as simple as adding the GitHub bot to a repo, then creating an issue for the bot to address. Here are the steps to get started:

  1. Add the Sweep GitHub app to your desired repos
  2. Create a new issue in your repo. The issue should describe the problem or feature you want Sweep to address. For example, you could write "Sweep: In sweepai/app/ui.py use an os-agnostic temp directory"
  3. Respond with a message like "Sweep: use a different package instead" to have Sweep retry the issue or pull request. You can also comment on the code for minor changes!

We support all languages GPT4 supports, including Python, Typescript, Rust, Go, Java, C# and C++.

🖥️ Sweep Chat

Sweep Chat allows you to interact with Sweep and GitHub locally. You can collaborate on the plan with Sweep, and then have it create the pull request for you. Here's how to use Sweep Chat:

Prerequisites: Install Sweep GitHub app to your repository

  1. Run pip3 install sweepai && sweep. Note that you need python 3.10+.

    • Alternatively run pip3 install --force-reinstall sweepai && sweep if the previous command fails.
    • This runs GitHub authentication in your browser.
  2. Copy the 🔵 blue 8-digit code from your terminal into the page. You should only need to do the authentication once.

    • Wait a few seconds and Sweep Chat will start.
  3. Choose a repository from the dropdown at the top (the Github app must be installed to this repository).

    • ⚡ Start chatting with Sweep Chat! ⚡

Tips:

  • 🔍 Relevant searched files will show up on the right.
  • 🔘 Sweep Chat creates PRs when the "Create PR" button is clicked.
  • 💡 You can force dark mode by going to http://127.0.0.1:7861/?__theme=dark.

From Source

If you want the nightly build and or if the latest build has issues.

  1. git clone https://github.com/sweepai/sweep && poetry install
  2. python sweepai/app/cli.py. Note that you need python 3.10+.

💰 Pricing

  • We charge $120/month for 60 GPT4 tickets per month.
  • For unpaid users, we offer 5 free GPT4 tickets per month.
  • We also offer unlimited GPT3.5 tickets.

🤝 Contributing

Contributions are welcome and greatly appreciated! For detailed guidelines on how to contribute, please see the CONTRIBUTING.md file. For more detailed docs, see 🚀 Quickstart.

📘 Story

We were frustrated by small tickets, like simple bug fixes, annoying refactors, and small features. Each task required us to open our IDE to fix simple bugs. So we decided to leverage the capabilities of ChatGPT to address this directly in GitHub.

Unlike existing AI solutions, this can solve entire tickets and can be parallelized + asynchronous: developers can spin up 10 tickets and Sweep will address them all at once.

📚 The Stack

  • GPT-4 32k 0613 (default)
  • ActiveLoop DeepLake for Vector DB with MiniLM L12 as our embeddings model
  • Modal Labs for infra + deployment
  • Gradio for Sweep Chat

🗺️ Roadmap

See 🗺️ Roadmap

⭐ Star History

Star History Chart

Consider starring us if you're using Sweep so more people hear about us!

Contributors

Thank you for your contribution!

and, of course, Sweep!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sweepai-0.4.9.tar.gz (72.1 kB view details)

Uploaded Source

Built Distribution

sweepai-0.4.9-py3-none-any.whl (82.1 kB view details)

Uploaded Python 3

File details

Details for the file sweepai-0.4.9.tar.gz.

File metadata

  • Download URL: sweepai-0.4.9.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for sweepai-0.4.9.tar.gz
Algorithm Hash digest
SHA256 048efde535ea9a97e8b4b73d82053c5d997fc5e7edf1b4ad9e7f9da74a279bc9
MD5 602004f1ac33674b719db60c490fed99
BLAKE2b-256 d8f29a019c413a6eb9fd3ce29500d1e36ec434775c0031f9f8265f1ee9c3fc63

See more details on using hashes here.

File details

Details for the file sweepai-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: sweepai-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 82.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for sweepai-0.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c7cf942e843f6139c5a7cc25defa8f6f413cbcf033c4bbc178ca4fd19c2420c7
MD5 3ddaf51b9a14f8d53ba6104c3fd5493e
BLAKE2b-256 ee595aa9b77de07420879069b811bdb9428acb094840863a1824bc2c666a629e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page