File locations
Every path Magic Coder touches, in one place.
User-level paths
Section titled “User-level paths”All under ~/.magic/:
| Path | What it is | Edit by hand? |
|---|---|---|
~/.magic/config.toml | User config (machine ID, generation defaults, UI prefs) | Yes |
~/.magic/known.toml | Workspace registry (paths and trust state) | Yes |
~/.magic/known/<key>/history.jsonl | Per-workspace input history | Delete to wipe; don’t edit by hand |
~/.config/magic-coder/credentials.json | Linux fallback OAuth credentials file | Usually no |
~/.magic/skills/<name>/SKILL.md | User-level skill (loaded on every session) | Yes |
~/.magic/rules/<category>/<name>.md | User-level Markdown rule (loaded on every session) | Yes |
~/.magic/cache/ | Internal cache (incl. background shells) | No |
~/.magic/locks/ | Lock files | No |
<key> is a stable hash of the workspace’s absolute path.
Per-project paths
Section titled “Per-project paths”All under <workspace>/.magic/:
| Path | What it is | Edit by hand? |
|---|---|---|
<workspace>/.magic/skills/<name>/SKILL.md | Project-local skill (loaded only when trusted) | Yes; commit |
<workspace>/.magic/rules/<category>/<name>.md | Project-local Markdown rule (loaded only when trusted) | Yes; commit |
In addition, Magic Coder reads project-context files from your repo:
| Path | What it is | Edit by hand? |
|---|---|---|
<workspace>/AGENTS.md | Project context loaded at session start | Yes; commit it |
<workspace>/<subdir>/AGENTS.md | Per-package project context, loaded on demand when work touches the subtree | Yes; commit it |
OS-managed paths
Section titled “OS-managed paths”| Where | What | How to manage |
|---|---|---|
MAGIC_CODER_OAUTH_TOKEN | In-memory opaque access-token override that wins over every other credential source | Unset it, or replace it with a fresh token |
| macOS Keychain | OAuth credentials (service magic-coder-credentials, account = your macOS username) | /logout from inside the TUI; or Keychain Access |
| Linux Secret Service / GNOME Keyring | OAuth credentials in the native keyring | /logout; or seahorse / secret-tool |
~/.config/magic-coder/credentials.json | Linux fallback OAuth credentials file | /logout; or remove the file |
%APPDATA%\magic-coder\credentials.json | Windows fallback OAuth credentials file | /logout; or remove the file |
| OS temp dir | Short-lived files for browser-flow callbacks during sign-in | Cleaned up automatically |
You generally never need to edit OS-managed paths directly.
Public release artifacts
Section titled “Public release artifacts”Not on your machine, but useful to know:
MathAndMagic/magic-coder-tui-releases— versioned binary archives.MathAndMagic/homebrew-magic-coder— dedicated Homebrew tap;brew tap MathAndMagic/magic-coder && brew install magic-coder.
Doing a clean reset
Section titled “Doing a clean reset”# 1. Sign out (from inside the TUI; clears the saved credential)/logout
# 2. Remove all user staterm -rf ~/.magic
# 3. (Optional) Remove per-project state from each repofind ~/code -type d -name '.magic' -prune -exec rm -rf {} +After step 2, your next coder run will sign in fresh and treat every workspace as new. Step 3 is destructive — it removes every .magic/ directory it finds, including project-local skills and rules you may have committed. Most users don’t want this.