Code Search
Search your codebase by keywords, by meaning, or both. Vast finds exact function names and conceptual matches in a single query.
Quick start
# Build the search index
8v search index .
# Search your code
8v search find "authentication"
The first command indexes all files in the current directory. The second searches them. By default, Vast searches by both keywords and meaning — so searching "login" also finds files about "authentication" and "credentials."
Search modes
# Default — finds by keywords AND meaning
8v search find "error handling patterns"
# Keywords only — fast, finds exact identifiers
8v search find "resolve_index_dir" --mode bm25
# Meaning only — finds conceptual matches
8v search find "deployment strategy" --mode semantic
| Mode | Good for | Example |
|---|---|---|
| Default (hybrid) | Most searches | "how does auth work" |
Keywords (--mode bm25) | Function names, error codes, exact strings | "resolve_index_dir" |
Meaning (--mode semantic) | Conceptual questions | "how to handle user sessions" |
Indexing
Before you can search, build an index:
8v search index .
8v search index /path/to/project
The index is stored in ~/.8v/index/ — it never touches your project directory. Vast respects .gitignore and skips target/, node_modules/, and similar directories.
Indexed file types: .rs, .ts, .tsx, .js, .jsx, .toml, .yaml, .yml, .md, .json
Everything runs locally. No API calls, no cloud. The embedding model runs on your CPU.
Find symbols
Extract functions, structs, enums, and traits from your code:
# All public symbols
8v search symbols .
# Filter by kind
8v search symbols . --kind function
# Include private symbols
8v search symbols . --private
# Single file
8v search symbols src/main.rs
Options
8v search find
| Flag | Default | Description |
|---|---|---|
--mode | hybrid | hybrid, bm25, or semantic |
--path | . | Directory to search |
--limit | 10 | Maximum results |
--format | text | text or json |
8v search symbols
| Flag | Default | Description |
|---|---|---|
--kind | all | function, struct, enum, trait, const, module, impl |
--private | false | Include private symbols |
--format | text | text or json |
Performance
| Operation | Time |
|---|---|
| Index 825 files | ~30s |
| Keyword search | <1ms |
| Meaning search | ~100ms |
| Combined search | ~100ms |
Without an index
If you haven't built an index, search still works — it falls back to regex search (like ripgrep). You get keyword matching but not meaning-based results. Run 8v search index . to unlock the full experience.