Here's a workflow problem that isn't dramatic but adds up: you finish a focused two-hour refactor, stage the changes, and then sit there staring at the commit prompt. "fix stuff" isn't it. You write something real, but it takes three minutes and you're not fully satisfied with it anyway.
That's the thing that made me build devtools-ai. Not a grand vision — just a small, persistent friction point that I kept noticing.
What I built
devtools-ai is a Python CLI with five AI-powered commands for common dev tasks. Install it once, point it at an OpenRouter API key, and it's available in any terminal on any OS:
pip install devtools-ai-cli
Three tools are free. Two are Pro ($29 one-time, no subscription).
How it works
All five commands follow the same pattern: read your code or diff, send it to an AI model via OpenRouter, return structured output in the terminal. No browser tab, no copy-pasting.
Commit messages from your staged diff:
$ git add src/auth/
$ devtools-ai commit
Suggested message:
refactor(auth): extract token validation into standalone service
Separates JWT parsing and expiry logic from the request handler.
Simplifies future OAuth provider additions.
Commit with this message? [y/N]: y
[main 4f3a91c] refactor(auth): extract token validation into standalone service
Add -y to skip the confirmation and commit immediately.
AI code review before opening a PR:
$ devtools-ai review
--- Review: src/payments/checkout.py ---
[SECURITY] Line 42: User-supplied redirect_url is not validated.
An attacker could supply an open redirect. Consider allowlisting
known domains or using urllib.parse to enforce the same origin.
[PERFORMANCE] Line 78: get_user_cart() is called inside the loop.
This hits the DB once per item. Move the call outside the loop
or use a bulk fetch.
3 issues found (1 high, 1 medium, 1 low)
Root cause analysis from an error log:
$ devtools-ai bug deploy_error.log --context src/config/loader.py
Root cause: config/loader.py attempts to call .get() on the return
value of load_yaml(), but load_yaml() returns None when the config
file is missing or empty (line 34).
The file path is constructed from ENV_CONFIG_PATH, which is not set
in the production environment.
Likely fix: validate ENV_CONFIG_PATH before attempting to read,
or add a None check after load_yaml() returns.
The other two commands: explain <file> gives a plain-English walkthrough of any source file, and doc <file> generates Google or NumPy-style docstrings for functions that are missing them.
OpenRouter integration
devtools-ai doesn't hardcode a provider. It routes through OpenRouter, which means you configure one API key in ~/.devtools-ai/config.yaml and can use GPT-4o, Claude 3.5 Sonnet, Gemini, Llama 3, or any other model OpenRouter supports. Switch models with a single line change. Your key stays local — I never see it.
Cost per command with GPT-4o is typically $0.005–$0.02 depending on diff size.
Free vs Pro
| Tool | Free | Pro |
|---|---|---|
commit — semantic commit messages |
Yes | Yes |
explain — plain-English file explainer |
Yes | Yes |
doc — docstring generator |
Yes | Yes |
review — staged diff code review |
No | Yes |
bug — error log root cause analysis |
No | Yes |
| Price | $0 | $29 one-time |
Get started in 3 steps
# 1. Install
pip install devtools-ai-cli
# 2. Add your OpenRouter API key to ~/.devtools-ai/config.yaml
# Get a free key at https://openrouter.ai/
# 3. Run your first command
git add .
devtools-ai commit
If you buy Pro, activate with:
devtools-ai activate YOUR-LICENSE-KEY
Wrapping up
The code is on GitHub: https://github.com/Eutectico/devtools-ai
PyPI: https://pypi.org/project/devtools-ai-cli/
Pro License: https://3697225130452.gumroad.com/l/apqzbp
One honest caveat: on very large diffs, the commit message quality degrades — it tends to go generic. That's something I'm actively working on. Everything else has been reliable in daily use.
If you try it, feedback is welcome — issues, pull requests, or just a comment here.
Top comments (0)