turboprop


Nameturboprop JSON
Version 0.2.2 PyPI version JSON
download
home_pageNone
SummaryLightning-fast semantic code search and indexing with DuckDB vector operations
upload_time2025-07-15 03:06:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords code search semantic embedding mcp ai indexing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Turboprop πŸš€

Lightning-fast semantic code search with AI embeddings. Transform your codebase into a searchable knowledge base using natural language queries.

## ✨ Key Features

- πŸ” **Semantic Search**: Find code by meaning, not just keywords ("JWT authentication" finds auth logic)
- πŸ† **Lightning Fast**: DuckDB vector operations for sub-second search across large codebases
- πŸ”„ **Live Updates**: Watch mode with intelligent debouncing - your index stays fresh as you code
- πŸ€– **MCP Ready**: Perfect integration with Claude and other AI coding assistants
- πŸ“ **Git-Aware**: Respects .gitignore and only indexes what matters
- πŸ’» **Simple CLI**: Clean command-line interface with helpful guidance

## πŸš€ Quick Start

### MCP Configuration (Claude Integration) - Front and Center!

Add this to your Claude Desktop MCP configuration file:

```json
{
  "mcpServers": {
    "turboprop": {
      "command": "uvx",
      "args": [
        "turboprop",
        "mcp",
        "--repository",
        "/path/to/your/codebase",
        "--auto-index"
      ]
    }
  }
}
```

Then restart Claude Desktop and start asking questions about your code:

- "Find JWT authentication code"
- "Show me error handling patterns"
- "Where is the database connection setup?"

### Installation & Basic Usage

```bash
# Install globally
pip install turboprop

# Index your codebase
turboprop index .

# Search with natural language
turboprop search "JWT authentication"

# Watch for changes (keeps index updated)
turboprop watch .
```

## βš™οΈ CLI Usage

### `index` - Build Search Index

```bash
turboprop index <repository_path> [options]

Options:
  --max-mb FLOAT       Maximum file size in MB to index (default: 1.0)
  --workers INTEGER    Number of parallel workers (default: CPU count)
  --force-all         Force reprocessing of all files

Examples:
  turboprop index .                    # Index current directory
  turboprop index ~/my-project         # Index specific project
  turboprop index . --max-mb 2.0      # Allow larger files
```

### `search` - Semantic Code Search

```bash
turboprop search "<query>" [options]

Options:
  --repo PATH         Repository path (default: current directory)
  --k INTEGER         Number of results to return (default: 5)

Query Examples:
  turboprop search "JWT authentication"              # Find auth-related code
  turboprop search "parse JSON response"             # Discover JSON parsing logic
  turboprop search "error handling middleware"       # Locate error handling patterns
  turboprop search "database connection setup"       # Find DB initialization code
  turboprop search "React component for forms"       # Find form-related components
```

### `watch` - Live Index Updates

```bash
turboprop watch <repository_path> [options]

Options:
  --max-mb FLOAT        Maximum file size in MB (default: 1.0)
  --debounce-sec FLOAT  Seconds to wait before processing changes (default: 5.0)

Example:
  turboprop watch . --debounce-sec 3.0  # Faster updates
```

### `mcp` - Start MCP Server

```bash
turboprop mcp [options]

Options:
  --repository PATH     Repository to index and monitor (default: current directory)
  --max-mb FLOAT       Maximum file size in MB (default: 1.0)
  --debounce-sec FLOAT Seconds to wait before processing changes (default: 5.0)
  --auto-index         Automatically index on startup (default: True)
  --no-auto-index      Don't automatically index on startup
  --auto-watch         Automatically watch for changes (default: True)
  --no-auto-watch      Don't automatically watch for changes

Examples:
  turboprop mcp --repository .                     # Start MCP server for current directory
  turboprop mcp --repository /path/to/repo         # Index specific repository
  turboprop mcp --repository . --max-mb 2.0        # Allow larger files
  turboprop mcp --repository . --no-auto-index     # Don't auto-index on startup
```

### Features Available in Claude

When using the MCP server with Claude:

