Code review checklist for AI-generated code. Step through prompts, paste into your AI, fix issues, mark done.
redpen is a CLI tool that guides you through a set of code review prompts. Each prompt tells an AI what to look for in your codebase. You copy the prompt, paste it into ChatGPT/Claude/Cursor, fix what it finds, then mark it done. Progress saves per git branch.
- Interactive TUI: Arrow keys to navigate, single-key actions
- First-Run Setup: Auto-detects your stack, guided init wizard
- Fuzzy Search: Press
/to quickly find prompts - Progress Tracking: Saves per git branch in user directory (keeps project clean)
- Stack-Aware: Loads prompts for your specific stack (Next.js, Supabase, Flutter, etc.)
- Custom Prompts: Add your own prompts in
.redpen/folder - CI Integration: Fail builds if prompts incomplete
npm install -g redpen# Start the TUI (runs init wizard on first use)
redpen
# Or explicitly run setup
redpen init| Key | Action |
|---|---|
r / Enter |
Run: copy + mark done + advance |
c |
Copy only (no mark done) |
s |
Skip prompt + advance |
n |
Jump to next incomplete |
d |
Toggle done / undo |
/ |
Search prompts (fuzzy) |
? |
Help overlay |
← → h l |
Previous / next prompt |
↑ ↓ k j |
Previous / next prompt |
Home End |
First / last prompt |
q / Esc |
Quit |
- Type to fuzzy filter prompts
↑↓to navigate resultsEnterto selectEscto cancel
- Run
redpen- TUI opens at first incomplete prompt - Press
r- copies prompt, marks done, advances to next - Paste into your AI - it reviews your code
- Fix what it finds
- Repeat until complete
One key does it all - no more r then d then arrow key.
| Command | Description |
|---|---|
redpen |
Interactive TUI (recommended) |
redpen init |
First-time setup |
redpen next |
Show next prompt |
redpen copy [n] |
Copy prompt n |
redpen done [n] |
Mark prompt n complete |
redpen skip [n] |
Skip prompt n |
redpen undo |
Undo last done |
redpen status |
Show progress |
redpen list |
List all prompts |
redpen order [tag] |
Show run order |
redpen reset |
Clear progress |
redpen check [cats] |
CI mode - exit 1 if incomplete |
redpen report |
Markdown summary |
| Category | What it checks |
|---|---|
core/security/* |
Auth, data safety, access control |
core/quality/* |
Test coverage, error handling |
core/architecture/* |
Logging, monitoring, observability |
core/process/* |
Documentation, code standards |
| Stack | Prompts |
|---|---|
| Next.js | web/frontend/nextjs/* |
| React | web/frontend/react/* |
| Vue | web/frontend/vue/* |
| Supabase | web/backend/supabase/* |
| Firebase | web/backend/firebase/* |
| Prisma | web/backend/prisma/* |
| Flutter | mobile/flutter/* |
| React Native | mobile/react-native/* |
| Native iOS/Android | mobile/native/* |
Add .txt files to .redpen/ in your project root:
your-project/
.redpen/
my-custom-check.txt
team/coding-standards.txt
They get added to the run order automatically.
# GitHub Actions
- run: npx redpen check security,qualityExits with code 1 if security or quality prompts are incomplete.
Run redpen init or just run redpen - the TUI will guide you through setup on first use.
Config and progress are stored in your user directory (not in the project):
| Platform | Location |
|---|---|
| Linux | ~/.config/redpen/projects/<hash>/ |
| macOS | ~/Library/Application Support/redpen/projects/<hash>/ |
| Windows | %APPDATA%\redpen\projects\<hash>\ |
Each project gets its own folder (identified by git remote URL hash). Inside:
config.json # Your stack settings
progress-main.json # Progress for 'main' branch
progress-feature.json # Progress for 'feature' branch
Example config.json:
{
"platform": "web",
"frontend": "nextjs",
"backend": "supabase"
}For mobile:
{
"platform": "mobile",
"framework": "flutter"
}Run redpen doctor to see where your config is stored.
redpen automatically detects your stack from:
| File | Detection |
|---|---|
pubspec.yaml |
Flutter |
react-native in package.json |
React Native |
next in package.json |
Next.js |
@supabase/supabase-js |
Supabase |
firebase |
Firebase |
@prisma/client |
Prisma |
Detected values are pre-selected in the init wizard.
# Add to your shell profile
eval "$(redpen completion)"AI writes code that compiles and looks correct. But it misses things: security holes, missing error handling, edge cases, no tests, production gotchas.
These prompts catch what AI misses. Run them before you ship.
MIT
