Overview
Thewit search command provides both AI-powered semantic search and traditional text search.
Quick Start
Commands
Search Query
Search your codebase with a natural language query.Examples
index
Index the repository for semantic search.Options
| Option | Description |
|---|---|
--force, -f | Force reindex all files |
Example Output
status
Check the health of the search index.Example Output
files
Search for files by glob pattern.Search Options
Text Search
Force text search instead of semantic search.Files Only
Search only file names (not contents).Content Only
Search only file contents (not names).Filter by File Type
Search within specific file types.Interactive Mode
Launch an interactive search session.Search Results
Semantic Search Results
Text Search Results
Configuration
API Key
Semantic search requires an OpenAI API key for generating embeddings.Index Location
The search index is stored in.wit/search/ and includes:
- Vector embeddings
- File metadata
- Index statistics
Best Practices
When to Use Semantic Search
- Understanding how something works
- Finding related code across the codebase
- Exploring unfamiliar code
- Finding implementations of concepts
When to Use Text Search
- Finding exact strings or patterns
- Looking for specific identifiers
- Finding TODO comments
- Searching for error messages
Index Maintenance
Workflow Example
Related Documentation
- Search Feature Guide - Detailed feature documentation
- Search API Reference - API documentation