CodeFox CLI - code auditing and code review tool
Project description
CodeFox-CLI
Diff-aware AI code review for terminal and CI workflows
📚 Documentation • 🚀 Quick Start • 🐛 Report Issue • 📝 Demo PRs
🦊 Overview
CodeFox-CLI is a CLI-first AI code review tool for git diffs, pull requests, and CI workflows.
It analyzes code changes, retrieves relevant project context, and produces review feedback directly in the terminal or inside automated review pipelines.
CodeFox supports both:
- local reviews with Ollama for self-hosted workflows
- cloud LLM providers such as Gemini and OpenRouter when remote inference is preferred
It is designed for developers and teams who want a CLI-first review workflow for local checks, pull requests, and CI/CD pipelines.
Why CodeFox?
- Reviews git changes, not just isolated files
- Uses relevant codebase context to improve review quality
- Works with local or cloud models
- Fits naturally into terminal-based and CI workflows
- Supports configurable review focus such as security, performance, and style
| Compared to linters | Compared to hosted AI reviewers |
|---|---|
| Reviews diffs with codebase context, not only static rules | Can run locally with Ollama |
| Can suggest fixes, not only flag issues | No hard vendor lock-in |
| Flexible review focus: security, performance, style | CLI-first workflow for local and CI usage |
What CodeFox is and is not
CodeFox is a CLI for automated AI review of git changes.
It is not an IDE coding assistant like Cursor or Claude Code.
It is built for diff review workflows, terminal usage, and CI/CD automation.
Integrations
Current:
- GitHub Actions
- GitLab
Planned:
- Bitbucket
Privacy
- With Ollama, reviews can run fully locally on your machine
- With cloud providers, code and context may be sent to external APIs depending on your configuration
- Use
.codefoxignoreto exclude files from analysis
📥 Installation
For users
uv
uv tool install codefox
pip
python3 -m pip install codefox
Verify installation
codefox version
🚀 Quick Start
- Initialize CodeFox
codefox init
This stores your provider token locally and creates the initial config files.
- Review your current git changes
codefox scan
What happens during scan:
-
collects the current git diff
-
loads relevant project context based on your configuration
-
sends the review request to the configured model
-
returns review comments and optional fix suggestions
- Show version
codefox version
⚙️ Configuration
Ignore file: ./.codefoxignore
Specifies paths that should not be uploaded to the File Store.
Model settings: ./.codefox.yml
Used for fine-grained configuration of the analysis behavior and model parameters (such as model selection, temperature, review rules, baseline, and prompts).
For detailed configuration options and examples, see WIKI.
Example config used in the demo above (Ollama + qwen3-coder):
provider: ollama
model:
name: qwen3.5:9b
temperature: 0.5
max_tokens: 4000
review:
severity: high
max_issues: null
suggest_fixes: true
diff_only: false
baseline:
enable: true
ruler:
security: true
performance: true
style: true
prompt:
system: null
extra: null
Token configuration: ./codefoxenv
Stores the API token for the model. This file is used by the CLI for authentication and should not be committed to version control.
📚 Documentation
Full configuration reference and examples: WIKI - provider settings, model options, review rules, prompts, and more.
🧩 Commands
| Command | Description |
|---|---|
init |
Saves the API key locally and creates a .codefoxignore and .codefox.yml file in the current directory. |
list |
Shows the full list of models available for the current provider (Gemini, Ollama, or OpenRouter) and embeddings (fastembed) from .codefox.yml. |
scan |
Collects changes from the git diff, uploads files to the File Store, and sends requests to the configured model. |
version |
Displays the current CodeFox CLI version. |
clean |
Clears local cache used by CodeFox |
--help |
Shows available flags and usage information. |
🧪 Examples
List available models (for the provider in .codefox.yml)
codefox list
Run a scan in a project
codefox scan
🛠 Development
Install with dev dependencies (includes pytest, mypy, ruff, types-PyYAML):
pip:
pip install -e ".[dev]"
# or: pip install -r requirements.txt -r requirements-dev.txt
uv:
uv pip install -e ".[dev]"
Run tests:
pytest tests -v
Lint and format:
ruff check codefox tests
ruff format codefox tests
Static type check:
mypy codefox
🤝 Contributing
Bug reports, pull requests, and documentation improvements are welcome.
Project details
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 codefox-0.4.6.tar.gz.
File metadata
- Download URL: codefox-0.4.6.tar.gz
- Upload date:
- Size: 5.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2308aa2babfd28035d3f8bc129f421bd200afea184382fd879cad13860bfdca5
|
|
| MD5 |
112bd39dc2e47e9d1167e09fb2421859
|
|
| BLAKE2b-256 |
457afb0c20cc23ba2418f4e02ed1339d355ccdb9ba42eb43d60b8953e3cc9a80
|
File details
Details for the file codefox-0.4.6-py3-none-any.whl.
File metadata
- Download URL: codefox-0.4.6-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c23b26e14b64e5b61b1b1d0183ce37aa41c8c2b6b78700f8f0b190d5aeb8cf7
|
|
| MD5 |
e8a167872dc8cdeaa05893b5cea55438
|
|
| BLAKE2b-256 |
db4c891ae1a13fea8c5d3c186fcd1c86bd8dbcf917f0ebcf0bbb8cbbed97473b
|