| Crates.io | ragrep |
| lib.rs | ragrep |
| version | 0.1.0 |
| created_at | 2025-02-18 21:30:54.212734+00 |
| updated_at | 2025-02-18 21:30:54.212734+00 |
| description | A fast, natural language code search tool |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1560482 |
| size | 137,413 |
[!WARNING] WIP big time. This codebase is full of broken glass, sharp edges, and dragons.
A semantic code search tool that uses embeddings to find similar code snippets across your codebase. Use it to search for things like:
# Not actually live yet - still need to publish it
cargo install ragrep
git clone https://github.com/yourusername/ragrep.git
cd ragrep
cargo build --release
The binary will be available at target/release/ragrep
[!IMPORTANT] The first time you run ragrep, it will download a model and cache it in is global data directory. This might take a minute and will use about 1.5GB of disk space.
Before searching, you need to index your codebase:
# Index the current directory
ragrep index
# Index a specific directory
ragrep index --path /path/to/your/code
# Search for code similar to your query
ragrep "handle http request error"
The search results will show relevant code snippets along with their file locations, formatted in a familiar ripgrep-style output.
To see similarity scores in the output:
RUST_LOG=debug ragrep "your query"
More languages can be added by including their respective tree-sitter parsers.
Indexing:
Searching:
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.