Embeddings-Based Project Indexing
When you open a project in Cursor, the editor generates embeddings for every file. Embeddings are high-dimensional vector representations that encode the semantic meaning of code — what a function does, what data a type represents, how modules relate to each other. This is fundamentally different from a text search index. A text search finds files containing the word "authenticate." An embeddings search finds all code related to authentication — login flows, token validation, session management, permission checks — even if those files never use the word "authenticate."
The index builds in the background without blocking your editor. Initial indexing for a 10,000-file project takes 30 to 60 seconds depending on your hardware. After the initial build, the index updates incrementally — only re-embedding files you modify. The embeddings are stored locally in your project's .cursor directory. Your source code is never uploaded to external servers during indexing. This local-first approach means @codebase works in air-gapped environments and with proprietary codebases.