fontana-cli
v0.0.2
Published
AI-powered Git intelligence CLI
Downloads
32
Maintainers
Readme
Fontana CLI ⛲
An elegant, AI-powered Git intelligence CLI that revolutionizes your daily developer workflow. It seamlessly interacts with your local LLMs (via Ollama) to explain diffs, generate conventional commit messages, write Pull Request summaries, and perform senior-engineer-style code reviews — all without sending your code to any external API.
📦 Installation
Install the package globally using npm:
npm install -g fontana-cliAfter installation, initialize and verify your setup. Fontana will automatically check if Git and Ollama are installed, and can autonomously install them for you if they are missing!
fontana init🚀 Usage
🔍 Explain Diffs
To get an instant explanation of the changes in your working directory compared to HEAD:
fontana explain📝 Generate Commit Messages
Stage your changes and let Fontana propose a conventional commit message. It will interactively ask if you want to apply the commit!
git add .
fontana commit🚢 Generate PR Summaries
To generate a comprehensive PR title and markdown description based on the differences between your current branch and the main branch:
fontana pr📋 AI Code Review
Get a senior-engineer-style review of your current working-directory changes. Fontana analyzes the diff for bugs, missing error handling, code smells, performance concerns, and readability — then groups findings by severity:
fontana reviewTo review only staged changes:
git add .
fontana review --stagedExample output:
🔍 Review Suggestions:
[HIGH] Unhandled promise rejection in fetchUser — services/api.ts
type: bug
[MEDIUM] DB query runs inside a loop — could cause N+1 — controllers/users.ts
type: perf
[LOW] Variable `tmp` has no descriptive name
type: readability
────────────────────────────────────────────────────────────
Summary: 1 high 1 medium 1 lowSeverity levels: high (red) · medium (yellow) · low (cyan)
Issue types: bug · performance · readability · best_practice
Large diffs (> 5 000 lines) are automatically truncated with a warning so the review still runs quickly.
⚙️ Configuration
By default, Fontana uses your local Ollama instance and the qwen2.5-coder:7b model — ensuring complete privacy and zero API costs. Override via environment variables:
| Variable | Default | Description |
|---|---|---|
| FONTANA_OLLAMA_ENDPOINT | http://localhost:11434/api/generate | Ollama API endpoint |
| FONTANA_OLLAMA_MODEL | qwen2.5-coder:7b | Model to use for all commands |
| FONTANA_API_KEY | (empty) | Bearer token if your endpoint requires auth |
Create a .env file at the project root or export the variables in your shell to apply overrides.
🧯 Troubleshooting
"LLM request failed" — Make sure Ollama is running:
ollama serveModel not found — Pull the default model:
ollama pull qwen2.5-coder:7b"Not a git repository" — Run Fontana from inside a Git-tracked directory.
License
MIT
