Codebase indexing
What codebase indexing does in Mel, how to turn it on, and why it stays on your computer.
What is codebase indexing in Mel? Mel can keep a map of each project folder you choose: its files and the code symbols defined in them (functions, types, classes), each with its name, kind and line. The map is built and kept on your computer; your code is never sent to a server to build it. Indexing is off by default.
Today the agent does not use the index yet. The map is being prepared for agents. Until then, the agent finds its way around your code by searching with its grep, find_files and glob tools, which work with or without an index.
Turn it on
- Open Settings ▸ Indexing and projects (under Code in the settings list).
- Turn on Codebase indexing.
- Optionally turn on Index new folders by default: a git repository you open in a pane is then added to the list by itself.
- Click Index new folder to add a project folder by hand.
The folders appear under Initialized / indexed folders, each with where it stands:
| Status | Meaning |
|---|---|
| Waiting to index | Listed, not built yet |
| Paused: Codebase indexing is off | Listed, but the switch is off |
| Indexing… | Being built in the background |
| *N files · N symbols · indexed 5 min ago* | Ready. "first 20,000 files" means the folder had more |
| Not indexed: *reason* | It couldn't be built, and why |
Click the ✕ beside a folder to stop indexing it. Its map is deleted, and Mel never adds that folder back on its own.
What gets indexed
- Inside a git repository: the files git tracks plus untracked files that aren't ignored, so anything in
.gitignorestays out of the map. - Outside a repository: every file, skipping hidden folders and the usual dependency and build folders (
node_modules,target,dist,build,bin,obj,vendor,venv,__pycache__). - Symbols are read from Rust, Python, JavaScript and TypeScript, Go, Java, Kotlin, Scala, C#, Swift, Ruby, PHP, and C, C++ and Objective-C files. Other files are listed without symbols.
- Limits: up to 20,000 files per folder, and files up to 512 KB are read for symbols. On Windows, a OneDrive file that is online-only is listed but not downloaded.
- Refused: a whole drive and your whole home folder. Add a project folder inside them instead.
Mel reads files the way a person scanning them would. It never runs anything in your project to build the map.
Keeping it fresh
While a pane is in an indexed repository, Mel looks again every 10 minutes and rebuilds the map if git shows that files changed, and rebuilds it after an hour whatever git says. All of it runs on a background thread, so the window never waits.
Where it's stored
The maps live in Mel's data folder, under code_index/: ~/.local/share/mel/code_index/ on macOS and Linux, %APPDATA%\mel\code_index\ on Windows. Nothing in them leaves your computer. See Settings & files on disk.
FAQ
Does codebase indexing upload my code? No. The map is built and stored on your computer.
Does the agent need an index to understand my repo? No. It searches your files with its own tools. The index is being prepared for agents, and they don't read it yet.
Why does a folder say "Not indexed"? The reason follows the words: for example the folder is gone, git couldn't list it, or it's a whole drive or your home folder.
Will it slow my computer down? Indexing is off until you turn it on, runs in the background, and stops at 20,000 files per folder.