annotr
v0.2.2
Published
Fast local code commenting CLI - AI-generated comments in under 2 seconds
Downloads
345
Maintainers
Readme

annotr
Fast local code commenting CLI. Add AI-generated comments to your code in under 2 seconds.
Features
- Local & Fast: Uses Ollama with qwen2.5-coder:1.5b for 1-2 second generation
- Zero Cost: No API fees, runs entirely on your machine
- Smart Context: Tree-sitter parsing provides accurate code structure awareness
- Beautiful UX: Charm stack (BubbleTea, Lipgloss) for polished terminal UI
- Multi-Provider: Supports Ollama, Claude, OpenAI, and Groq
Installation
curl -fsSL https://raw.githubusercontent.com/cloudboy-jh/annotr/main/install.sh | shOr with Go:
go install github.com/cloudboy-jh/annotr/cmd/annotr@latestOr build from source:
git clone https://github.com/cloudboy-jh/annotr.git
cd annotr
make installQuick Start
# First-time setup
annotr init
# Add comments to a file
annotr file.go
# Process all files in a directory
annotr ./srcConfiguration
Run annotr init to configure. It will:
- Detect Ollama (if installed) and list available models
- Or prompt for an API key (Claude/OpenAI/Groq)
- Let you select a model and comment style
- Save to
~/.annotr/config.json
Recommended: Install Ollama (free, local)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen2.5-coder:1.5b
annotr initSupported Languages
- Go
- Python
- JavaScript
- TypeScript
Usage
# Single file
annotr main.go
# → Adds comments, shows: "Enjoy your comments! ;)"
# Directory (interactive)
annotr ./src
# → Prompts for each file: "Process main.go? (y/n)"
# Remove comments from a file or directory
annotr clear file.go
annotr clear ./src
# Change the default model
annotr model
# Update models manifest
annotr update-modelsLicense
MIT
