Package: diffbro
diffbro - AI Powered Peer ReviewsYour AI Peer Review BroDiffbro is a command line tool that gives you AI powered peer reviews on your codebase. Under the hood diffbro utilizesgit diffand OpenAI'sGPT-3.5-turboandGPT-4to review your code and provide feedback on your changes.Diffbro is best used before you stage and commit your code to your codebase. Diffbro also supports full branch diff PR feedback as if it were an engineer reviewing your merge request (see--peer-reviewflag). Diffbro is designed to help you catch bugs, improve your code quality, and help you ship with confidence.FeaturesView all commands, options and examplesdiffbro --helpRun against local changesdiffbroRun diffbro against a branch and create a PR reviewdiffbro --peer-review mainDifferent bro modes for chill, to chad engineer level peer reviewschill: will review your code like a chill bro (default)diffbro --chillmid: will review your code like a mid level engineer brodiffbro --midchad: will review your code like a chad, staff engineer brodiffbro --chadChoose which files to reviewOnly .py and .js filesdiffbro --only .py .jsEverything except .py and .js filesdiffbro --ignore .py .jsDefaults to [".py", ".c", ".cpp", ".java", ".cs", ".php", ".vb", ".html", ".css", ".js", ".ts", ".asp", ".aspx", ".cfm", ".cgi", ".pl", ".cer", ".htm", ".xhtml", ".shtml", ".jsp", ".jsx", ".tsx", ".vue", ".solid", ".toml", ".md", ".go", ".rs", ".swift"]Choose your gpt modeldiffbro --model gpt-3.5-turbodiffbro --model gpt-4(default) (recommended for production code)Summarize the git diff for a commit message or PR descriptiondiffbro --summarizeOverride the default prompts with your own custom promptdiffbro --prompt "Below is a git diff of code. Please review and notify only of critical issues. If there are no critical issues, respond with tons of checkbox emojis"Example command combos'I want a chill review on my .py and .js files'diffbro --chill --only .py .js'I'm about to ship production, mission critical UI code, I need a hardcore review on my FE code'diffbro --chad --model gpt-4 --only .js .jsx .tsx .vue'I'm about to a fullstack app and need a comprehensive mid level review on all my code excluding .tsx files'diffbro --mid --model gpt-4 --ignore .tsx'I want to run my own prompt against my git diff with a summary for the commit massage'diffbro --prompt "Below is a git diff of code. Please review and notify only of critical issues." --summarize'I want a quick comparison of my changes against the staging branch with a summary'diffbro --peer-review staging --model gpt-3.5-turbo --summarize'I want a mid level code review of all of my .ts files'diffbro --mid --only .ts'I want top tier code reviews all the time'Throw this line into your.bashrcor.bash_profilealias dbro="diffbro --chad --model gpt-4 --summarize"Then, whenever you want a review, just rundbroInstall & UseInstall or switch toPython 3.11 or 3.10 or 3.9 or 3.8Check your python versionpython --versionInstall 'stable' version fromPyPIpip install --upgrade diffbroExport your openai api keyexport OPENAI_API_KEY=<your-openai-api-key>Make changes to your codebaseRun diffbrodiffbroCompare local changesBefore you stage and commit, run diffbrodiffbroImplement the feedback from diffbroCommit your code with confidenceCompare branch changesBefore you merge, run diffbrodiffbro --peer-review mainImplement the feedback from diffbroMerge your code with confidenceDevelopmentInstall bleeding edge version test versionInstall BLEEDING EDGE version fromTestPyPipip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple diffbroLocal Dev Commands (excluded from dist)run diffbro locallypoetry run diffbrotest versionspoetry run python scripts/run_tox.pypublish to test pypipoetry run python scripts/publish_testpypi.pypublish to pypipoetry run python scripts/publish_pypi.pyROADMAP[✅] POC[✅] Add GPT model flag[✅] Add diff exclusion of large files like poetry.lock from the diff[✅] Add cli --only flag to diff only specific file types[✅] Add cli --ignore flag to ignore specific file types[✅] Deploy version 0.1.0 to TestPyPi[✅] Test install version 0.1.0 from TestPyPi[✅] Deploy version 0.1.2 to pypy[✅] Add help docs[✅] Support additional python versions[✅] Improve openai_api_key check[✅] Chad should always ask to use gpt-4 (simple yes/no prompt)[✅] Add custom prompt flag to be run on the diffdiffbro --prompt "Below is a git diff of code. Please review and notify only of critical issues."[✅] Add summarybro flag that will create a git commit message using the diffbro summarydiffbro --summarize-> "Added new feature to the app, fixed a bug, and refactored some code."[✅] Add COMPLETE PR review flag which runs diffbro against a branch and creates a PR reviewdiffbro --pr main[✅] RELEASE VERSION 1.0.0!!![] Parallelize diffbro and commit summary GPT requests[] Add unit tests[] What feature would you like to see next?Submit a feature request[?] Add token limit check to prevent overage charges[?] Add 'AI Devlogs' section to readme w/links to ai devlogs[?] Add ~/.diffbro config file support for custom defaultsif a cli param was specified in the .diffbro file, use that. Add default values to argparse to detect if a cli param was specified (dirty)