Skip to content

App Directories

Magia follows platform-native directory conventions via Tauri’s path API. The app data and cache directories are determined by the bundle identifier baked into the binary at compile time.


Bundle identifier: sh.magia.app

PurposePath (macOS)
App data directory~/Library/Application Support/sh.magia.app/
App cache directory~/Library/Caches/sh.magia.app/
Logs~/Library/Logs/sh.magia.app/
WebKit cache~/Library/WebKit/sh.magia.app/
Sockets (Unix domain)$TMPDIR/magia-{uid}/

Bundle identifier: sh.magia.dev

PurposePath (macOS)
App data directory~/Library/Application Support/sh.magia.dev/
App cache directory~/Library/Caches/sh.magia.dev/
Logs~/Library/Logs/sh.magia.dev/
WebKit cache~/Library/WebKit/sh.magia.dev/
Sockets (Unix domain)$TMPDIR/magia-{uid}/

Development builds use a separate identifier so that running a worktree alongside the production app does not corrupt production data.


File / DirectoryPurpose
settings.jsonAll user settings (see Settings Reference)
workspaces.jsonWorkspace definitions
project-profiles.jsonLegacy project profiles (superseded by workspaces)
sessions.dbSQLite database (projects, metrics, sessions)
memory/Per-project memory (observations, reflections, cursors, stats)
memory/{project-encoded}/observations/Raw observation JSONL files
memory/{project-encoded}/cursor.jsonObservation read cursor for the project
memory/{project-encoded}/stats.jsonToken/cost stats aggregated from memory

The {project-encoded} segment is a URL-encoded or hash representation of the project’s root path.


FilePurpose
sessions-cache.jsonIncremental session cache (title, first-prompt, cost summary per session). Safe to delete — rebuilt automatically on next launch.

All sockets live in $TMPDIR/magia-{uid}/ (e.g. /var/folders/…/magia-501/ on macOS). Each running Magia instance uses a unique suffix to allow multiple instances to coexist.

SocketProduction nameDev name
Hook listenerhooks-prod.sockhooks-{port}.sock
CLI listenercli-prod.sockcli-{port}.sock
Permission listenerpermissions.sockpermissions.sock
OTel gRPC collectorotel-prod.sockotel-{port}.sock
Active-socket registryactive-hook-socketsactive-hook-sockets

{port} is the value of the MAGIA_DEV_PORT environment variable set by pnpm dev:worktree.


Older versions of Magia stored data in ~/.magia/. On first launch after upgrading, Magia automatically migrates:

  • ~/.magia/settings.json → data directory
  • ~/.magia/workspaces.json → data directory
  • ~/.magia/memory/ or ~/.magia/data/memory/ → data directory

The ~/.magia/ directory is never deleted during migration. You can remove it manually once you have confirmed that the new data directory is populated correctly.


User-installed themes are loaded from ~/.magia/themes/ (not in the OS-native app data directory). Drop a .json theme file there and it will be available in Settings → Appearance after a reload.


PathPurpose
~/.claude/settings.jsonClaude Code settings file — Magia injects hooks and OTel config here
/usr/local/bin/magiaCLI symlink installed by Settings → CLI Integration
~/.nvm/, ~/.volta/, ~/.fnm/Node version manager paths searched when building the enriched $PATH for spawned processes

PurposePath
App data~/.local/share/sh.magia.app/
App cache~/.cache/sh.magia.app/
WebKit cache~/.cache/sh.magia.app/
Sockets$TMPDIR/magia-{uid}/
PurposePath
App data%APPDATA%\sh.magia.app\
App cache%LOCALAPPDATA%\sh.magia.app\
SocketsNamed pipes (not Unix sockets)