viberequest
v0.3.0
Published
CLI tools for managing large PRs and code quality
Maintainers
Readme
viberequest 🌴
Your AI wrote 2,000 lines. Now ship it.
Split large PRs, catch AI code smells, find duplicates, and refactor oversized files — all from your terminal.
Install
npm install -g viberequestThat's it.
Commands
viberequest split # Split a monster PR into reviewable chunks
viberequest smell # Catch AI-generated code smells
viberequest dedup # Find duplicate code across your repo
viberequest inspect # Show declarations and dependencies for a file
viberequest extract # Move symbols between files, auto-rewrite imports✂️ viberequest split
Your AI just touched 47 files. Nobody's reviewing that. Split it.
$ viberequest split
32 files changed (2,147 diff lines)
── Suggested PR Split ──
PR 1 340 lines │ Add auth types and middleware
PR 2 280 lines │ Add user dashboard UI
PR 3 395 lines │ Add payment integration
PR 4 310 lines │ Add settings and tests
Merge order: PR 1 → PR 2, PR 3 → PR 4👃 viberequest smell
AI loves to generate 300-line functions, hallucinated imports, and // increment the counter comments. Catch them all.
$ viberequest smell
14 smells found (9 errors, 3 warnings, 2 info)
● long-function handleSubmit() is 187 lines (max: 50)
● deep-nesting processOrder() has 5 levels (max: 2)
● hallucinated-import 'fancy-utils' not in package.json
● async-no-await fetchData() is async but never uses await
● obvious-comment // Loop through the users
● missing-test 240 lines changed, no test file found🔍 viberequest dedup
Your AI doesn't know formatDate() already exists three files over. This does.
$ viberequest dedup
84 declarations in diff, 12,450 in repo
● function formatDate() identical to formatTimestamp() — reuse it
● interface UserProfile duplicated in api/ and components/
● type ApiResponse is a subset of ServiceResponse — extend instead🔬 viberequest inspect <file>
Shows every declaration in a file with line counts, dependency info (uses / usedBy), and imports. Designed for AI agents to understand a file before refactoring it.
$ viberequest inspect src/lib/parser.ts --json
{
"file": "src/lib/parser.ts",
"lines": 806,
"declarations": [
{ "name": "parseFile", "kind": "function", "lines": 18, "uses": ["detectLanguage", "init"], "usedBy": [] },
{ "name": "extractJS", "kind": "function", "lines": 70, "uses": ["text", "loc"], "usedBy": ["EXTRACTORS"] },
...
]
}Supports: TypeScript · JavaScript · Python · Go · Rust · Ruby · Java · C · C++ · C#
🚚 viberequest extract
Moves symbols from one file to another — copies exact source text, removes from the original, and rewrites all imports across the codebase.
viberequest extract --from src/big-file.ts --to src/utils.ts --symbols "foo,bar,baz"
viberequest extract --from src/big-file.ts --to src/utils.ts --symbols "foo" --dry-run$ viberequest extract --from src/parser.ts --to src/extractors.ts --symbols "extractPython,extractGo,extractRust"
viberequest extract — done
3 symbols moved (145 lines) → src/extractors.ts
src/parser.ts: 806 → 650 lines (−156, 19% reduction)
src/extractors.ts: 160 lines
2 import rewrites across 3 filesThe AI agent decides what to move. The tool does the mechanical work without breaking anything. JS/TS only (import rewriting requires symbol-level imports).
Options
viberequest split --base develop # Compare against a different base branch
viberequest smell --base develop
viberequest dedup --base develop
viberequest inspect file.ts --json # Structured output for AI agents
viberequest extract --dry-run # Preview changes without applyingSupported Languages
| Command | Languages |
|---------|-----------|
| split, smell, dedup, inspect | TypeScript · JavaScript · Python · Go · Rust · Ruby · Java · C · C++ · C# |
| extract | TypeScript · JavaScript (JSX/TSX included) |
Works with your AI agent
Add one skill file and Claude Code, Cursor, Codex (or any of 50+ agents) will run VibeRequest automatically:
npx skills add peterkwitny/viberequestYour agent builds the feature, then cleans up its own mess before the PR. The missing piece between build and ship.
How it works
- split — Parses your diff with tree-sitter, builds a dependency graph, groups files into logical PRs
- smell — AST analysis + line-level pattern matching + project-level checks to catch AI-specific code smells
- dedup — Compares every declaration in your diff structurally against the entire repo
- inspect — Tree-sitter AST parse to extract declarations with dependency tracking
- extract — Copies exact source text by line ranges, rewrites imports across the codebase, auto-exports private dependencies
Everything runs locally. Your code never leaves your machine. Ever.
License
MIT
