Configuration
What you can configure in memcode, and where your settings and secrets live.
Most settings are things you change from inside a session, and they stick per project. This page covers what's configurable and where it's stored.
Per-project settings
Set these in a session and memcode remembers them for the project:
- Your model choice, with
/model - The permission mode, with
/mode - The color theme, with
/theme - The assistant's voice, with
/personality - How hard it thinks, with
/effort
They're saved in .memcode/config.json at your repo root. That file never holds
API keys.
Where secrets live
Your tokens and keys live in ~/.config/memcode/.env, written by memcode login and the setup wizard. memcode reads only this file for credentials. It
deliberately does not read your project's .env, so repo files never leak keys
into memcode.
Custom instructions
Rules memcode should always follow go in a MEMCODE.md file. See MEMCODE.md.
Share memory with other tools
memcode sync writes a summary of what memcode knows into the context files
other assistants read, such as CLAUDE.md and AGENTS.md. Run it interactively to
pick which files to update:
memcode syncHooks
If you want to run your own commands at set points, such as before a tool runs
or when a session ends, memcode supports hooks. Configure them in
~/.memcode/hooks.json for all projects or .memcode/hooks.json for one
project. The full reference is in HOOKS.md in the repository.
Environment variables
For backend selection and other knobs you set in your shell, see Environment variables.