mex's scaffold is tool-agnostic — any AI plugin that can read a system prompt or config file can use it. This guide covers four common setups.
Run Claude Code directly inside Neovim. This is the path with the least setup — mex already generates a CLAUDE.md that Claude picks up automatically.
# Inside Neovim:
:term claudeClaude Code reads CLAUDE.md from the project root, so mex's instructions are applied without any plugin configuration. Run mex setup (option 1) once to create CLAUDE.md, and you're done.
Avante.nvim supports a custom system prompt. Point it at .mex/ROUTER.md (the file mex uses to route AI tools to the right context):
require("avante").setup({
system_prompt = function()
local f = io.open(vim.fn.getcwd() .. "/.mex/ROUTER.md", "r")
if not f then return "" end
local content = f:read("*a")
f:close()
return content
end,
})Run mex setup with option 8 (None / other) — this keeps .mex/ populated without copying a tool-specific config.
GitHub Copilot for Neovim reads .github/copilot-instructions.md automatically. mex already supports this via setup.sh option 4:
./setup.sh
# Choose option 4 when promptedNo plugin config required — Copilot picks up the file as soon as it exists.
Any plugin that accepts a system prompt can be pointed at .mex/ROUTER.md. The pattern:
-- Read the ROUTER once and pass it in as the system prompt
local mex_prompt = table.concat(vim.fn.readfile(".mex/ROUTER.md"), "\n")Then feed mex_prompt into whatever field your plugin exposes (system prompt, instructions, custom context, etc).
If the plugin doesn't take a file, paste this line into its system prompt instead:
Read .mex/ROUTER.md in the current working directory and follow its routing instructions.
That one line is enough — mex's ROUTER.md handles the rest.
After any of the above, run:
mex checkIf the scaffold is wired up correctly, mex will pick up your project state and show any drift between config files.