ReviewMind CLI
Enforce your team's code review rules before they reach GitHub.
ReviewMind turns recurring PR review comments into automated, enforceable rules. This CLI runs those rules locally on your staged files before every commit — catching violations before they ever open a pull request.
How It Works
Your team writes a PR comment: "Don't use eval() — use safe_parse instead"
↓
ReviewMind extracts an enforceable rule (on the SaaS dashboard)
↓
Rule is approved by your team lead
↓
reviewmind CLI enforces it on every future commit — locally, instantly
Installation
pip install reviewmind
Or with pipx:
pipx install reviewmind
Quick Start
1. Authenticate with your ReviewMind account
reviewmind config --token YOUR_CLI_TOKEN
Get your CLI token from Profile → CLI Token on the ReviewMind dashboard.
2. Set up pre-commit hook for your repo
cd your-project
reviewmind setup
This installs a pre-commit hook that automatically runs reviewmind check
before every git commit.
3. Run a manual scan
reviewmind check
Example Output
ReviewMind scanning 3 staged files...
src/auth.py
❌ [RM001] Dangerous Eval Usage — Line 12, Col 4
Using eval() is dangerous. Use safe_parse_json() instead.
src/utils.py
⚠️ [RM004] Direct Print Statement — Line 8
Use the logger instead of print().
─────────────────────────────────────────────
2 violations found. Commit blocked.
Run `reviewmind check --fix` to apply AI suggestions.
Engine — Open Source Core
This repository contains the core scanning engine used by both:
- This CLI (local pre-commit scanning)
- ReviewMind SaaS (GitHub PR scanning)
Engine Capabilities
| Feature | Status |
|---|---|
| Regex pattern matching | ✅ |
| Python AST scanning | ✅ |
| JavaScript / TypeScript AST | ✅ |
| SARIF export | ✅ |
Ignore config (.reviewmind.yml) |
✅ |
| Column-precise highlights | ✅ |
| Fingerprint deduplication | ✅ |
Using the engine directly
from reviewmind_engine import AnalysisEngine
from reviewmind_engine.engine_rule import EngineRule
rules = [
EngineRule(
rule_code="RM001",
title="No eval()",
check_type="regex",
check_pattern=r"eval\(",
check_language="python",
severity="error",
what_is_wrong="eval() is dangerous",
what_is_correct="Use safe_parse_json()",
)
]
engine = AnalysisEngine(rules=rules)
findings = engine.run_scan([
{
"filename": "src/main.py",
"content": open("src/main.py").read(),
"added_lines": {10, 11, 12}, # lines changed in this commit
}
])
for f in findings:
print(f"{f.rule_code} | {f.file_path}:{f.line} | {f.message}")
Configuration
Create .reviewmind.yml in your repo root to ignore paths:
ignore:
- "tests/**"
- "migrations/**"
- "generated/**"
- "*.min.js"
Environment Variables
| Variable | Default | Description |
|---|---|---|
REVIEWMIND_API_URL |
https://api.reviewmind.ai |
Backend API URL |
REVIEWMIND_TOKEN |
— | CLI auth token (or use reviewmind config) |
Contributing
Contributions are welcome! This is the open source engine — feel free to:
- Add new language evaluators
- Improve AST detection patterns
- Fix bugs and improve test coverage
git clone https://github.com/jayantsingh924/reviewmind-cli
cd reviewmind-cli
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE
Links
- 🌐 ReviewMind SaaS Platform — Full dashboard, GitHub App, team management
- 📖 Documentation
- 🐛 Issue Tracker
Metadata
Release files for reviewmind 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reviewmind-0.1.0.tar.gz | 16.7 kB | Without provenance | Details for reviewmind-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reviewmind-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for reviewmind-0.1.0-py3-none-any.whl |
Total release size: 35.3 kB
Release files / reviewmind-0.1.0.tar.gz
| Download URL | reviewmind-0.1.0.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcc6fa598594a4c62669dc1a5bc7d20c80553e8042d4b4e3d0569d4ed251cb80
|
|
BLAKE2b-256 checksum How to use checksums |
a70579fb60ba959737bef257b07a326b6308a75c9362acaa26477cd3db4f90b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / reviewmind-0.1.0-py3-none-any.whl
| Download URL | reviewmind-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d102d85d3190464b4c035a5b501fa841ecd2e19e37396b499d9f12bc50bc9a06
|
|
BLAKE2b-256 checksum How to use checksums |
af6a70c746ec2f0e5108a52ff0120ef2ee94e49e163a3e5c9ee4580200ecc32e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for reviewmind 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.