Reference

Data directory

Complete layout of ~/.purplemux/ — settings, workspaces, CLI profiles, isolated Git worktrees, agent hooks, uploads, and stats v4 cache.

Every persistent piece of state muxbay keeps — settings, layouts, CLI profiles, isolated Git worktrees, session history, and caches — lives under ~/.purplemux/. The directory name is preserved from purplemux so existing setups upgrade cleanly with zero migration.

Layout at a glance

~/.purplemux/
├── config.json              # app config (auth, theme, locale, agent options, custom CSS)
├── workspaces.json          # workspace list + sidebar state
├── workspaces/
│   └── {wsId}/
│       ├── layout.json           # recursive pane/tab tree (worktree, profileId, agentState)
│       ├── message-history.json  # input history per workspace
│       └── claude-prompt.md      # --append-system-prompt-file content
├── cli-profiles.json        # custom CLI profiles (Settings → CLI Profiles)
├── worktrees/               # managed isolated Git worktrees per tab
│   └── {repo}-{hash}/
│       └── {slug}-{id}/
├── hooks.json               # Claude Code hook + statusline config (generated)
├── status-hook.sh           # agent status hook → POST /api/status/hook (generated, 0755)
├── statusline.sh            # Claude statusline → POST /api/status/statusline (generated, 0755)
├── agy-hook.sh              # Gemini (agy) status hook script (generated, 0755)
├── rate-limits.json         # latest statusline JSON
├── session-history.json     # completed agent session log (cross-workspace)
├── quick-prompts.json       # custom quick prompts + disabled built-ins
├── sidebar-items.json       # custom sidebar items + disabled built-ins
├── vapid-keys.json          # Web Push VAPID keypair (generated)
├── push-subscriptions.json  # Web Push endpoint subscriptions
├── cli-token                # CLI auth token (generated)
├── port                     # current server port
├── pmux.lock                # single-instance lock {pid, port, startedAt}
├── logs/                    # pino-roll log files
├── uploads/                 # images & files attached via the chat input bar
└── stats/                   # multi-provider /stats v4 cache & AI daily reports

Files containing secrets (config, tokens, layouts, VAPID keys, lock) are written atomically (tmpFile → rename) with mode 0600.

Key files & directories

Path What it stores Safe to delete?
config.json scrypt-hashed password, HMAC secret, theme, locale, font size, line spacing, keybinding overrides, agent flags/providers, editor URL, network access, custom CSS Yes — re-runs onboarding
workspaces.json Workspace index, sidebar width / collapsed state, active workspace ID Yes — wipes workspaces and tabs
cli-profiles.json Custom CLI profiles (id, name, baseProvider, command, defaultPrompt, defaultWorktree, enabled) Yes — clears custom profiles
worktrees/ Managed isolated Git worktrees created from the Launch Session dialog Only via git worktree remove or Worktree Close Dialog
hooks.json, status-hook.sh, statusline.sh, agy-hook.sh Generated agent hook scripts and Claude settings config Yes — regenerated on next start
rate-limits.json Latest Claude statusline JSON (ts, model, five_hour, seven_day, context, cost) Yes — repopulates as Claude runs
session-history.json Last 200 completed agent sessions across workspaces Yes — clears history
quick-prompts.json, sidebar-items.json { custom: […], disabledBuiltinIds: […], order: […] } overlays Yes — restores defaults
vapid-keys.json / push-subscriptions.json Web Push VAPID keys and browser endpoints Delete both together to reset push
cli-token / port / pmux.lock 32-byte CLI token (x-pmux-token), active port, single-instance lock cli-token/port regenerate; delete pmux.lock only if no process is alive
Lock file gotchas
If muxbay refuses to start with "already running" when no process is alive, remove stale `~/.purplemux/pmux.lock` and retry.

stats/ (CACHE_VERSION = 4)

Pure local cache built from Claude (~/.claude/projects/), Codex (~/.codex/sessions/), and Gemini (agy) transcripts:

  • stats/cache.json — deduplicated v4 daily aggregates in local timezone (usageId deduplication).
  • stats/uptime-cache.json — active-minutes roll-up.
  • stats/daily-reports/{YYYY-MM-DD}.json — AI daily briefs generated in Notes.

Delete stats/ anytime to force a full recompute.

uploads/ & logs/

  • uploads/{wsId}/{tabId}/ — attached images/files (image/png, jpeg, gif, webp, max 10 MB, mode 0600). Files older than 24h auto-clean on startup, or clean anytime via Settings → System → Attached Images → Clean now.
  • logs/ — daily pino-roll logs (7-file retention). Configure LOG_LEVEL / LOG_LEVELS — see Ports & env vars.

Backups & reset

# Back up everything except the live PID lock
tar czf muxbay-backup.tgz --exclude pmux.lock -C ~ .purplemux

What's next