- **πŸ” Semantic Code Search**: Ask Claude to find code using natural language
- **πŸ“ Repository Indexing**: Automatically index and watch your codebase
- **πŸ”„ Real-time Updates**: Index stays fresh as you code
- **πŸ’¬ Natural Queries**: "Find JWT authentication code", "Show error handling patterns"

## πŸ’‘ Pro Tips & Search Examples

### Query Examples

- `"JWT authentication"` β†’ Find auth-related code
- `"parse JSON response"` β†’ Discover JSON parsing logic
- `"error handling middleware"` β†’ Locate error handling patterns
- `"database connection setup"` β†’ Find DB initialization code
- `"React component for forms"` β†’ Find form-related components

### Performance Tips

- **File size limit**: Adjust `--max-mb` based on your repository size and available memory
- **Debounce timing**: Lower `--debounce-sec` for faster updates, higher for less CPU usage
- **Search results**: Increase `--k` to see more results, decrease for faster queries

## πŸ“„ License

MIT License - feel free to use this in your projects!

---

**Ready to supercharge your code exploration? Get started in 60 seconds!** πŸš€βœ¨

## 🧠 Optimized for Claude Code

Add `.claude/code-index.commands.md` for slash commands.

---

That’s itβ€”**fucking easy as pie**. πŸ°πŸš€

## πŸ’» Enhanced CLI Experience

Turboprop now features a beautiful, user-friendly CLI with:

### Rich Help System

```bash
uv run python code_index.py --help     # Main help with examples
uv run python code_index.py index --help    # Detailed command help
uv run python code_index.py search --help   # Search-specific guidance
```

### Visual Feedback

- πŸš€ Branded startup messages
- ⚑ Progress indicators with emojis
- πŸ“Š Rich search result formatting
- πŸ’‘ Helpful tips and suggestions
- ❌ Clear error messages with solutions

### Smart Error Handling

- Missing index detection with guidance
- File size limit recommendations
- Search result explanations
- Recovery suggestions

## πŸ”— MCP Integration (Claude & AI Assistants)

### Quick Setup for Claude

1. **Start the MCP server:**

   ```bash
   uv run uvicorn server:app --host localhost --port 8000
   ```

2. **Index your repository:**

   ```bash
   uv run python code_index.py index /path/to/your/repo
   ```

3. **Use in Claude with slash commands:**
   - `/search JWT authentication` - Find auth-related code
   - `/search React form validation` - Find form components
   - `/status` - Check index health

### Available MCP Tools

- **`index_repository`** - Build searchable index from code repository
- **`search_code`** - Search code using natural language queries
- **`get_index_status`** - Check current state of the code index
- **`watch_repository`** - Monitor repository for changes
- **`list_indexed_files`** - Show files currently in the index

### MCP Configuration

The repository includes ready-to-use MCP configuration:

- `.mcp/config.json` - Server configuration
- `.claude/turboprop-commands.md` - Claude slash commands

## βš™οΈ Complete CLI Reference

### `index` - Build Search Index

```bash
uv run python code_index.py index <repository_path> [options]

Options:
  --max-mb FLOAT    Maximum file size in MB to index (default: 1.0)

Examples:
  uv run python code_index.py index .                    # Index current directory
  uv run python code_index.py index ~/my-project         # Index specific project
  uv run python code_index.py index . --max-mb 2.0      # Allow larger files
```

### `search` - Semantic Code Search

```bash
uv run python code_index.py search "<query>" [options]

Options:
  --k INTEGER      Number of results to return (default: 5)

Query Examples:
  "JWT authentication"              β†’ Find auth-related code
  "parse JSON response"             β†’ Discover JSON parsing logic
  "error handling middleware"       β†’ Locate error handling patterns
  "database connection setup"       β†’ Find DB initialization code
  "React component for forms"       β†’ Find form-related components
```

### `watch` - Live Index Updates

```bash
uv run python code_index.py watch <repository_path> [options]

Options:
  --max-mb FLOAT        Maximum file size in MB (default: 1.0)
  --debounce-sec FLOAT  Seconds to wait before processing changes (default: 5.0)

Example:
  uv run python code_index.py watch . --debounce-sec 3.0  # Faster updates
```

