Skip to guide
Macaron Docs

Brain and code search · next desktop release

Search a project by meaning, find code written twice and see how it fits together.

Index a project

Brain comes in the next desktop release. Open Brain in the right panel and press Index this project. Macaron reads the project’s files, splits them into overlapping 80-line chunks and turns each chunk into a vector. Search, Suggestions, Duplicates and Map all work from that index. Indexing needs a Macaron sign-in. Reindex picks up files that changed since last time, and Cancel keeps what was already done.

What is sent and what is kept

Indexing is the only Brain step that sends code anywhere. Each chunk goes to macaron.sh with its file path, where an EmbeddingGemma model turns it into a vector; the chunk is not kept there. The index stays on your device, in Macaron’s app data folder. A search sends its query text the same way. Nothing is sent for a project until you press Index this project for it, and Macaron remembers that choice for each project.

  • Never read or sent: .env files, private keys and certificates such as id_rsa or .pem files, .npmrc, .netrc and mcp.json, and folders such as .git, .ssh, .aws and secrets.
  • Left out: lock files, images, archives and other binary files, node_modules and build output, and any file over 200 KB.

Search by meaning

Ask in plain words, for example “Where do we check the session?”. Results show the file, the lines and a short snippet, at most two from one file. Select a result to open the file at that line.

Duplicates

Duplicates lists pairs of chunks that are at least 97% alike, in different files or far apart in one: the same logic written twice. Open both places and move the logic into one shared function.

Project map

Map groups the code into related parts, largest first, each named after the folders and files common in it. Open any file from its group.

Flavour suggestions

Suggestions reads the index for dependencies, file types, imports and config files, and lists the built-in flavours that fit, each with the files that point to it. Turn one on from the list, or press Make this flavour to save a flavour put together for this project. Services the project uses, such as Stripe or Supabase, are listed too. To compare the code with each flavour, Macaron embeds five fixed flavour descriptions, not your code.

Shared memory for agents

For chats in a folder on this computer, Claude Code and Codex get the macaron_brain tools. They run entirely on your device with a local copy of EmbeddingGemma, downloaded once (about 315 MB) on the first search, and keep their index and memories in ~/.macaron/brain.

  • search_code: find code by meaning and get file and line ranges with the code.
  • remember: save one fact for every agent working on this repository, or for every repository.
  • recall: look up what agents saved before.
  • recent_memories: the newest saved facts, newest first.

From the command line

The macaron command that comes with the desktop app doesn’t include code search or memory. Use them from the desktop app.

FAQ

How do I remove a project’s index?

Quit Macaron and delete the brain folder in Macaron’s app data folder: ~/Library/Application Support/Bowie/brain on macOS, or %APPDATA%\Bowie\brain on Windows. This removes every Brain index on this device, and Macaron asks again before indexing any project. The agents’ memories and their local index are in ~/.macaron/brain; delete that folder to remove them.

Do the macaron_brain tools send my code anywhere?

No. They index and search on your device. What they return goes to the agent like any file it reads, so it reaches your model provider the same way.