Sweep CLI Installation
Sweep CLI is a locally running version of Sweep (no data will enter our servers).
To use our hosted version of Sweep, install it here (2 min) (opens in a new tab).
Install the Sweep CLI
pip install sweepai
Initialize the Sweep CLI
Initialize the CLI with your OpenAI, Anthropic and GitHub API keys:
sweep init
and follow the prompts to enter your API keys.
Run the Sweep CLI
Create a GitHub Issue like the examples in our guide in your repo, and run the following command:
sweep run https://github.com/YOUR-USERNAME/YOUR-REPO/issues/1
To have Sweep automatically fix newly created issues, you can also run the following command:
sweep watch YOUR-USERNAME/YOUR-REPO
π Congratulations!
You have successfully set up the Sweep CLI. You can now use Sweep to help handle GitHub issues and pull requests.
To set up Sweep for your organization, book a call (opens in a new tab) with us for a commercial license.
Bonus (optional)
Ripgrep
Our search pipeline involves agentic search which sometimes uses Ripgrep, which you can install by running:
brew install ripgrep
For other methods of installation, you can visit here (opens in a new tab)
Eslint
If you're editing Javascript / Typescript code, our code editing agent will use your global copy of eslint. You need npm and npx installed, and you can install all the required packages with
npm i -g typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import
You can double check it's working with:
npx eslint --version