User config (~/.magic)
Everything user-level Magic Coder stores about you lives under ~/.magic/. It’s safe to inspect, edit, and version-control the parts that make sense to.
File map
Section titled “File map”~/.magic/├── config.toml # User config: machine ID, generation defaults, UI preferences├── known.toml # Workspace registry — which workspaces you've seen and trusted├── known/│ └── <workspace-key>/│ └── history.jsonl # Per-workspace input history├── skills/ # User-level skills (each under <name>/SKILL.md). See Skills.├── rules/ # User-level Markdown rules (under <category>/<name>.md). See Rules.├── cache/ # Cache data, including background shells (don't edit)└── locks/ # Lock files (don't edit)Sign-in credentials are not in this directory — Magic Coder stores them in the OS keychain (Keychain on macOS, Secret Service on Linux), with a fallback file at ~/.config/magic-coder/credentials.json on Linux and %APPDATA%\magic-coder\credentials.json on Windows. See Sign in.
config.toml
Section titled “config.toml”The main user config. Magic Coder writes to it through /theme, /model, and /reasoning-effort, and also reads it on every startup. Editing by hand works fine.
A complete example:
machine_id = "9c1b8c1f-1e0a-4d4e-b27a-65a5b95e7de6"
[generation]model = "gpt-5.5"reasoning_effort = "high"allow_long_context = falsesleep_mode = "auto"
[ui]theme = "default-dark"Top-level keys
Section titled “Top-level keys”machine_id— a UUID Magic Coder uses to identify this machine in BridgeApp. Generated automatically on first run; don’t edit unless you know why.
[generation] keys
Section titled “[generation] keys”model— default model name. Same names that appear in/model. Omit for “use BridgeApp’s default.”reasoning_effort— one ofnone,minimal,low,medium,high,xhigh. (maxis accepted as an alias forxhigh.)allow_long_context—trueorfalse. Defaultfalse.sleep_mode— one ofno,auto,always. Defaultauto. See Sleep mode.
[ui] keys
Section titled “[ui] keys”theme—default-darkordefault-light.
- Magic Coder preserves unknown keys. If you have something Magic Coder doesn’t recognize, it stays put when the file is rewritten.
- Edits take effect on the next session start. They’re not hot-reloaded.
skills/
Section titled “skills/”User-level skills. Each skill is ~/.magic/skills/<name>/SKILL.md. Loaded on every session, regardless of which workspace you open. See Skills for the format.
rules/
Section titled “rules/”User-level Markdown rules. Each rule is ~/.magic/rules/<category>/<name>.md. Loaded on every session. See Rules for the format and the always_apply flag.
known.toml
Section titled “known.toml”The workspace registry. Each workspace Magic Coder has seen has an entry:
[magic-coder-tui-3f2a9b7c]path = "/Users/you/code/magic-coder-tui"trusted = true
[some-other-repo-91a4d2c8]path = "/Users/you/code/some-other-repo"trusted = falseThe values you care about:
path— the absolute path Magic Coder remembers for this workspace.trusted— whether the workspace is trusted (gates project-local skills and rules — see Workspaces & trust).
To untrust a workspace, set trusted = false. To remove it from the registry entirely, delete the entry.
known/<workspace-key>/history.jsonl
Section titled “known/<workspace-key>/history.jsonl”Per-workspace input history — every line you typed at the input box, in JSON Lines format. Used to populate up-arrow recall and to filter previously-typed messages out of new sessions when relevant.
You can delete the file to wipe history for a workspace. Magic Coder will recreate it the next time you type something.
cache/, locks/
Section titled “cache/, locks/”Implementation details. Don’t edit. If you ever need to fully reset Magic Coder state, rm -rf ~/.magic/cache ~/.magic/locks is safe.
Resetting everything
Section titled “Resetting everything”rm -rf ~/.magicRemoves config, theme, workspace registry, history, skills, rules, and cache. Saved sign-in credentials live outside this directory (OS keychain or a fallback file under ~/.config/magic-coder/ on Linux, %APPDATA%\magic-coder\ on Windows); clear them with /logout from inside the TUI before deleting ~/.magic, or remove the fallback file by hand.
Per-project .magic/ directories inside your repos are not touched by removing ~/.magic.
Version control
Section titled “Version control”~/.magic/ is per-machine. Don’t try to sync it to dotfiles or git — machine_id and known.toml are deliberately machine-local. If you want consistent defaults across machines, sync just the keys you care about ([generation], [ui]) and let the rest regenerate per-machine.