Skip to content

Latest commit

 

History

History
227 lines (180 loc) · 4.17 KB

File metadata and controls

227 lines (180 loc) · 4.17 KB

📦 Installation Guide

Prerequisites

  • Bun runtime (required)
    curl -fsSL https://bun.sh/install | bash

🚀 Quick Install (Global)

From Source (Recommended for now)

# Clone the repository
git clone https://github.com/RLabs-Inc/codebase-curator.git
cd codebase-curator

# Install dependencies
bun install

# Link globally
bun link

# Now you can use the tools globally!
smartgrep --help
curator-monitor --help
codebase-curator --help

From NPM (Coming Soon)

# Once published to npm
bun install -g codebase-curator

🛠️ Available Commands

After installation, you'll have access to these global commands:

1. smartgrep - Semantic Code Search

# Index a codebase
cd /path/to/your/project
smartgrep index

# Search for patterns
smartgrep "authenticate"
smartgrep group auth
smartgrep refs "UserService"

2. curator-monitor - Live Codebase Monitoring

# Watch for changes with overview
curator-monitor watch --overview

# Simple file change monitoring
curator-monitor watch

# Get codebase statistics
curator-monitor overview

3. codebase-curator - Interactive Curator CLI

# Start interactive chat
codebase-curator chat

# Get codebase overview
codebase-curator overview /path/to/project

# Ask specific questions
codebase-curator ask "How does authentication work?"

4. codebase-curator-mcp - MCP Server for Claude

# This is typically used by Claude Desktop
# Add to claude_desktop_config.json:
{
  "mcpServers": {
    "codebase-curator": {
      "command": "codebase-curator-mcp"
    }
  }
}

📁 Using in Your Project

Option 1: Global Commands

Once installed globally, simply navigate to your project and run:

cd /path/to/your/project
smartgrep index
smartgrep "YourSearchTerm"

Option 2: Project Dependency

Add to your project:

cd /path/to/your/project
bun add codebase-curator

Then use via bun scripts in package.json:

{
  "scripts": {
    "search": "smartgrep",
    "monitor": "curator-monitor watch",
    "curator": "codebase-curator chat"
  }
}

🔧 Configuration

Create .curatorconfig.json in your project root:

{
  "exclude": [
    "vendor",
    "*.min.js",
    "*.map"
  ],
  "include": [
    "src/**/*",
    "lib/**/*"
  ]
}

Environment Variables

# Set cache directory (optional)
export CURATOR_CACHE_DIR=/custom/cache/path

# Set session directory (optional)
export CURATOR_SESSION_DIR=/custom/session/path

🧪 Verify Installation

Test that everything is working:

# Check versions
smartgrep --version
curator-monitor --version
codebase-curator --version

# Test smartgrep
cd /path/to/any/project
smartgrep index
smartgrep --list-groups

# Test monitor
curator-monitor status

# Test curator CLI
codebase-curator --help

🐛 Troubleshooting

"Command not found" after installation

# Ensure bun's bin directory is in your PATH
export PATH="$HOME/.bun/bin:$PATH"

# Add to your shell profile (.zshrc, .bashrc, etc.)
echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.zshrc

Permission errors

# Make scripts executable
chmod +x node_modules/.bin/smartgrep
chmod +x node_modules/.bin/curator-monitor
chmod +x node_modules/.bin/codebase-curator

Bun not found

# Install bun first
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc  # or ~/.zshrc

🎯 Quick Start Examples

For a TypeScript Project

cd /path/to/typescript/project
smartgrep index
smartgrep group api
smartgrep "async" --type function
curator-monitor watch --overview

For a Python Project

cd /path/to/python/project
smartgrep index
smartgrep "@decorator" --file "*.py"
smartgrep group error

For a Multi-Language Project

cd /path/to/mixed/project
smartgrep index
smartgrep group auth  # Searches across ALL languages
smartgrep refs "DatabaseConnection"

📚 Next Steps

Happy coding with Codebase Curator! 🚀