Quick Start
Search Modes
Text Search (Default)
Works immediately, no setup required:- File name matching
- Content matching with context
- Highlighted results
Semantic Search
With an OpenAI API key, wit can understand the meaning of your query:- Synonyms (“db” = “database”)
- Intent (“how do we” = looking for implementation)
- Concepts (“authentication flow” = login, session, tokens)
Setup for Semantic Search
1. Set API Key
2. Index Your Repository
3. Check Status
Usage
Basic Search
Interactive Mode
For exploratory searching:Search with Filters
Search in Files vs Content
Examples
Finding Implementation Details
Understanding Code
Finding Problems
Comparison: Text vs Semantic
Index Management
Create/Update Index
Index Status
Clear Index
Configuration
Environment Variables
Ignore Patterns
Create.witsearchignore in your repo root:
Tips
- Ask questions naturally: “where do we” and “how does” work great
- Be specific: “user authentication in API routes” beats “auth”
- Use interactive mode: When exploring unfamiliar code
-
Index regularly: Run
wit search indexafter major changes -
Combine with AI: Found something? Ask
wit ai explainfor more context
Integration with Other Commands
Privacy
Semantic search sends code snippets to OpenAI for embedding generation.
- Only indexed portions of code are sent
- Embeddings are stored locally
- No code is stored on OpenAI servers
Troubleshooting
Semantic search not working
Semantic search not working
Check your API key:Make sure the key is valid and has embedding permissions.
Results seem outdated
Results seem outdated
Re-index your repository:
Slow searches
Slow searches
- Index size affects speed
- Use
--limitfor faster results - Add large directories to
.witsearchignore
Too many irrelevant results
Too many irrelevant results
- Be more specific in your query
- Use path filters:
--path src/ - Update your ignore patterns
Future Improvements
We’re working on:- Local embedding models (no API key required)
- Cross-repository search
- Search history and saved queries
- IDE integration