Skip to content

Environment Variables

Your own variables come from .env files inside a kit. See Kit Environment. This page covers the variables dotkit itself sets or reads.

Written to ~/.local/share/dotkit/export.env after a successful bootstrap.

VariableDescription
DOTKIT_DIRAbsolute path to your cloned dotkit repo (e.g. ~/dotkit).
DOTKIT_DEFAULT_KITDirectory of the kit you chose at install time.

DOTKIT_DEFAULT_KIT is recorded but not currently read by any command. dotkit run always takes an explicit path, and dotkit add uses the kit above your working directory.

Available to every .txt, .md, .sh, and .dotkit file that dotkit runs.

VariableDescription
DOTKIT_FUNCSPath to the dotkit_funcs file. Scripts source this to get dotkit map, dotkit install, and dotkit ask as shell functions.
DOTKIT_NESTEDSet when one dotkit run invoked another. Only the outermost run prints the shell and PATH message at the end.

Both are set automatically. You should not need to set either yourself.

VariableDescription
DOTKIT_PATGitHub personal access token. Used for private repos by dotkit run and by the bootstrap installer when cloning.
HOMEBounds the kit-root search and the .env walk, and is the default destination for dotkit link.

Any variable can be set inline for a single run:

Terminal window
DEV_DIR=~/work dotkit run ~/dotkit/work
NONINTERACTIVE=1 dotkit run :tools/brew

Values already in your shell are the outermost layer of the kit environment. A plain assignment in an .env file overrides them; write ${DEV_DIR:=~/dev} when you want the environment to win instead.

PathContents
~/.local/share/dotkit/export.envDOTKIT_DIR and DOTKIT_DEFAULT_KIT
~/.local/share/dotkit/update.envVersion check cache for the update notice
~/.local/bin/The CLI scripts, when not installed via Homebrew