## 🌐 HTTP API Server

### Start the Server

```bash
# Development mode with auto-reload (using uv)
uv run uvicorn server:app --reload --host 0.0.0.0 --port 8000

# Production mode
uv run uvicorn server:app --host 0.0.0.0 --port 8000

# OR with activated virtual environment
uvicorn server:app --reload --host 0.0.0.0 --port 8000
```

### API Endpoints

#### `POST /index` - Build Index

```bash
curl -X POST "http://localhost:8000/index" \
  -H "Content-Type: application/json" \
  -d '{"repo": "/path/to/repository", "max_mb": 1.0}'

# Response: {"status": "indexed", "files": 1247}
```

#### `GET /search` - Search Code

```bash
curl "http://localhost:8000/search?query=JWT%20authentication&k=5"

# Response:
[
  {
    "path": "/src/auth/middleware.py",
    "snippet": "def verify_jwt_token(token: str):\n    \"\"\"Verify JWT token and extract claims...",
    "distance": 0.234
  }
]
```

#### `GET /status` - Index Status

```bash
curl "http://localhost:8000/status"

# Response:
{
  "files_indexed": 1247,
  "database_size_mb": 125.6,
  "search_index_ready": true,
  "last_updated": "Recent",
  "embedding_dimensions": 384,
  "model_name": "all-MiniLM-L6-v2"
}
```

### Interactive API Documentation

- **Swagger UI**: http://localhost:8000/docs
- **ReDoc**: http://localhost:8000/redoc

## πŸ’‘ Pro Tips & Best Practices

### Search Query Optimization

- **Use descriptive phrases**: "authentication middleware" vs just "auth"
- **Ask conceptual questions**: "how to handle errors" vs "try catch"
- **Combine multiple concepts**: "JWT token validation middleware"
- **Be domain-specific**: "React form validation" vs "form validation"

### Performance Tuning

- **File size limit**: Adjust `--max-mb` based on your repository size and available memory
- **Debounce timing**: Lower `--debounce-sec` for faster updates, higher for less CPU usage
- **Search results**: Increase `--k` to see more results, decrease for faster queries

### File Management

- **Index files**: `code_index.duckdb` (database) and `hnsw_code.idx` (search index)
- **Location**: Created in the current working directory
- **Cleanup**: Delete these files to reset the index completely
- **Backup**: Copy these files to backup your index

## πŸ—οΈ Architecture Overview

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Git Repository │───▢│  File Scanner    │───▢│  Code Files     β”‚
β”‚   (.gitignore    β”‚    β”‚  (scan_repo)     β”‚    β”‚  (.py, .js, etc)β”‚
β”‚    aware)        β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                       β”‚
                                                          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Search Results │◀───│  HNSW Index     │◀───│  Embeddings     β”‚
β”‚   (ranked by    β”‚    β”‚  (fast vector   β”‚    β”‚  (ML model:     β”‚
β”‚    similarity)  β”‚    β”‚   search)        β”‚    β”‚   all-MiniLM)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β–²                        β”‚
                                 β”‚                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Query    │───▢│  Query Embedding β”‚    β”‚  DuckDB Storage β”‚
β”‚   ("parse JSON") β”‚    β”‚  (same model)   β”‚    β”‚  (persistent)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β–²
                                 β”‚
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚   FastAPI Server β”‚ ←── MCP Integration
                   β”‚   (HTTP API)     β”‚     Claude, etc.
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## 🀝 Contributing

We welcome contributions! Key areas for improvement:

- Additional programming language support
- Performance optimizations for large repositories
- IDE/editor integrations
- Advanced search features (regex, file filters, etc.)
- Better error handling and user feedback
- Enhanced MCP tool capabilities

## πŸ“„ License

MIT License - feel free to use this in your projects!

---

**Ready to supercharge your code exploration? Get started in 60 seconds!** πŸš€βœ¨

