@devmind-ai/cli
v0.1.1
Published
DevMind AI code review CLI — get AI commit messages, review staged changes, and integrate with your local git workflow
Maintainers
Readme
@devmind-ai/cli
DevMind AI code review CLI — generate commit messages, review staged changes locally, and gate commits on AI feedback.
Install
npm install -g @devmind-ai/cliQuick start
# 1. Generate an API token at https://devmind.vn/profile (Profile → API tokens → New token)
# 2. Login
devmind login
# 3. Use it
git add src/
devmind commit # AI suggests 3 Conventional Commit messages, you pick one
devmind review # AI reviews staged changes, prints issues
devmind init-hooks # Install pre-commit hook that runs review before every commitCommands
devmind login
Saves your API token to ~/.devmind/config.json (mode 600). Override at runtime via DEVMIND_API_URL and DEVMIND_API_TOKEN env vars.
devmind commit [options]
--language <lang>— suggestion language (e.g.vifor Vietnamese)--no-commit— print the message but don't actually commit--auto— skip the picker, use the top-ranked suggestion
devmind review [options]
--working— review unstaged working tree (default: staged)--branch— review entire branch--target <ref>— branch comparison target (default:origin/main)--fail-on <severity>— exit code 1 when issues at this level found (low/medium/high/critical)--json— JSON output for scripts
devmind init-hooks [--uninstall]
Install a git pre-commit hook that runs devmind review --fail-on critical before every commit. CRITICAL issues block the commit; users can skip with git commit --no-verify.
The hook is marked # devmind-pre-commit-managed so --uninstall only removes our own — never touches user-written hooks.
Examples
# Generate a Vietnamese commit message and commit
devmind commit --language vi
# Review without picking — just print issues
devmind review --json | jq '.issues'
# Review my whole branch vs main
devmind review --branch --target origin/main
# Block commits when AI finds CRITICAL issues
devmind init-hooks
git commit -m "fix bug"
# → AI reviews staged, blocks if CRITICAL foundAuth
The CLI uses bearer API tokens (separate from the web UI's JWT). Tokens are scoped — minimum required scope per command:
| Command | Required scope |
|---|---|
| commit | commit |
| review | review |
Generate a token in the web app: Profile → API tokens → New token.
Self-hosted
Set DEVMIND_API_URL to your self-hosted instance:
export DEVMIND_API_URL=https://devmind.your-company.internal
devmind loginLicense
MIT — open source for community contributions.
