Skip to main content
New codebase. Where’s the authentication logic?
Good luck.
wit understands what you’re asking, not just the words you used.

Quick Start

Search Modes

Text Search (Default)

Works immediately, no setup required:
This performs intelligent text search with:
  • File name matching
  • Content matching with context
  • Highlighted results
With an OpenAI API key, wit can understand the meaning of your query:
Semantic search understands:
  • Synonyms (“db” = “database”)
  • Intent (“how do we” = looking for implementation)
  • Concepts (“authentication flow” = login, session, tokens)

1. Set API Key

Add to your shell profile for persistence:

2. Index Your Repository

This creates embeddings for your code, enabling semantic understanding:

3. Check Status

Usage

Output:

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

  1. Ask questions naturally: “where do we” and “how does” work great
  2. Be specific: “user authentication in API routes” beats “auth”
  3. Use interactive mode: When exploring unfamiliar code
  4. Index regularly: Run wit search index after major changes
  5. Combine with AI: Found something? Ask wit ai explain for 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
For sensitive codebases, use text-only search (no API key required).

Troubleshooting

Check your API key:
Make sure the key is valid and has embedding permissions.
Re-index your repository:
  • Index size affects speed
  • Use --limit for faster results
  • Add large directories to .witsearchignore
  • 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