Skip to content

Store & Backups

  • Linux/macOS: $XDG_CONFIG_HOME/qwik/aliases.toml (usually ~/.config/qwik/aliases.toml)
  • Windows: %APPDATA%\qwik\aliases.toml
  • Override both with the QWIK_CONFIG_DIR environment variable — see Environment Variables

The store is human-readable TOML, safe to edit by hand:

version = 2
[aliases.gs]
command = "git status"
tag = ["git"]
group = "git"
description = "Quick git status"
enabled = true
created_at = "2026-05-10T10:00:00Z"
updated_at = "2026-05-10T10:00:00Z"
last_used = "2026-05-10T11:30:00Z"
run_count = 42
[aliases.open]
command = "xdg-open {1}"
command_macos = "open {1}"
command_windows = "start {1}"

The command_<platform> / command_<platform>_<shell> keys are optional platform-conditional variants — see Platform-Conditional Aliases.

  • Backups: every destructive operation writes to qwik/backups/aliases-<timestamp>.toml (last 20 kept); restore with qwik undo
  • Atomic writes: temp file + rename to prevent corruption; a crashed write leaves aliases.toml.tmp-* debris that qwik doctor --fix removes
  • Concurrent access: a file lock guards the store so two simultaneous qwik invocations can’t interleave writes

qwik writes a version = N field to the top of aliases.toml describing the schema of the file. On load:

  • If the file’s version is older than the current schema, qwik auto-migrates it forward (one migrator per version step) and backs up the pre-migration file before writing the new shape.

  • Migration is forward-only — downgrade is not supported; restore from a backup (see qwik undo or qwik doctor --fix) instead.

  • If the file’s version is newer than the version qwik understands, qwik refuses to load it and points at qwik doctor — typically you need to upgrade qwik to a newer release.

  • v1 — the original schema: one command per alias.

  • v2 — adds optional platform-conditional variants as flat keys next to command. Fresh stores are written as v2; existing stores migrate on the next write. An alias without variants behaves exactly as under v1.

Hand-editing is supported for quick tweaks, but prefer qwik edit <name> — it validates on save and goes through the same locking as the CLI. If you do edit by hand, keep the version field intact.