CORA CLI - AI code review before commit
npm install @codecora/cli> Catch bugs & security issues BEFORE you commit. Save 2+ hours/week on code reviews.
!npm version
!downloads
!license
Website: https://codecora.dev | Docs: https://codecora.dev/docs/cli
CORA CLI brings AI code review to your local development workflow. Get instant feedback on your code changes before they leave your machine.
- Pre-commit Review - Review code changes before committing
- Instant Feedback - Get AI analysis in seconds
- Privacy-first - Your code diffs are analyzed directly by your AI provider
- Git Hooks - Automatic review on every commit
- Cross-platform - Works on macOS, Linux, and Windows
- Save Time - Reduce code review time by 2+ hours per week
- Catch Bugs Early - Find issues before they reach production
- Security First - Detect vulnerabilities and security risks
- Learn Best Practices - Get AI-powered suggestions for code improvement
- Zero Friction - Works with your existing Git workflow
``bashUsing npm
npm install -g @codecora/cli
Quick Start
`bash
1. Install CORA CLI
npm install -g @codecora/cli2. Login to CORA
cora auth login3. Review staged changes
cora review
`Example Output:
`
ā
Review completeFound 2 issues:
š“ Critical: SQL injection risk
File: src/auth.ts:45
User input not sanitized before query
š” Major: Missing error handling
File: src/api.ts:12
API call lacks try-catch block
š” Suggestions available. Run with --include-walkthrough for details.
`Use Cases
CORA CLI is perfect for:
- Pre-commit Hooks - Automatically review code before every commit
- CI/CD Pipelines - Integrate into GitHub Actions, GitLab CI, Jenkins
- Legacy Code Audit - Review entire codebases with
--base flag
- Pull Request Reviews - Check feature branches before merging
- Learning Projects - Get AI feedback on code quality and best practicesWhy CORA vs Others?
| Feature | CORA | SonarQube | CodeClimate | DeepSource |
|---------|------|-----------|-------------|------------|
| Setup Time | 30 seconds | Hours | Hours | Hours |
| Pre-commit | ā
Native | ā Plugin | ā Plugin | ā Plugin |
| AI-Powered | ā
GPT-4/Claude | ā Rule-based | ā Rule-based | ā Rule-based |
| Your AI Key | ā
Use your own | ā Locked in | ā Locked in | ā Locked in |
| Privacy | ā
Code stays local | ā ļø Cloud scan | ā ļø Cloud scan | ā ļø Cloud scan |
| Free Tier | ā
100 reviews/mo | ā $120/yr min | ā $50/yr min | ā Subscription |
| Languages | All languages | Limited | Limited | Limited |
Key Differentiators:
- Fastest Setup - Install and run in 30 seconds, no configuration needed
- AI-Powered - Uses latest GPT-4/Claude models, not outdated rule engines
- Your AI Key - Use your own OpenAI/Anthropic key, no vendor lock-in
- Privacy-First - Code analyzed by YOUR AI provider, we never see your code
- Zero Maintenance - No servers to manage, no databases to configure
- Always Updated - Automatically benefits from latest AI model improvements
Usage
$3
`bash
Login via GitHub OAuth
cora auth loginCheck authentication status
cora auth statusLogout
cora auth logoutView/set configuration
cora auth config [key] [value]
`$3
`bash
Review staged changes (default)
cora reviewReview unstaged changes
cora review --unstagedReview specific files
cora review --files src/app.ts src/utils.tsReview committed changes
cora review --base main # Review branch vs main
cora review --commits 3 # Review last 3 commits
cora review --revision-range abc..def # Review specific range
cora review --unpushed # Review unpushed commitsJSON output for CI/CD
cora review --format json
`$3
`bash
Install pre-commit hook
cora hook installUninstall hook
cora hook uninstallList installed hooks
cora hook listQuick enable/disable
cora enable # Install pre-commit hook
cora disable # Uninstall pre-commit hook
`$3
| Option | Description |
|--------|-------------|
|
-w, --workspace | Workspace ID |
| -r, --repository | Repository name (owner/repo) |
| -b, --branch | Branch name |
| -s, --staged | Review staged changes (default) |
| -u, --unstaged | Review unstaged changes |
| -f, --files | Review specific files |
| --base | Review changes from base ref to HEAD (e.g., "main") |
| --revision-range | Review specific commit range (e.g., "HEAD~3..HEAD") |
| --commits | Review last N commits |
| --unpushed | Review unpushed commits |
| --format | Output format (pretty, json, compact) |Configuration
Configuration is stored in
~/.codecora/:-
auth.json - Session token and user info
- config.json - Preferences and settings$3
| Variable | Description |
|----------|-------------|
|
CORA_SKIP | Skip pre-commit hook when set to 1 |
| CORA_SERVER | Override server URL |
| CORA_WORKSPACE | Override workspace ID |
| CORA_API_KEY | API key for CI/CD authentication |CI/CD Integration
$3
CORA CLI supports code review for all programming languages including:
- JavaScript / TypeScript
- Python
- Java / Kotlin
- Go
- Rust
- PHP
- Ruby
- C# / .NET
- And more...
$3
For CI/CD workflows, use API Keys instead of session tokens.
Getting an API Key:
1. Login to codecora.dev
2. Go to Dashboard ā API Keys
3. Click "Generate API Key"
4. Copy the key and use in your CI/CD pipeline
`yaml
Example: GitHub Actions
- name: Run CORA Review
run: |
npm install -g @codecora/cli
cora review --format json > review-results.json
env:
CORA_API_KEY: ${{ secrets.CORA_API_KEY }}
CORA_SERVER_URL: https://codecora.dev
`Benefits of API Keys:
- No interactive login required
- Can be scoped to specific permissions
- Can have expiration dates
- Revocable without affecting other workflows
Create API Key: Visit Dashboard ā API Keys to generate a key for CI/CD.
Troubleshooting
$3
`bash
Check your authentication status
cora auth statusRe-authenticate if needed
cora auth login
`$3
`bash
Verify hook is installed
cora hook listReinstall hook
cora hook uninstall && cora hook install
`$3
`bash
Skip for one commit
git commit --no-verify -m "message"Or use environment variable
CORA_SKIP=1 git commit -m "message"
``- Node.js 20+ or Bun 1.0+
- A Codecora account (sign up at https://codecora.dev)
- An OpenAI-compatible API key configured in your workspace
- Free Tier - 100 reviews/month during beta
- Pro Tier - Coming soon
- Enterprise - Contact us for custom solutions
MIT Ā© CORA
- š§ Email: support@codecora.dev
- š Documentation
- š Website
- š¬ Community Discord
Getting Help:
- Check our Documentation for detailed guides
- Join our Discord community for quick questions
- Email us at support@codecora.dev for technical issues