_Turboprop: Because finding code should be as smooth as flying._

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "turboprop",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "code, search, semantic, embedding, mcp, ai, indexing",
    "author": null,
    "author_email": "Greg Lamp <greg@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/75/ff/db8b68dba3e9dfadb951fafc1dc35e956e0b2bdaab8db5714ef6d6bef08b/turboprop-0.2.2.tar.gz",
    "platform": null,
    "description": "# Turboprop \ud83d\ude80\n\nLightning-fast semantic code search with AI embeddings. Transform your codebase into a searchable knowledge base using natural language queries.\n\n## \u2728 Key Features\n\n- \ud83d\udd0d **Semantic Search**: Find code by meaning, not just keywords (\"JWT authentication\" finds auth logic)\n- \ud83d\udc06 **Lightning Fast**: DuckDB vector operations for sub-second search across large codebases\n- \ud83d\udd04 **Live Updates**: Watch mode with intelligent debouncing - your index stays fresh as you code\n- \ud83e\udd16 **MCP Ready**: Perfect integration with Claude and other AI coding assistants\n- \ud83d\udcc1 **Git-Aware**: Respects .gitignore and only indexes what matters\n- \ud83d\udcbb **Simple CLI**: Clean command-line interface with helpful guidance\n\n## \ud83d\ude80 Quick Start\n\n### MCP Configuration (Claude Integration) - Front and Center!\n\nAdd this to your Claude Desktop MCP configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"turboprop\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"turboprop\",\n        \"mcp\",\n        \"--repository\",\n        \"/path/to/your/codebase\",\n        \"--auto-index\"\n      ]\n    }\n  }\n}\n```\n\nThen restart Claude Desktop and start asking questions about your code:\n\n- \"Find JWT authentication code\"\n- \"Show me error handling patterns\"\n- \"Where is the database connection setup?\"\n\n### Installation & Basic Usage\n\n```bash\n# Install globally\npip install turboprop\n\n# Index your codebase\nturboprop index .\n\n# Search with natural language\nturboprop search \"JWT authentication\"\n\n# Watch for changes (keeps index updated)\nturboprop watch .\n```\n\n## \u2699\ufe0f CLI Usage\n\n### `index` - Build Search Index\n\n```bash\nturboprop index <repository_path> [options]\n\nOptions:\n  --max-mb FLOAT       Maximum file size in MB to index (default: 1.0)\n  --workers INTEGER    Number of parallel workers (default: CPU count)\n  --force-all         Force reprocessing of all files\n\nExamples:\n  turboprop index .                    # Index current directory\n  turboprop index ~/my-project         # Index specific project\n  turboprop index . --max-mb 2.0      # Allow larger files\n```\n\n### `search` - Semantic Code Search\n\n```bash\nturboprop search \"<query>\" [options]\n\nOptions:\n  --repo PATH         Repository path (default: current directory)\n  --k INTEGER         Number of results to return (default: 5)\n\nQuery Examples:\n  turboprop search \"JWT authentication\"              # Find auth-related code\n  turboprop search \"parse JSON response\"             # Discover JSON parsing logic\n  turboprop search \"error handling middleware\"       # Locate error handling patterns\n  turboprop search \"database connection setup\"       # Find DB initialization code\n  turboprop search \"React component for forms\"       # Find form-related components\n```\n\n### `watch` - Live Index Updates\n\n```bash\nturboprop watch <repository_path> [options]\n\nOptions:\n  --max-mb FLOAT        Maximum file size in MB (default: 1.0)\n  --debounce-sec FLOAT  Seconds to wait before processing changes (default: 5.0)\n\nExample:\n  turboprop watch . --debounce-sec 3.0  # Faster updates\n```\n\n### `mcp` - Start MCP Server\n\n```bash\nturboprop mcp [options]\n\nOptions:\n  --repository PATH     Repository to index and monitor (default: current directory)\n  --max-mb FLOAT       Maximum file size in MB (default: 1.0)\n  --debounce-sec FLOAT Seconds to wait before processing changes (default: 5.0)\n  --auto-index         Automatically index on startup (default: True)\n  --no-auto-index      Don't automatically index on startup\n  --auto-watch         Automatically watch for changes (default: True)\n  --no-auto-watch      Don't automatically watch for changes\n\nExamples:\n  turboprop mcp --repository .                     # Start MCP server for current directory\n  turboprop mcp --repository /path/to/repo         # Index specific repository\n  turboprop mcp --repository . --max-mb 2.0        # Allow larger files\n  turboprop mcp --repository . --no-auto-index     # Don't auto-index on startup\n```\n\n### Features Available in Claude\n\nWhen using the MCP server with Claude:\n\n- **\ud83d\udd0d Semantic Code Search**: Ask Claude to find code using natural language\n- **\ud83d\udcc1 Repository Indexing**: Automatically index and watch your codebase\n- **\ud83d\udd04 Real-time Updates**: Index stays fresh as you code\n- **\ud83d\udcac Natural Queries**: \"Find JWT authentication code\", \"Show error handling patterns\"\n\n## \ud83d\udca1 Pro Tips & Search Examples\n\n### Query Examples\n\n- `\"JWT authentication\"` \u2192 Find auth-related code\n- `\"parse JSON response\"` \u2192 Discover JSON parsing logic\n- `\"error handling middleware\"` \u2192 Locate error handling patterns\n- `\"database connection setup\"` \u2192 Find DB initialization code\n- `\"React component for forms\"` \u2192 Find form-related components\n\n### Performance Tips\n\n- **File size limit**: Adjust `--max-mb` based on your repository size and available memory\n- **Debounce timing**: Lower `--debounce-sec` for faster updates, higher for less CPU usage\n- **Search results**: Increase `--k` to see more results, decrease for faster queries\n\n## \ud83d\udcc4 License\n\nMIT License - feel free to use this in your projects!\n\n---\n\n**Ready to supercharge your code exploration? Get started in 60 seconds!** \ud83d\ude80\u2728\n\n## \ud83e\udde0 Optimized for Claude Code\n\nAdd `.claude/code-index.commands.md` for slash commands.\n\n---\n\nThat\u2019s it\u2014**fucking easy as pie**. \ud83c\udf70\ud83d\ude80\n\n## \ud83d\udcbb Enhanced CLI Experience\n\nTurboprop now features a beautiful, user-friendly CLI with:\n\n### Rich Help System\n\n```bash\nuv run python code_index.py --help     # Main help with examples\nuv run python code_index.py index --help    # Detailed command help\nuv run python code_index.py search --help   # Search-specific guidance\n```\n\n### Visual Feedback\n\n- \ud83d\ude80 Branded startup messages\n- \u26a1 Progress indicators with emojis\n- \ud83d\udcca Rich search result formatting\n- \ud83d\udca1 Helpful tips and suggestions\n- \u274c Clear error messages with solutions\n\n### Smart Error Handling\n\n- Missing index detection with guidance\n- File size limit recommendations\n- Search result explanations\n- Recovery suggestions\n\n## \ud83d\udd17 MCP Integration (Claude & AI Assistants)\n\n### Quick Setup for Claude\n\n1. **Start the MCP server:**\n\n   ```bash\n   uv run uvicorn server:app --host localhost --port 8000\n   ```\n\n2. **Index your repository:**\n\n   ```bash\n   uv run python code_index.py index /path/to/your/repo\n   ```\n\n3. **Use in Claude with slash commands:**\n   - `/search JWT authentication` - Find auth-related code\n   - `/search React form validation` - Find form components\n   - `/status` - Check index health\n\n### Available MCP Tools\n\n- **`index_repository`** - Build searchable index from code repository\n- **`search_code`** - Search code using natural language queries\n- **`get_index_status`** - Check current state of the code index\n- **`watch_repository`** - Monitor repository for changes\n- **`list_indexed_files`** - Show files currently in the index\n\n### MCP Configuration\n\nThe repository includes ready-to-use MCP configuration:\n\n- `.mcp/config.json` - Server configuration\n- `.claude/turboprop-commands.md` - Claude slash commands\n\n## \u2699\ufe0f Complete CLI Reference\n\n### `index` - Build Search Index\n\n```bash\nuv run python code_index.py index <repository_path> [options]\n\nOptions:\n  --max-mb FLOAT    Maximum file size in MB to index (default: 1.0)\n\nExamples:\n  uv run python code_index.py index .                    # Index current directory\n  uv run python code_index.py index ~/my-project         # Index specific project\n  uv run python code_index.py index . --max-mb 2.0      # Allow larger files\n```\n\n### `search` - Semantic Code Search\n\n```bash\nuv run python code_index.py search \"<query>\" [options]\n\nOptions:\n  --k INTEGER      Number of results to return (default: 5)\n\nQuery Examples:\n  \"JWT authentication\"              \u2192 Find auth-related code\n  \"parse JSON response\"             \u2192 Discover JSON parsing logic\n  \"error handling middleware\"       \u2192 Locate error handling patterns\n  \"database connection setup\"       \u2192 Find DB initialization code\n  \"React component for forms\"       \u2192 Find form-related components\n```\n\n### `watch` - Live Index Updates\n\n```bash\nuv run python code_index.py watch <repository_path> [options]\n\nOptions:\n  --max-mb FLOAT        Maximum file size in MB (default: 1.0)\n  --debounce-sec FLOAT  Seconds to wait before processing changes (default: 5.0)\n\nExample:\n  uv run python code_index.py watch . --debounce-sec 3.0  # Faster updates\n```\n\n## \ud83c\udf10 HTTP API Server\n\n### Start the Server\n\n```bash\n# Development mode with auto-reload (using uv)\nuv run uvicorn server:app --reload --host 0.0.0.0 --port 8000\n\n# Production mode\nuv run uvicorn server:app --host 0.0.0.0 --port 8000\n\n# OR with activated virtual environment\nuvicorn server:app --reload --host 0.0.0.0 --port 8000\n```\n\n### API Endpoints\n\n#### `POST /index` - Build Index\n\n```bash\ncurl -X POST \"http://localhost:8000/index\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"repo\": \"/path/to/repository\", \"max_mb\": 1.0}'\n\n# Response: {\"status\": \"indexed\", \"files\": 1247}\n```\n\n#### `GET /search` - Search Code\n\n```bash\ncurl \"http://localhost:8000/search?query=JWT%20authentication&k=5\"\n\n# Response:\n[\n  {\n    \"path\": \"/src/auth/middleware.py\",\n    \"snippet\": \"def verify_jwt_token(token: str):\\n    \\\"\\\"\\\"Verify JWT token and extract claims...\",\n    \"distance\": 0.234\n  }\n]\n```\n\n#### `GET /status` - Index Status\n\n```bash\ncurl \"http://localhost:8000/status\"\n\n# Response:\n{\n  \"files_indexed\": 1247,\n  \"database_size_mb\": 125.6,\n  \"search_index_ready\": true,\n  \"last_updated\": \"Recent\",\n  \"embedding_dimensions\": 384,\n  \"model_name\": \"all-MiniLM-L6-v2\"\n}\n```\n\n### Interactive API Documentation\n\n- **Swagger UI**: http://localhost:8000/docs\n- **ReDoc**: http://localhost:8000/redoc\n\n## \ud83d\udca1 Pro Tips & Best Practices\n\n### Search Query Optimization\n\n- **Use descriptive phrases**: \"authentication middleware\" vs just \"auth\"\n- **Ask conceptual questions**: \"how to handle errors\" vs \"try catch\"\n- **Combine multiple concepts**: \"JWT token validation middleware\"\n- **Be domain-specific**: \"React form validation\" vs \"form validation\"\n\n### Performance Tuning\n\n- **File size limit**: Adjust `--max-mb` based on your repository size and available memory\n- **Debounce timing**: Lower `--debounce-sec` for faster updates, higher for less CPU usage\n- **Search results**: Increase `--k` to see more results, decrease for faster queries\n\n### File Management\n\n- **Index files**: `code_index.duckdb` (database) and `hnsw_code.idx` (search index)\n- **Location**: Created in the current working directory\n- **Cleanup**: Delete these files to reset the index completely\n- **Backup**: Copy these files to backup your index\n\n## \ud83c\udfd7\ufe0f Architecture Overview\n\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502   Git Repository \u2502\u2500\u2500\u2500\u25b6\u2502  File Scanner    \u2502\u2500\u2500\u2500\u25b6\u2502  Code Files     \u2502\n\u2502   (.gitignore    \u2502    \u2502  (scan_repo)     \u2502    \u2502  (.py, .js, etc)\u2502\n\u2502    aware)        \u2502    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                                       \u2502\n                                                          \u25bc\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502   Search Results \u2502\u25c0\u2500\u2500\u2500\u2502  HNSW Index     \u2502\u25c0\u2500\u2500\u2500\u2502  Embeddings     \u2502\n\u2502   (ranked by    \u2502    \u2502  (fast vector   \u2502    \u2502  (ML model:     \u2502\n\u2502    similarity)  \u2502    \u2502   search)        \u2502    \u2502   all-MiniLM)   \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                                 \u25b2                        \u2502\n                                 \u2502                        \u25bc\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502   User Query    \u2502\u2500\u2500\u2500\u25b6\u2502  Query Embedding \u2502    \u2502  DuckDB Storage \u2502\n\u2502   (\"parse JSON\") \u2502    \u2502  (same model)   \u2502    \u2502  (persistent)   \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                                 \u25b2\n                                 \u2502\n                   \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n                   \u2502   FastAPI Server \u2502 \u2190\u2500\u2500 MCP Integration\n                   \u2502   (HTTP API)     \u2502     Claude, etc.\n                   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Key areas for improvement:\n\n- Additional programming language support\n- Performance optimizations for large repositories\n- IDE/editor integrations\n- Advanced search features (regex, file filters, etc.)\n- Better error handling and user feedback\n- Enhanced MCP tool capabilities\n\n## \ud83d\udcc4 License\n\nMIT License - feel free to use this in your projects!\n\n---\n\n**Ready to supercharge your code exploration? Get started in 60 seconds!** \ud83d\ude80\u2728\n\n_Turboprop: Because finding code should be as smooth as flying._\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Lightning-fast semantic code search and indexing with DuckDB vector operations",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/glamp/turboprop",
        "Issues": "https://github.com/glamp/turboprop/issues",
        "Repository": "https://github.com/glamp/turboprop"
    },
    "split_keywords": [
        "code",
        " search",
        " semantic",
        " embedding",
        " mcp",
        " ai",
        " indexing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cf73bb159ab7fd5e8cd4d9c872bd6e4fcc5b9ad2d7618332c55e95a43190952a",
                "md5": "df11aa7f2a8e03cf751f286171db33cf",
                "sha256": "d68ac900aa47996fc560a486fb1472692b2a0500f6d8f057d7417d4f2fc5969c"
            },
            "downloads": -1,
            "filename": "turboprop-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df11aa7f2a8e03cf751f286171db33cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 36997,
            "upload_time": "2025-07-15T03:06:12",
            "upload_time_iso_8601": "2025-07-15T03:06:12.470955Z",
            "url": "https://files.pythonhosted.org/packages/cf/73/bb159ab7fd5e8cd4d9c872bd6e4fcc5b9ad2d7618332c55e95a43190952a/turboprop-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "75ffdb8b68dba3e9dfadb951fafc1dc35e956e0b2bdaab8db5714ef6d6bef08b",
                "md5": "0f6016008bdddc5f781e4cf1ee0e7957",
                "sha256": "6e0a9ab4fae911531d2f7409ce20f02a58b6210cd8a6ab93b5f2a833046e4f4f"
            },
            "downloads": -1,
            "filename": "turboprop-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0f6016008bdddc5f781e4cf1ee0e7957",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 46417,
            "upload_time": "2025-07-15T03:06:13",
            "upload_time_iso_8601": "2025-07-15T03:06:13.614607Z",
            "url": "https://files.pythonhosted.org/packages/75/ff/db8b68dba3e9dfadb951fafc1dc35e956e0b2bdaab8db5714ef6d6bef08b/turboprop-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-15 03:06:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "glamp",
    "github_project": "turboprop",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "turboprop"
}
        
Elapsed time: 0.44249s