correctr
v0.1.0
Published
Catch the bugs AI leaves behind. Multi-model code scanner with auto-fix.
Maintainers
Readme
correctr
Catch the bugs AI leaves behind.
correctr scans AI-generated code for security vulnerabilities, logic errors, and quality issues that tools like Copilot, Cursor, and Claude Code consistently introduce.
Installation
npm install -g correctrQuick Start
# 1. Get a free API key from one of:
# - Gemini: https://aistudio.google.com/apikey
# - OpenAI: https://platform.openai.com/api-keys
# - Claude: https://console.anthropic.com/settings/keys
# 2. Configure your key
correctr config set gemini-key YOUR_API_KEY
# 3. Scan your code
correctr check src/api/auth.tsCommands
correctr check <file>
Scan a file for AI-generated bugs.
correctr check app.ts
correctr check src/**/*.js --jsoncorrectr fix <file>
Automatically fix detected issues.
correctr fix app.ts
correctr fix app.ts --yes # Skip confirmationcorrectr export <file>
Export issues as a prompt for Claude Code, Cursor, or Codex.
correctr export app.ts # Copy to clipboard
correctr export app.ts -f markdown # Markdown format
correctr export app.ts -o issues.md # Write to filecorrectr config
Manage API keys and settings.
correctr config get # Show current config
correctr config set gemini-key KEY # Set Gemini API key
correctr config set openai-key KEY # Set OpenAI API key
correctr config set claude-key KEY # Set Claude API key
correctr config use claude # Switch to Claude
correctr config clear all # Clear all configSupported Providers
| Provider | Model | Get API Key | |----------|-------|-------------| | Gemini | gemini-2.0-flash | aistudio.google.com | | OpenAI | gpt-4o | platform.openai.com | | Claude | claude-sonnet-4-20250514 | console.anthropic.com |
What It Catches
- Security: SQL injection, XSS, auth flaws, exposed secrets
- Logic: Null handling, race conditions, edge cases
- Quality: Missing error handling, deprecated functions
CI/CD Integration
# GitHub Actions
- name: Check for AI bugs
run: |
npm install -g correctr
correctr config set gemini-key ${{ secrets.GEMINI_API_KEY }}
correctr check src/**/*.tsLicense
MIT
