A command-line semantic search tool that indexes and searches local Git repositories using vector embeddings.
"dokosa" (どこさ?) is Japanese for "where is it?".
- Semantic indexing: Uses OpenAI embeddings to create searchable vector representations of code
- Git integration: Automatically tracks repository commits and file changes
- Flexible filtering: Include/exclude files using glob patterns
- Chunked processing: Splits large files into overlapping chunks for better search granularity
- Similarity search: Find code snippets based on semantic meaning, not just keyword matching
$ cargo install dokosa
# Set your OpenAI API key
$ export OPENAI_API_KEY="your-api-key-here"
# Set the index file path
$ export DOKOSA_INDEX_FILE="$HOME/.dokosa"
# Add a repository to the index
$ dokosa add /path/to/your/repo
# Search for code semantically
$ echo "function to parse JSON" | dokosa search
# Sync repositories with latest commits
$ dokosa sync
add
- Index a Git repository for semantic searchsearch
- Find semantically similar code chunkslist
- Show all indexed repositoriessync
- Update repositories with latest changesremove
- Remove a repository from the index
Run dokosa <command> --help
for detailed options.