Sourcery Ai Sourcery Save

Automatically review and improve your Python code. ⭐ this repo and Sourcery Starbot will send you a PR. Or install our CLI to improve your code locally

Project README



Instantly review and improve your Python code to keep your codebase maintainable.

Get started with our CLI to have Sourcery review all your code locally or star this repo to have our GitHub bot review your most popular Python repo


You can have Sourcery review your entire project and make dozens or hundreds (or thousands) of improvements with a single command from the command line.

To start pip install sourcery-cli, login with sourcery login, and then run sourcery review <some path> to have Sourcery review and make suggestions on every file in that path

CI & Pre-Commit

Keep your entire codebase standardized with Sourcery’s CI integration and pre-commit hook.

For CI we recommend using

pip install sourcery-cli
# Store your Sourcery token as a secret in your CI environment.
sourcery login --token $SOURCERY_TOKEN
sourcery review --check --diff "git diff main" .

Or if it’s easier you can check out our GitHub Action!

To set up your pre-commit hooks use:

  - repo:
    rev: v0.13.0
      - id: sourcery
        # The best way to use Sourcery in a pre-commit hook:
        # * review only changed lines:
        # * omit the summary
        args: [--diff=git diff HEAD, --no-summary]

Note: Sourcery is fully free for open-source projects - but you need a Team plan to use Sourcery in CI or as a pre-commit hook for private projects.

IDE Integration

Sourcery integrates into your editor to review and improve your code while you’re writing it

Find quick installation instructions here:

More editor integrations coming soon.

GitHub Code Reviews

Ensure your code is always at the highest quality. Sourcery reviews and makes suggestions on your whole repo when you install and then checks all new pull requests in the future

You can get set up and running in 1 minute. Just follow this link and select your repos.

Or to try it out right away, ⭐ this repo, and Sourcery will review your most popular Python repo and send you a pull request. As an added bonus @sourcery-ai-bot will ⭐ your repo too.


Sourcery demo



Let the world know your project is using Sourcery to refactor with this badge:


Open Source Agenda is not affiliated with "Sourcery Ai Sourcery" Project. README Source: sourcery-ai/sourcery
Open Issues
Last Commit
5 days ago

Open Source Agenda Badge

Open Source Agenda Rating