UnVibe (devibe) 🧹
Repository cleanup utility for vibe coding sessions
Stop the chaos after intense AI-assisted coding sessions. UnVibe intelligently organizes your repositories, respects git boundaries, and keeps your monorepos clean.
🎉 What's New in v1.8.7
🤖 Smart AI Prompting (NEW in v1.8.7!)
When running devibe --auto without AI configured, you'll now get a helpful prompt:
⚠️ No AI API key configured
Auto mode works best with AI classification for accurate results:
• With AI: 90% accuracy
• Without AI: 65% accuracy (heuristics only)
To enable AI classification, add an API key:
devibe ai-key add anthropic <your-key> # Recommended: Claude
devibe ai-key add openai <your-key> # Alternative: GPT-4
devibe ai-key add google <your-key> # Budget: Gemini
Continue with heuristics only? (y/n):
Features:
- 📊 Clear accuracy comparison - See the benefit of AI (90% vs 65%)
- 🎯 Smart decline tracking - Only prompts twice, then remembers your choice
- 🚫 Skip with --no-ai - Bypass prompts when you want heuristics only
- ✅ Works on any directory - No git repository required
🤖 Auto-Consolidate with Git Boundary Support (v1.8.2)
Fully automated markdown consolidation workflow that respects git repository boundaries!
devibe consolidate:auto
devibe consolidate:auto /path/to/monorepo
devibe consolidate:auto --max-output 3 --suppress-toc
Key Features:
- 🔍 Git-aware - Automatically detects and processes each git repo independently
- 🎯 Monorepo support - Handles nested repositories like a pro
- 📊 Multi-repo reporting - Shows count of repositories processed
- 📂 Automated workflow - Moves files, consolidates, updates README automatically
- 🏷️ Intelligent naming - Output files named based on content topics
- 📝 README integration - Auto-updates README.md with summary index
- 💾 Backup tracking - Creates date-sorted BACKUP_INDEX.md in
.devibe/
- 🤖 AI optional - Works with or without AI configuration
- 🛡️ 100% safe - All originals preserved, full rollback capability
Perfect for:
- Repository cleanup after AI coding sessions
- Weekly/sprint documentation snapshots
- Monorepo documentation management
- Preparing consolidated docs for AI assistants
See full documentation →
📝 Markdown Consolidation
Advanced AI-powered markdown consolidation for interactive workflows.
See documentation →
Features
🚀 Core Capabilities
✅ Mono-repo friendly - Respects multiple .git boundaries
✅ Secret detection - Scans for 31 types of hardcoded secrets (API keys, tokens, credentials)
✅ 100% reversible - All operations backed up automatically with restore capability
✅ Build validation - Ensures cleanup doesn't break builds (Node.js, Docker, Python, Go)
✅ Dry-run mode - Preview changes before applying across all commands
🤖 AI-Powered Intelligence
✅ Multi-provider AI - Support for Anthropic Claude, OpenAI GPT, Google Gemini (7 models)
✅ 90% accuracy - AI-powered file classification with context awareness
✅ Learning system - Learns from corrections and improves over time
✅ Cost optimization - 98% savings with smart model selection (Gemini Flash vs Claude Sonnet)
✅ Secure keys - AES-256 encrypted API key storage in ~/.devibe/
⚡ Automation & Workflows
✅ Auto mode - One-command cleanup: devibe --auto or devibe yolo
✅ Intelligent classification - Multi-stage: learning → structure → dependencies → AI
✅ GitIgnore management - Auto-excludes .devibe/ and .unvibe/ directories
✅ GitHub integration - Pre-push hooks and Actions for CI/CD
✅ Progress tracking - Real-time feedback with detailed status updates
🧪 Test Organization
✅ 8 test categories - unit, integration, e2e, tdd, functional, performance, acceptance, contract
✅ 6 technology stacks - Node.js, React, Python, Go, Java, .NET/C#
✅ Smart detection - Automatic pattern matching and categorization
✅ Organization reports - Detailed breakdown by category and technology
📊 Quality & Standards
✅ Best practices analyzer - 40+ automated checks across 8 categories
✅ Rule packs - Shareable directory structure standards (YAML/JSON)
✅ Weighted scoring - 0-100 quality score with severity levels
✅ Auto-fix detection - Identifies issues that can be automatically resolved
✅ CI/CD ready - JSON output for automation pipelines
📝 Documentation Management (NEW in v1.7.0)
✅ Markdown consolidation - AI-powered doc organization with topic clustering
✅ Relevance analysis - Multi-factor scoring (recency, quality, connectivity)
✅ Smart strategies - Merge, summarize, archive, or create navigation hub
✅ Content preservation - Validation and backup with rollback capability
🔧 Developer Experience
✅ Non-intrusive UX - Smart prompting (max 2 times, then silent)
✅ Folder enforcement - Maintains scripts/ and documents/ structure
✅ Helpful recommendations - Context-aware suggestions for improvements
✅ Comprehensive docs - 20+ guides covering all features and workflows
Installation
From npm (Recommended)
npm install -g devibe
npx devibe
Verify Installation
devibe --version
devibe --help
NPM Package: https://www.npmjs.com/package/devibe
Quick Start
devibe --auto
devibe yolo
devibe
devibe scan
devibe plan
devibe execute
devibe enforce
devibe validate
devibe best-practices
devibe validate-rulepack my-pack.json
devibe consolidate ./docs --dry-run
Commands
devibe or devibe status
Show repository status and suggested next actions.
devibe detect
List all git repositories in the current directory.
devibe scan
Scan for hardcoded secrets (API keys, passwords, tokens).
Detects 31 types: AWS, Google, Azure, Stripe, GitHub, Slack, Discord, Anthropic, OpenAI, SendGrid, Twilio, Heroku, Firebase, NPM, Docker, Cloudflare, Datadog, and more. Plus JWT tokens, private keys, webhooks, and database credentials.
devibe plan
Plan root file distribution (shows what would be done).
devibe execute
Execute planned file operations with automatic backup.
devibe execute --dry-run
devibe enforce
Enforce folder structure (scripts/, documents/).
devibe validate
Detect and validate build systems (Node.js, Docker, Python, Go).
devibe backups
List all available backups.
devibe restore <id>
Restore from a backup.
devibe yolo or devibe --auto
Quick auto-organize: Run full cleanup workflow automatically.
These commands are equivalent - use whichever you prefer!
What --auto does:
- 🔍 Git-aware scanning - Detects and processes each git repository independently (perfect for monorepos)
- 🤖 AI-powered classification - Intelligently categorizes files using AI or heuristics fallback
- 📂 Automated organization - Plans and executes file distribution to proper folders
- 🔒 Secret detection - Scans for 31 types of hardcoded credentials before organizing
- 📝 GitIgnore management - Automatically updates
.gitignore to exclude .devibe/ directories
- 💾 100% reversible - All operations backed up automatically with full rollback capability
- ⚡ One command cleanup - Complete repository organization in seconds
Perfect for:
- Post-coding session cleanup
- Repository maintenance before commits
- Preparing repos for team collaboration
- Cleaning up after AI-assisted coding sessions
AI Key Handling:
- If no AI key is configured, you'll be prompted to add one (first 2 times only)
- After declining twice, the tool will silently use heuristics to avoid being annoying
- You can continue with heuristics (65% accuracy) or add a key for AI (90% accuracy)
- Use
devibe ai-key add <provider> <key> to configure AI
- Re-enable prompts with:
devibe ai-key reset-prompt
⚠️ Note: This mode makes automatic changes but always creates backups first.
Auto Mode Variants
Quick commands:
devibe --auto
devibe yolo
devibe --auto --no-ai
Advanced commands:
devibe plan --auto
devibe execute --auto
devibe execute --auto --no-ai
When to use:
- 🤖
devibe --auto or devibe yolo: Quick cleanup with AI (recommended)
- ⚡
devibe --auto --no-ai: Fast cleanup without AI prompts
- 📋
devibe plan --auto: Preview before executing
- See AI Auto Mode Guide for details
devibe init
Initialize UnVibe configuration file.
devibe organize-tests
Organize test files by category (unit, integration, e2e, etc.).
devibe organize-tests
devibe organize-tests --dry-run
devibe organize-tests --report
```0
List all test files and their categories.
Analyze repository against industry best practices (40+ automated checks).
```bash
devibe best-practices
devibe best-practices --json
Checks include:
- 📚 Documentation (README, CHANGELOG, API docs)
- 🔧 Git (.gitignore, .gitattributes)
- 🔒 Security (.env management, lockfiles, SECURITY.md)
- 📁 Structure (src/, tests/, no root files)
- 📦 Dependencies (engines, no wildcards)
- 🚀 CI/CD (GitHub Actions, pre-commit hooks)
- ⚖️ Licensing (LICENSE file, package.json)
- ✨ Quality (ESLint, Prettier, TypeScript, EditorConfig)
Scoring: Weighted 0-100 score with severity levels (critical, high, medium, low)
devibe validate-rulepack
Validate a rule pack file against the specification.
devibe validate-rulepack my-pack.json
Provides clear, helpful error messages with:
- JSONPath location (
$.metadata.name)
- Expected format with examples
- Error codes for automation
- Warnings for best practices
devibe consolidate
Consolidate markdown documentation using AI-powered semantic analysis.
devibe consolidate ./docs --dry-run
devibe consolidate ./docs -r
devibe consolidate ./docs --auto -r --max-output 5
devibe consolidate ./docs -r --exclude '**/archive/**' --exclude '**/old/**'
How it works:
- 📂 Scans directory for markdown files
- 📊 Analyzes relevance (recency, quality, connectivity, uniqueness)
- 🤖 Clusters files by semantic similarity using AI
- 📋 Creates plan with consolidation strategies
- 💾 Backs up originals automatically
- ✅ Validates content preservation (max 30% loss allowed)
- 📚 Generates
DOCUMENTATION_HUB.md navigation hub
Consolidation Strategies:
- merge-by-topic - Combine files on same topic
- merge-by-folder - Combine files in same directory
- summarize-cluster - Create AI-powered summaries
- create-super-readme - Generate navigation hub
- archive-stale - Move outdated files to archive
Relevance Scoring:
- Highly Relevant (70-100) - Recent, high-quality, well-connected
- Relevant (50-69) - Good quality, some connections
- Marginal (30-49) - Consider consolidating or archiving
- Stale (0-29) - Old, low quality, candidates for archiving
Safety Features:
- 🛡️ Always run with
--dry-run first to preview
- 💾 Automatic backups before any changes
- ✅ Content preservation validation
- 🔍 Broken link detection
- 🔄 Full rollback with
devibe restore
Options:
-r, --recursive - Process subdirectories
--max-output <number> - Maximum consolidated files (default: 5)
--dry-run - Preview without changes (RECOMMENDED)
--auto - Auto-approve plan (use with caution)
--exclude <pattern> - Exclude file patterns (repeatable)
⚠️ Important: Requires AI to be enabled. Run devibe ai-key add <provider> <key> first.
devibe consolidate:auto
NEW in v1.8.0+ Automated markdown consolidation workflow with intelligent organization.
devibe consolidate:auto
devibe consolidate:auto --max-output 3 --suppress-toc
devibe consolidate:auto --exclude '**/node_modules/**' --exclude '**/archive/**'
devibe consolidate:auto /path/to/project
Automated Workflow:
- 📂 Moves all
*.md files from root → <root>/documents/
- 🤖 Clusters files by semantic similarity (AI-powered)
- 📋 Creates consolidation plan (merge-by-topic strategy)
- ✍️ Merges content with source attributions
- 🏷️ Names output files intelligently (based on content topics)
- 📝 Updates README.md with summary index automatically
- 💾 Creates
.devibe/backups/BACKUP_INDEX.md (date-sorted)
Git-Aware (v1.8.2+):
- 🔍 Automatically detects git repository boundaries
- 🎯 Processes each git repo independently
- ✅ Respects monorepo structures with nested repos
- 📊 Shows count of repositories processed
Example with nested repos:
cd /monorepo
devibe consolidate:auto .
Safety:
- ✅ All original files preserved in
documents/
- ✅ Automatic backups before any changes
- ✅ README.md safely updated with HTML markers
- ✅ Full rollback with
devibe restore
Options:
--max-output <number> - Maximum output files (default: 5)
--suppress-toc - Suppress Table of Contents generation
--exclude <pattern> - Exclude file patterns (repeatable)
Use Cases:
- Repository cleanup after AI coding sessions
- Weekly/sprint documentation consolidation
- Project milestone snapshots
- Preparing docs for AI assistants
⚠️ Important: Requires AI to be enabled. Run devibe ai-key add <provider> <key> first.
AI Management Commands
Manage AI providers, keys, and cost optimization.
devibe ai-key add <provider> <key>
Add an AI API key (encrypted with AES-256).
devibe ai-key add anthropic sk-ant-...
devibe ai-key add openai sk-...
devibe ai-key add google AIza...
devibe ai-key status
Show current AI configuration and cost recommendations.
devibe ai-key status
devibe ai-key clear
Revert to environment variables (removes configured keys).
devibe ai-key clear
devibe ai-analyze
Compare AI models and costs for your repository.
devibe ai-analyze
devibe ai-analyze -f 5000
Shows cost comparison across 7 AI models:
- Gemini 1.5 Flash (cheapest - $0.06/1K files)
- GPT-4o Mini
- Claude 3 Haiku
- Claude 3.5 Sonnet
- Gemini 1.5 Pro
- GPT-4o
- Claude 3.5 Opus (premium)
devibe ai-models
List all available AI models with pricing and context windows.
devibe ai-models
Test Organization
DeVibe can automatically organize your tests into logical categories:
tests/
├── unit/ # Unit tests
├── integration/ # Integration tests
├── e2e/ # End-to-end tests
├── tdd/ # TDD specs
├── functional/ # Functional tests
├── performance/ # Performance tests
├── acceptance/ # Acceptance tests
└── contract/ # Contract tests
Supports 6 technologies:
- Node.js/TypeScript (
.test.ts, .spec.ts)
- React (
.test.tsx, __tests__/)
- Python (
test_*.py, *_test.py)
- Go (
*_test.go)
- Java (
*Test.java, *IT.java)
- .NET/C# (
*Tests.cs, *Test.cs, xUnit/NUnit/MSTest)
Rule Packs
Share and reuse directory structure standards across projects and teams.
Using Rule Packs
devibe rulepack install @devibe/nodejs-standard
devibe --rulepack @devibe/nodejs-standard
module.exports = {
rulepacks: ['@devibe/nodejs-standard']
};
Official Rule Packs
@devibe/nodejs-standard - Standard Node.js structure
@devibe/react-standard - React/Next.js conventions
@devibe/nodejs-monorepo - NX/Turborepo monorepo structure
@devibe/python-standard - Python best practices
@devibe/go-standard - Go standard project layout
Creating Custom Rule Packs
Create your own shareable standards:
schema: "devibe-rulepack/v1"
metadata:
name: "@mycompany/engineering-standard"
version: "1.0.0"
structure:
requiredFolders:
- path: "src"
- path: "tests"
- path: "docs"
testOrganization:
enabled: true
categories:
- name: "unit"
patterns: ["**/*.test.ts"]
targetDirectory: "tests/unit"
See RULE_PACK_SPEC.md for complete specification.
Configuration
Create .unvibe.config.js in your repository root:
module.exports = {
secretScan: {
excludePatterns: ['node_modules/**', '.git/**'],
},
folderStructure: {
requiredFolders: ['scripts', 'documents'],
},
ai: {
enabled: false,
provider: 'anthropic',
},
backup: {
enabled: true,
retentionDays: 30,
}
};
AI Integration (Optional)
For better file classification (90% vs 65%):
export ANTHROPIC_API_KEY=your-key-here
export OPENAI_API_KEY=your-key-here
UnVibe automatically detects AI availability and provides helpful recommendations when features are unavailable.
Intelligent Recommendations
UnVibe provides smart, context-aware recommendations for common issues:
Missing Build Scripts
$ devibe validate
✓ nodejs: PASSED (0ms)
⚠️ No build script found in package.json
Skipping build validation (not blocking)
To enable: Add "build": "tsc" or your build command to package.json scripts
Build Failures
$ devibe validate
✗ nodejs: FAILED (499ms)
💡 Build failed. Possible fixes:
• Run "npm install" to ensure dependencies are installed
• Check for TypeScript errors if using tsc
• Review build script in package.json
• Run "npm run build" manually to see full error
AI Unavailability
$ devibe plan
⚠️ AI classification unavailable - using heuristics (65% accuracy)
For better results: Set ANTHROPIC_API_KEY or OPENAI_API_KEY
Status Command
$ devibe status
📊 UnVibe Status
AI Classification:
⚠️ AI unavailable - using heuristics (65% accuracy)
To enable: Set ANTHROPIC_API_KEY or OPENAI_API_KEY environment variable
Build Configuration:
⚠️ No build script found
To enable validation: Add "build" script to package.json
The app never blocks on missing optional features - it provides helpful guidance while continuing to work.
Safety Guarantees
- Git boundaries respected - Never moves files between sibling repos
- All operations backed up - 100% reversible
- Secrets are truncated - Never logged in full
- Dry-run available - Test before applying
- Build validation - Ensures code still works
- Permission preserved - File modes maintained
Architecture
- TDD - Test-Driven Development
- ISP - Interface Segregation Principle
- 86 passing tests - E2E coverage
- TypeScript - Fully typed
- Zero runtime dependencies
GitHub Integration
UnVibe integrates with GitHub to keep your main branch clean:
devibe setup-hooks
devibe check-pr
Features:
- ✅ Pre-push hooks block critical secrets
- ✅ GitHub Actions validate PRs
- ✅ Automated PR comments with results
- ✅ Prevents broken builds on main
See GITHUB-INTEGRATION.md for full guide.
Documentation
All comprehensive documentation has been organized into the documents/ directory:
📚 View Full Documentation Index →
Quick Links
-
AI & Setup:
-
Architecture:
-
Reference:
💡 Tip: The documents/ folder contains 20+ guides. Check documents/README.md for the complete organized index.
Development
npm install
npm test
npm run build
License
ISC License
UnVibe - Because every vibe coding session deserves a clean ending. 🚀
Made with Claude Code