Skip to main content

CodeFox CLI - code auditing and code review tool

Project description

CodeFox logo

CodeFox-CLI

Intelligent automated code review system

CI License Python 3.11+


🦊 Overview

CodeFox-CLI is an intelligent automated code review system that takes over routine security and code quality checks, allowing senior developers to focus on architecture and complex tasks.

Unlike traditional linters, CodeFox understands the context of the entire project and its business logic, delivering not just review comments but ready-to-apply fixes (Auto-Fix). Works with Gemini, Ollama, and OpenRouter - use your preferred AI backend.

vs Linters vs AI code review (e.g. CodeRabbit)
Understands full project context & business logic Self-hosted / local (Ollama), no vendor lock-in
Suggests fixes, not only rules Configurable models, security/performance/style rules
RAG over your codebase for relevant hints CLI-first: git diff → review in seconds

CodeFox scan demo


📥 Installation

Choose the installation method that fits your workflow.

🔹 Install dependencies (local setup)

pip install -r requirements.txt

🔹 Development mode (editable install)

Provides the local codefox CLI command and enables live code changes.

python3 -m pip install -e .

🔹 Install from GitHub

🐍 Using pip

python3 -m pip install codefox
# or python3 -m pip install git+https://github.com/URLbug/CodeFox-CLI.git@main

⚡ Using uv (recommended for CLI usage)

uv tool install codefox
# or uv tool install git+https://github.com/URLbug/CodeFox-CLI.git@main

✅ Verify installation

codefox --command version

Or

python3 -m codefox --command version

🚀 Quick Start

Initialize (stores your API key)

codefox --command init

Run a scan (uses the current git diff)

codefox --command scan

Show version

codefox --command 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-coder:480b
  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.


🧩 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) 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.
--help Shows available flags and usage information.

🧪 Examples

List available models (for the provider in .codefox.yml)

codefox --command list

Run a scan in a project

codefox --command 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.3.1.tar.gz (5.7 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.3.1-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for codefox-0.3.1.tar.gz
Algorithm Hash digest
SHA256 9e0bf21f528c6ca6fc13c8554834db2eafe7c9a00d00f3f2bb7334fd31330d6c
MD5 9bd39262cc9f454be3ab757c50087016
BLAKE2b-256 0f103abe56fc1b3b6021f2b38d3017f9d587c745969a7aa3b0e69b24f1263178

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for codefox-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b965f3413bd5991e88a0b695a722b659df3d730514dc0545dd21374f28d52b8f
MD5 15cf7e8e2713c7bcfe327b16f1ef5778
BLAKE2b-256 ee1cfa97e1385c4e212c0c6613743046b4346457f4c63c0d8b4ff7974f92c442

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