Local-first LLM-powered code review and commit assistant
Project description
🐨 CodeKoala
Your Friendly, Local Code Reviewer (who prefers a nap!)
📌 Overview
CodeKoala is your lazy (but effective) local-first, LLM-powered code review tool that gently analyses Git changes and provides AI-driven feedback on code quality, best practices, and design principles. Perfect for the developer who wants to stay comfy without missing important code improvements. The tool is modular, supporting both local execution and future API-based LLMs.
🐨 From Gum Trees to Git Trees – Reviewing Your Commits with Care!
✨ Features
- 🧠 LLM-Powered Reviews – Get feedback on your commits without the stress of manual reviews.
- 🔍 Git Integration – Automatically ponders over your git diff changes. No need to lift a finger.
- 🚀 Runs Locally – Your code stays close, no external calls needed (privacy first, naps second).
- 🛠 Best Practice Checks – Catches code smells, anti-patterns, and design flaws (so you don't have to).
- 🗒️ Conventional Commits – Automatically generate commit messages that follow the Conventional Commits spec.
🚀 Installation
Pick the option that fits your workflow—each installs the codekoala CLI so you can call it from any repository.
Install from a GitHub Release (recommended)
- Download the latest
codekoala-*.whlfrom the Releases page. - Install it with pip:
pip install path/to/codekoala-<version>-py3-none-any.whl
Requirements
- Python 3.10 or newer
- Ollama installed locally
- Pull the recommended model:
ollama pull mistral-nemo:12b
If you prefer a different model, set it after install withcodekoala config --model <name>.
🛠 Usage
First-Time Setup
-
Verify Ollama is running:
ollama list -
Configure your preferred model (default is mistral-nemo:12b):
codekoala config --model mistral-nemo:12b
Available Commands:
-
review_codeReview code changes before committing, comparing them with a specific branch or reviewing staged changes.
Example:
codekoala review_code --branch main --staged
-
generate-messageAutomatically generate a commit message following the Conventional Commits specification based on your Git changes.
Example:
codekoala generate-message --ticket 54321 --context "Refines onboarding flow" --context-file docs/release-notes.md
This analyses staged changes, blends in any optional context, and suggests a structured commit message. Use
--prompt-onlyto copy the prompt instead of calling the local model directly.Helpful flags
--ticket: Provide a ticket number upfront (e.g.--ticket 54321).--context: Add free-form context; repeat for multiple notes.--context-file: Merge the contents of supporting files into the prompt.--prompt-only: Copy the full prompt (diff + context) to your clipboard.
-
configConfigure CodeKoala settings, such as selecting the LLM model to use.
Example to set the model:
codekoala config --model mistral-nemo:12b
Example to show current configuration:
codekoala config --show
Example Workflow
-
Check your own code before committing
You can review the changes you've staged for commit using:codekoala review_code --staged
Or, if you want to check all changes (not just staged ones), run:
codekoala review_code -
Generate a commit message based on changes Instead of manually writing a commit message, let CodeKoala handle it:
codekoala generate-message --ticket 54321
This ensures consistency and adherence to Conventional Commits.
-
Review PRs or features compared to another branch You can use CodeKoala to review the differences between your current branch and another branch, such as
develop, to ensure your code aligns with the main branch before merging:codekoala review_code --branch develop
This command compares your current branch to
developand provides suggestions for any detected changes.
🐨 CodeKoala: Keeping Your Code Cuddly, Not Clunky!
🔁 Release Workflow
Releases are automated through GitHub Actions whenever you push a tag that matches v*.*.*.
- Make sure the version in
pyproject.tomlis up to date. - Create a tag and push it, e.g.:
git tag v0.2.0 git push origin v0.2.0
- The
releaseworkflow will:- lint the codebase with Flake8,
- build and upload wheel/sdist artifacts,
- create a GitHub Release (shows up in the repository sidebar automatically).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codekoala-0.0.1.tar.gz.
File metadata
- Download URL: codekoala-0.0.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de10383554bc4856375301fc0c8f9a8bcc1929b7a9f7d6b2be6bbaee8bf612a
|
|
| MD5 |
b59bbe701a7a4ae2d7a334eb6c4687d9
|
|
| BLAKE2b-256 |
192331c73c98f2ece845809f08e0cc8c40965a00d126aa848e6e519f296cc382
|
Provenance
The following attestation bundles were made for codekoala-0.0.1.tar.gz:
Publisher:
release.yml on Pieter-OHearn/codekoala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codekoala-0.0.1.tar.gz -
Subject digest:
9de10383554bc4856375301fc0c8f9a8bcc1929b7a9f7d6b2be6bbaee8bf612a - Sigstore transparency entry: 622123306
- Sigstore integration time:
-
Permalink:
Pieter-OHearn/codekoala@998d34e02fc20ccb4d51ad022e8f54cadc27f935 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/Pieter-OHearn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@998d34e02fc20ccb4d51ad022e8f54cadc27f935 -
Trigger Event:
push
-
Statement type:
File details
Details for the file codekoala-0.0.1-py3-none-any.whl.
File metadata
- Download URL: codekoala-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f681bade9007f7c1d32d28eb362069007a70bbdd53c53591c272b1fd3e23aea1
|
|
| MD5 |
ab10182b6f01c886f1d672ccfdd8e37b
|
|
| BLAKE2b-256 |
62314227e0efb03e72ac5ea8b9776f2459916a3907372a9ba0941768c6d17cfc
|
Provenance
The following attestation bundles were made for codekoala-0.0.1-py3-none-any.whl:
Publisher:
release.yml on Pieter-OHearn/codekoala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codekoala-0.0.1-py3-none-any.whl -
Subject digest:
f681bade9007f7c1d32d28eb362069007a70bbdd53c53591c272b1fd3e23aea1 - Sigstore transparency entry: 622123307
- Sigstore integration time:
-
Permalink:
Pieter-OHearn/codekoala@998d34e02fc20ccb4d51ad022e8f54cadc27f935 -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/Pieter-OHearn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@998d34e02fc20ccb4d51ad022e8f54cadc27f935 -
Trigger Event:
push
-
Statement type: