- Notifications
You must be signed in to change notification settings - Fork0
A set of tools to use while coding using the Claude code cli. "smartgrep" is a grep-like tool that uses a semantic index of the codebase to provide Claudes with information tailored for how they think. Claudes love it! A "codebase-curator" Claude to assist the "developer" Claude in his coding tasks, together they implement fully integrated code.
License
RLabs-Inc/codebase-curator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
🎁 Give your Claude the gift of deep codebase understanding
Because your Claude deserves a codebase expert by its side
Codebase Curator transforms how Claude understands your code. Instead of treating each question as isolated, it gives Claude a persistent, intelligent companion that deeply understands your entire codebase.
When you ask Claude about your codebase, it starts from scratch every time:
- 🔄 Repetitive exploration of the same files
- ⏰ Slow responses as it re-discovers your architecture
- 🎯 Inconsistent understanding between questions
- 😕 Generic suggestions that don't fit your patterns
Codebase Curator spawns a dedicated "Curator Claude" that becomes an expert on YOUR specific codebase:
You (Coding Claude) → "How do I add authentication?" ↓Codebase Curator → Spawns Curator Claude ↓Curator Claude → Deeply analyzes your codebase ↓You get → Specific guidance that fits YOUR patterns- Curator Claude: A dedicated AI that becomes an expert on YOUR codebase
- Persistent Sessions: Remembers context between questions
- Instant Follow-ups: First question takes 2 minutes, rest are instant
Smart Grep now defaults to acompact summary mode that's optimized for AI assistants:
# Default: Compact summary (perfect for Claudes)smartgrep"authService"══════════════════════════════════════════════════════════════════════🔍 SMARTGREP:"authService" (17 resultsin 4 files)📍 DEFINITION: auth/service.ts:42 (CLASS)export class AuthService { constructor(db: Database, cache: Cache)🔥 TOP USAGE: • api/routes.ts: - Line 15: authService.authenticate(username, password) - Line 23: authService.validateToken(token) • middleware/auth.ts:12 -if (!authService.isValid(token))⚡ BREAKING CHANGES (if you modify this): •LoginController.handleLogin() - callsauthenticate() •AuthMiddleware.verify() - callsvalidateToken()💡 PATTERNS DETECTED: • Always async/await calls • Throws: AuthenticationError, TokenExpiredError🎯 NEXT: smartgrep refs"authService"| smartgrep"authenticate"══════════════════════════════════════════════════════════════════════# Need full details? Use --full flagsmartgrep"authService" --full# Complete analysis with all matches
Why This Matters for Claudes:
- Before: Each search consumed 2000-3000 tokens
- Now: Only 200-300 tokens per search
- Result: 10x more searches before hitting context limits!
# Don't just search - understand!smartgrep"handleAuth"# Shows where it's used + usage countsmartgrep refs"apiClient"# Full impact analysis - see all referencessmartgrep group auth# Search ALL auth patterns at oncesmartgrep changes# Analyze your uncommitted changes impactsmartgrep changes --compact# Quick risk assessment before committingsmartgrep"func NewAuth"# Go functionssmartgrep"impl Auth"# Rust implementationssmartgrep"protocol Auth"# Swift protocolssmartgrep"function deploy"# Shell scripts# Returns organized results with usage counts:# → Functions: authenticate() (12 uses), validateUser() (5 uses)# → Classes: AuthService, AuthMiddleware# → Config: JWT_SECRET, AUTH_URL, oauth settings# → Cross-references: Shows actual calling code with file:line locations# Advanced patternssmartgrep"error&handler"# AND searchsmartgrep"login|signin|auth"# OR searchsmartgrep"!test" --typefunction# Exclude tests# Custom concept groups for your projectsmartgrep group add payments charge,bill,invoice,transactionsmartgrep group payments --typefunction# Search your custom group
Programming Languages:
- TypeScript/JavaScript - Full AST parsing, JSX/TSX, ES6+, decorators
- Python - Classes, decorators, async, type hints, docstrings, dataclasses
- Go - Interfaces, goroutines, channels, embedded types, generics
- Rust - Traits, macros, lifetimes, async, unsafe blocks, derive
- Swift - Protocols, SwiftUI, extensions, property wrappers, actors
- Shell - Functions, aliases, exports, heredocs, arrays
Framework Files (NEW!):
- Svelte (.svelte) - Runes ($state, $derived), stores, lifecycle hooks, directives
- Vue (.vue) - Composition API, SFC, directives (v-if, v-for), defineProps
- Astro (.astro) - Props interface, client directives, Astro.props
- MDX (.mdx) - Markdown with JSX components, imports, exports
Configuration Files:
- JSON - package.json, tsconfig.json, hierarchical parsing
- YAML - CI/CD pipelines, Docker Compose, Kubernetes manifests
- TOML - Cargo.toml, pyproject.toml, structured configs
- Environment - .env files with secure value masking
# Watch your codebase evolve in real-timebun run monitor watch --overview# See:# → Live code distribution by type# → File changes as they happen# → Most complex files by declaration count# → Automatic reindexing on changes
- First question: Curator Claude explores and learns your codebase
- Every question after: Builds on that understanding
- Result: Faster, more accurate, context-aware responses
# Overview - The foundation (takes ~2 minutes)"Give me an overview of this codebase"→ Curator explores everything, understands patterns# Follow-up questions are instant and accurate"How does authentication work?"→ Immediate response with YOUR specific implementation"Where should I add a payment feature?"→ Knows your patterns, suggests the right location
- Claude Code with active subscription
- Bun runtime (faster than Node.js)
- Clone and install globally
git clone https://github.com/RLabs-Inc/codebase-curator.gitcd codebase-curatorbun installbun link# Makes commands available globally
Now you can use these commands from anywhere:
smartgrep- Semantic code searchcurator-monitor- Live monitoringcodebase-curator- Interactive CLI
📚Full Installation Guide - Detailed instructions and troubleshooting
- Configure Claude Code MCPAdd to your
claude_code_config.json:
{"mcpServers": {"codebase-curator": {"command":"bun","args": ["run","/path/to/codebase-curator/src/mcp-servers/codebase-curator/server.ts"] } }}- Restart Claude CodeThe Codebase Curator tools will appear in Claude's tool panel.
- Set your project
Use the set_project_path tool:Path: /path/to/your/project- Get an overview (do this first!)
Use the get_codebase_overview tool- Ask questions
Use ask_curator: "How does the payment system work?"Use add_new_feature: "Add user notifications"Use implement_change: "Fix the login timeout bug"# After installation with bun link, use from anywhere:# Concept groups - search semantic patternssmartgrep group auth# ALL auth patterns (login, jwt, token...)smartgrep group error# ALL error patterns (exception, fail...)smartgrep group api# ALL API patterns (endpoint, route...)smartgrep group list# See all 20+ concept groups# NEW: Analyze your changes before committing!smartgrep changes# Full impact analysis of uncommitted changessmartgrep changes --compact# Quick risk assessment (one line)# Advanced search patternssmartgrep"user|auth"# OR searchsmartgrep"async&function"# AND searchsmartgrep"!test" --typefunction# Exclude testssmartgrep refs"PaymentService"# Find all usages# Custom groups for your projectsmartgrep group add payments charge,bill,invoice,transactionsmartgrep group payments# Use your custom group# Type filters for precisionsmartgrep"auth" --typefunction# Only functionssmartgrep"error" --type string# Only string literalssmartgrep group api --type class# Only API classes# Sort and format optionssmartgrep group service --sort usage# Most used firstsmartgrep"user" --compact# One line per resultsmartgrep"api" --json# Machine-readable output
src/├── packages/ # Distributable packages│ ├── semantic-core/ # Core indexing engine│ ├── smartgrep/ # Semantic search CLI│ └── codebase-curator/ # Full suite├── services/ # Shared business logic├── tools/ # CLI interfaces├── mcp-servers/ # AI interfaces└── shared/ # Common utilities- Coding Claude: You, working in Claude Code
- Curator Claude: Your dedicated codebase expert
- Communication: Via MCP (Model Context Protocol)
- Session Persistence: Maintains context between questions with --resume
- Dynamic Timeouts: Adapts to different operations (Task: 10min, Bash: 5min)
- Semantic Indexing: Understands code structure with 20+ concept groups
- Incremental Indexing: Only reprocesses changed files with debouncing
- Live Monitoring: Real-time dashboard shows code evolution as you work
- Cross-References: Shows not just where code is defined, but who uses it
- Streaming Architecture: Handles massive codebases efficiently
- Package Distribution: Each tool can be installed independently
We welcome contributions! SeeCONTRIBUTING.md for guidelines.
# Install workspace dependenciesbun install# Run testsbuntest# Run MCP server locallybun run mcp# Run CLI toolsbun run start# Curator CLIbun run smartgrep [query]# Smart grepbun run monitor watch --overview# Live monitoring# Build semantic indexbun run smartgrep --index# Analyze your changesbun run smartgrep changes# Full impact analysisbun run smartgrep changes -c# Quick risk check# Work with packagescd src/packages/smartgrepbun run build# Build for distributionbun run build:binary# Create standalone binary
get_codebase_overview- Deep analysis of your codebaseask_curator- Ask questions about the codeadd_new_feature- Get guidance for new featuresimplement_change- Get help with specific changeslist_project_special_tools- Discover AI-optimized toolsremind_about_smartgrep- Get smart-grep usage examples
MIT - seeLICENSE
Built with ❤️ byRLabs Inc. and Claude
Special thanks to the Claude Code team for making this integration possible.
Remember: Your Claude works hard to help you code. Give it the superpower it deserves! 🚀
- Installation Guide - Detailed setup instructions
- Language Support - All 10 supported languages
- Smart Grep Guide - Advanced search techniques
- Architecture Overview - How it all works
- Troubleshooting - Common issues and solutions
- Release Notes v4.0 - Latest updates
- Git Changes Analysis:
smartgrep changesanalyzes uncommitted changes impact - Custom Concept Groups: Create project-specific semantic patterns
- Performance: 37x faster than standalone tools (1s vs 37.5s)
- Risk Assessment: One-line safety check before committing
- 10 Language Support: Added Swift and Shell script support
- Concept Groups:
smartgrep group authsearches semantic patterns - Advanced Search: AND/OR/NOT patterns, regex support
- Type Filters: Search only functions, classes, variables, etc.
- Live Monitoring: Real-time codebase overview dashboard
- MCP Discovery: Tools help Claudes discover smart-grep features
- Hash Tree: Bun.hash() for instant file change detection
- Smart Debouncing: Handles duplicate save events gracefully
- Silent Mode: Clean output for live monitoring
- Unique File Tracking: Shows real changes, not event counts
About
A set of tools to use while coding using the Claude code cli. "smartgrep" is a grep-like tool that uses a semantic index of the codebase to provide Claudes with information tailored for how they think. Claudes love it! A "codebase-curator" Claude to assist the "developer" Claude in his coding tasks, together they implement fully integrated code.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.