Skip to content
Powered by BridgeApp

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.

~/.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.

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 = false
sleep_mode = "auto"
[ui]
theme = "default-dark"
  • 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.
  • model — default model name. Same names that appear in /model. Omit for “use BridgeApp’s default.”
  • reasoning_effort — one of none, minimal, low, medium, high, xhigh. (max is accepted as an alias for xhigh.)
  • allow_long_contexttrue or false. Default false.
  • sleep_mode — one of no, auto, always. Default auto. See Sleep mode.
  • themedefault-dark or default-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.

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.

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.

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 = false

The 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.

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.

Implementation details. Don’t edit. If you ever need to fully reset Magic Coder state, rm -rf ~/.magic/cache ~/.magic/locks is safe.

Terminal window
rm -rf ~/.magic

Removes 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.

~/.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.