A fast and efficient code search tool powered by Tantivy, allowing you to search through your codebase with lightning speed ⚡
- 🚀 Fast full-text search in your codebase
- 🎯 Language-aware code tokenization using Pygments
- 📁 Support for multiple file extensions
- 👀 Preview of search results
- ⚙️ Configurable search options
- 🔄 Automatic retry mechanism for robust indexing
- 🚦 Concurrent processing for better performance
pip install codesearch
- Install uv first:
curl -fsSL https://get.uvm.dev | bash
# or
brew install uv
- Create and activate a virtual environment:
uv venv
source .venv/bin/activate # On Unix
# or
.venv\Scripts\activate # On Windows
- Install the package:
uv pip install codesearch
Index your code:
codesearch --index /path/to/your/code --extensions py,js,ts
Search in your indexed code:
codesearch --search "your search query"
- Python 3.11+
- Tantivy
- Loguru
MIT License