Skip to content

Data directories and environment variables ​

Effective paths ​

The base configuration directory defaults to ~/.mogick; MOGICK_CONFIG_DIR overrides it. The base data directory defaults to the configuration base; MOGICK_DATA_DIR overrides it.

In 26.9.11, active runtime profiles can add profiles/<profile-id>/ under both bases. In this documentation, <config-dir> and <data-dir> mean the effective directories after profile selection, not necessarily ~/.mogick. Do not copy files to the base directory without checking the active profile.

PathPurpose
<config-dir>/config.jsonGlobal non-secret settings
<config-dir>/auth.jsonGlobal credentials; never publish
<config-dir>/mcp.jsonGlobal MCP configuration
<config-dir>/skills/Global Mogick Skills
<data-dir>/sessions.sqliteDefault stable-channel session database
<data-dir>/sessions.<channel>.sqliteDefault non-stable-channel session database
<data-dir>/mogick-state.sqliteRuntime state database
<db-path>.payloads/Payload files associated with the actual session database
<database directory>/last-session.txtLast-session pointer
.mogick/config.json, .mogick/auth.json, .mogick/mcp.jsonProject settings relative to the launch working directory
.mogick/skills/Project Skills

An explicit memory.db_path overrides the default database path; it is not automatically renamed per channel. Switching profile or channel can therefore change which sessions are visible. Missing history after a switch does not by itself mean deletion.

Environment variables ​

VariableScope
MOGICK_CONFIG_DIRBase for global configuration and Skills
MOGICK_DATA_DIRBase for default data, falling back to the configuration base
MOGICK_CONFIG_FILEMain configuration file only; does not relocate auth, MCP, Skills or data
MOGICK_RUNTIME_ENVRuntime preset selection
MOGICK_TUI_THEMEauto, dark, or light
MW_LOG_LEVELLog level
MOGICK_UPGRADE_URLUpdate-service override

Project .mogick/ remains relative to the current working directory. Environment variables are not a generic override mechanism for every JSON field.

Configuration precedence ​

Built-in defaults and runtime presets are overlaid by global and project settings. Most scalar fields override individually; a non-empty project llm.providers[] replaces the provider array. Agent tool settings resolve by agent and tool. Project auth and MCP definitions have their own merge rules. See Configuration reference.

Backup scope ​

Stop all Mogick processes using the database before making a consistent backup. Preserve the actual session database and its matching .payloads/ directory, the effective data/state directory, and required global/project configuration. Include the workspace files separately if you need to restore the project.

Do not assume that copying only sessions.sqlite, or exporting a transcript, creates a complete backup. Treat credentials and conversation payloads as sensitive. Record the version, profile, channel and original paths; verify a restore in an isolated location before relying on it. This page does not promise cross-version migration compatibility.