AI-powered code analysis and security review CLI
Project description
CodeSight
AI-powered code analysis CLI — reviews, bugs, docs, and refactoring from your terminal.
CodeSight sends your code to LLMs (OpenAI, Anthropic, Google Vertex AI) with structured prompts tuned for code review, bug detection, security analysis, documentation, and refactoring. Multi-provider, configurable, works with any language.
What it does
codesight review— code review with severity-tagged issues (crit/warn/info)codesight bugs— find logic errors, race conditions, resource leakscodesight security— security audit with CWE IDs and OWASP mappingcodesight scan .— scan an entire directory with progress barcodesight docs— auto-generate docstrings and module docscodesight explain— plain-language breakdown of complex codecodesight refactor— refactoring suggestions with before/after diffs
Demo
Quick Start
# Install
pip install codesight
# Configure your provider
codesight config
# Run a review
codesight review src/main.py
# Detect bugs
codesight bugs lib/parser.py
# Scan a whole project
codesight scan . --task review
codesight scan src/ --ext .py .js
# Generate docs
codesight docs utils/helpers.py
Provider Support
| Provider | Models | Setup |
|---|---|---|
| OpenAI | GPT-5.4, GPT-5.3-Codex | OPENAI_API_KEY |
| Anthropic | Claude Opus 4.6, Claude Sonnet 4.6 | ANTHROPIC_API_KEY |
| Google Vertex AI | Gemini 3.1 Pro, Gemini 3.1 Flash | GOOGLE_CLOUD_PROJECT + ADC |
| Ollama (local) | Llama 3, CodeLlama, Mistral, etc. | Just run ollama serve |
Configuration
CodeSight stores config in ~/.codesight/config.json. You can configure it interactively:
codesight config
Or set environment variables:
export OPENAI_API_KEY="sk-..."
export CODESIGHT_MODEL="gpt-5.4"
codesight review my_file.py
Switch providers on the fly:
codesight review my_file.py --provider anthropic
codesight bugs my_file.py --provider google
codesight explain my_file.py --provider openai
codesight review my_file.py --provider ollama # fully offline, no data leaves your machine
Architecture
codesight/
├── __init__.py
├── __main__.py
├── cli.py
├── config.py
├── analyzer.py
└── providers/
├── base.py
├── factory.py
├── openai_provider.py
├── anthropic_provider.py
├── google_provider.py
└── ollama_provider.py
Development
git clone https://github.com/AvixoSec/codesight.git
cd codesight
pip install -e ".[dev]"
pytest tests/ -v
ruff check codesight/
Roadmap
-
codesight scan .— analyze a whole directory - Ollama support — fully offline analysis with local models
-
codesight security— dedicated security audit with CWE IDs and OWASP mapping -
codesight diff— review only git-changed files - SARIF output — standard format for GitHub Security tab
- Exit codes for CI/CD (0 = clean, 1 = warnings, 2 = critical)
- GitHub Action — auto-scan PRs with SARIF upload
- Multi-model pipeline — fast triage + deep verification
- Cost tracking per query
-
codesight benchmark— test LLMs on vulnerable codebases - Context compression — code maps to reduce token usage
- Streaming output for large files
- Custom prompt templates
- Publish to PyPI
- VS Code extension
- Web dashboard
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
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 codesight-0.2.0.tar.gz.
File metadata
- Download URL: codesight-0.2.0.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98a6d9214c6a9ca1f545f8bd78afa2bda4425c59fa6d9d0f764aed7b27342d82
|
|
| MD5 |
8ffdf57e4bf99ca1f58673406b6fe2e8
|
|
| BLAKE2b-256 |
2d93234fcb7fe3af8107c7a4efa7c6ef49cd5df31545a55a9aa507789ce371d3
|
File details
Details for the file codesight-0.2.0-py3-none-any.whl.
File metadata
- Download URL: codesight-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5ba9c478efd4868027f0f8d39925df9a8552ee2876c7819be96bc2ad983cfe5
|
|
| MD5 |
ed6ad979c0e075ed5c23ae0278fe42ec
|
|
| BLAKE2b-256 |
8c7bd9d4d2f2b06a4d21c703dfb9204e7cbf198b2dc781d2a9c9f9e498b8e15b
|