DotweaveDotweave
DocsGitHub
DotweaveDotweave
    • Introduction
    • Install Dotweave
    • Set up your first sync
    • Set up a second device
    • How syncing works
    • Directory and repository layout
    • Sync modes
    • Profiles
    • Platform-specific paths
    • Secrets and encryption
    • Track files and directories
    • Push, review, and commit day to day
    • Keep several devices in sync
    • Enable shell autocomplete
    • Install the agent skill
    • Upgrade config and repository formats
    • Troubleshoot a broken sync
    • dotweave init
    • dotweave track
    • dotweave push
    • dotweave pull
    • dotweave status
    • dotweave untrack
    • dotweave cd
    • dotweave profile
    • dotweave doctor
    • dotweave autocomplete
    • dotweave skill
    • manifest.jsonc
    • settings.jsonc
    • Environment variables and paths
    • Error messages
DocsGitHub
  1. Dotweave/
  2. Environment variables and paths

Environment variables and paths

How DOTWEAVE_HOME, XDG_CONFIG_HOME, and the Windows AppData fallbacks decide where Dotweave stores its data.

Resolution order

Dotweave keeps everything it owns under one directory, the dotweave home directory. settings.jsonc, the age identity file keys.txt, and the repository sync directory all live inside it.

Resolution stops at the first rule that produces a value:

  1. DOTWEAVE_HOME, if set, is used directly on every platform.
  2. On Windows, %APPDATA%\dotweave, then %LOCALAPPDATA%\dotweave, then %USERPROFILE%\AppData\Roaming\dotweave, then <os home>\AppData\Roaming\dotweave.
  3. On macOS, Linux, and WSL, $XDG_CONFIG_HOME/dotweave, falling back to $HOME/.config/dotweave.

An environment variable set to an empty or whitespace-only string counts as unset.

Variables

VariableRead onPurpose
DOTWEAVE_HOMEall platformsOverrides the dotweave home directory outright.
HOMEall platformsRoot for resolving ~ in localPath, and the boundary every tracked entry must stay inside.
XDG_CONFIG_HOMEmacOS, Linux, WSLReplaces ~/.config as the parent of the dotweave home directory. Also expands in a localPath written as $XDG_CONFIG_HOME/....
APPDATAWindowsFirst choice for the dotweave home directory parent.
LOCALAPPDATAWindowsUsed when APPDATA is unset.
USERPROFILEWindowsUsed when both AppData variables are unset, and as the Windows home directory.
SHELLmacOS, Linux, WSLThe shell dotweave cd launches. Falls back to /bin/sh.
COMSPECWindowsThe shell dotweave cd launches. Falls back to cmd.exe.
WSL_DISTRO_NAMEWSLPresence selects the wsl platform key.
WSL_INTEROPWSLSecondary signal for the wsl platform key.

Dotweave detects the wsl platform key when either WSL variable is set, or when the reported OS release contains microsoft. Read Platform-specific paths for what that key changes.

Windows fallbacks

Windows environment variable names are matched case-insensitively, so %AppData% and %APPDATA% resolve the same value. On other platforms the lookup is case-sensitive.

The USERPROFILE-based fallbacks append AppData\Roaming themselves. They exist so a stripped-down environment, such as a service account or a container, still produces a usable path rather than failing.

A localPath may also contain %VARIABLE% references, which Dotweave expands using the same environment. An undefined variable inside a localPath fails the command rather than expanding to an empty string.

Changing DOTWEAVE_HOME points Dotweave at a different sync directory and identity file. It does not move the existing ones. Move the directory yourself, or run dotweave init again in the new location.

Related pages

Read manifest.jsonc for the fields that use these paths, or Directory and repository layout to see what Dotweave writes inside the resolved directory.

← PreviousConfigurationsettings.jsoncThe machine-local settings file that records which sync profile is active.→ NextConfigurationError messagesEvery Dotweave error grouped by area, with the condition that raises it and the fix.

On this page

  1. Resolution order
  2. Variables
  3. Windows fallbacks
  4. Related pages