Skip to main content

CodeFox logo

CodeFox-CLI

Diff-aware AI code review for terminal and CI workflows

CI License Python 3.11+ Wiki PyPI Downloads

📚 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

CodeFox scan demo


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 .codefoxignore to exclude files from analysis

📥 Installation

For users

uv

uv tool install codefox

pip

python3 -m pip install codefox

Verify installation

codefox version

🚀 Quick Start

  1. Initialize CodeFox
codefox init

This stores your provider token locally and creates the initial config files.

  1. 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

  1. 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.

Metadata

Release files for codefox 0.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codefox 0.4.7
File Size Uploaded Provenance Actions
codefox-0.4.7.tar.gz 10.1 MB Without provenance Details for codefox-0.4.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for codefox 0.4.7
File Interpreter ABI Platform Actions
codefox-0.4.7-py3-none-any.whl Python 3 none any Details for codefox-0.4.7-py3-none-any.whl

Total release size: 10.1 MB

Release files / codefox-0.4.7.tar.gz

Download URL codefox-0.4.7.tar.gz
Size 10.1 MB
Tags Source
SHA-256 checksum
How to use checksums
cbbe0302900777d0c65135d3d3214b441280031acc6d345f988cc4387e6b5a02
BLAKE2b-256 checksum
How to use checksums
f881685412036d65a9c448a7941b463087272f5d9347057f5f23f4bf947c7eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / codefox-0.4.7-py3-none-any.whl

Download URL codefox-0.4.7-py3-none-any.whl
Size 40.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7196bedf85cd2db90fb06c076990edeb2bc19761502982eb20b95584d41e20ad
BLAKE2b-256 checksum
How to use checksums
4e575d8bee7647504bf5905c871ee4f24c02d5862bc4faff3474b0fcfd191f6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for codefox 0.4.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page