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

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.6
File Size Uploaded
codefox-0.4.6.tar.gz 5.8 MB Details

Built distribution (wheel)

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

Total release size: 5.8 MB

Release files / codefox-0.4.6.tar.gz

Download URL codefox-0.4.6.tar.gz
Size 5.8 MB
Tags Source
SHA-256 checksum
How to use checksums
2308aa2babfd28035d3f8bc129f421bd200afea184382fd879cad13860bfdca5
BLAKE2b-256 checksum
How to use checksums
457afb0c20cc23ba2418f4e02ed1339d355ccdb9ba42eb43d60b8953e3cc9a80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

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

Download URL codefox-0.4.6-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c23b26e14b64e5b61b1b1d0183ce37aa41c8c2b6b78700f8f0b190d5aeb8cf7
BLAKE2b-256 checksum
How to use checksums
db4c891ae1a13fea8c5d3c186fcd1c86bd8dbcf917f0ebcf0bbb8cbbed97473b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 release files

0.4.5

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

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