CLI Reference · Python 3.11+
Documentation
codesage run [TARGET] · all flags
| Flag | Value | Description |
|---|---|---|
| --provider, -p | openai|gemini|anthropic|groq|ollama | LLM provider to use |
| --model, -m | <model-id> | Specific model name |
| --output, -o | <file.md> | Output report path |
| --max-chunks | <int> | Max source chunks to analyse |
| --no-wizard | — | Skip interactive setup |
| --no-cache | — | Bypass result cache |
| --verbose, -v | — | Enable verbose logging |
codesage init [TARGET]Generate .codesage.yml interactively
codesage doctorCheck Python, deps & API keys
Common usage patterns(Scroll for more)
# Install
pip install -e .
# Analyse current dir (wizard)
codesage run
# Analyse a path, no wizard
codesage run ./my-project \
--no-wizard \
--provider openai \
--model gpt-4o-mini \
--output report.md
# Larger analysis budget
codesage run . --max-chunks 100
# Init config for a project
codesage init ./my-project
# Health check
codesage doctorEnvironment variables
OPENAI_API_KEYOpenAI keyGEMINI_API_KEYGoogle Gemini keyANTHROPIC_API_KEYAnthropic keyGROQ_API_KEYGroq keyConfig priority: CLI flags → env vars → .codesage.yml → defaults
Output
Reports written to ./reports/report.md by default. If the file exists, a timestamped copy is created instead of overwriting.
CLI Reference · Python 3.11+
Documentation
codesage run [TARGET] · all flags
LLM provider to use
Specific model name
Output report path
Max source chunks to analyse
Skip interactive setup
Bypass result cache
Enable verbose logging
codesage init [TARGET]Generate .codesage.yml interactively
codesage doctorCheck Python, deps & API keys
Common usage patterns
# Install
pip install -e .
# Analyse current dir (wizard)
codesage run
# Analyse a path, no wizard
codesage run ./my-project \
--no-wizard \
--provider openai \
--model gpt-4o-mini \
--output report.md
# Larger analysis budget
codesage run . --max-chunks 100
# Init config for a project
codesage init ./my-project
# Health check
codesage doctorEnvironment variables
OPENAI_API_KEYOpenAI keyGEMINI_API_KEYGoogle Gemini keyANTHROPIC_API_KEYAnthropic keyGROQ_API_KEYGroq keyConfig priority: CLI flags → env vars → .codesage.yml → defaults
Output
Reports written to ./reports/report.md by default. If the file exists, a timestamped copy is created instead of overwriting.