Skip to main content

CodeFox CLI - code auditing and code review tool

Project description

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

Planned:

  • GitLab
  • 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.

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

codefox-0.4.1.tar.gz (5.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codefox-0.4.1-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file codefox-0.4.1.tar.gz.

File metadata

  • Download URL: codefox-0.4.1.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for codefox-0.4.1.tar.gz
Algorithm Hash digest
SHA256 fba8c9187b7ea8b8e0b5d07f593bfafdd13461c7f6ae66e36cd46d81916bef73
MD5 6c0b8d3f355a13a021203c2e9772a08f
BLAKE2b-256 0996ab2e2ed18e804df521d9571e273d5d94a42db9d3ee1f4ea6e91dd5c89670

See more details on using hashes here.

File details

Details for the file codefox-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: codefox-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for codefox-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 599d0f24f6f93f09213ce29e48dca0516da6ff40c5846a41c453eff9777d1261
MD5 a9f04475558f1377f5422484386424d5
BLAKE2b-256 7e05c5ee00fb5bc2177e519850af7dc5faf08c7843c4a2994c73aa19f8cfe98c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page