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.
Set by the bootstrap installer
Section titled “Set by the bootstrap installer”Written to ~/.local/share/dotkit/export.env after a successful bootstrap.
| Variable | Description |
|---|---|
DOTKIT_DIR | Absolute path to your cloned dotkit repo (e.g. ~/dotkit). |
DOTKIT_DEFAULT_KIT | Directory 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.
Set during execution
Section titled “Set during execution”Available to every .txt, .md, .sh, and .dotkit file that dotkit runs.
| Variable | Description |
|---|---|
DOTKIT_FUNCS | Path to the dotkit_funcs file. Scripts source this to get dotkit map, dotkit install, and dotkit ask as shell functions. |
DOTKIT_NESTED | Set 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.
Read by the CLI
Section titled “Read by the CLI”| Variable | Description |
|---|---|
DOTKIT_PAT | GitHub personal access token. Used for private repos by dotkit run and by the bootstrap installer when cloning. |
HOME | Bounds the kit-root search and the .env walk, and is the default destination for dotkit link. |
Overriding at runtime
Section titled “Overriding at runtime”Any variable can be set inline for a single run:
DEV_DIR=~/work dotkit run ~/dotkit/workNONINTERACTIVE=1 dotkit run :tools/brewValues 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.
Where state lives
Section titled “Where state lives”| Path | Contents |
|---|---|
~/.local/share/dotkit/export.env | DOTKIT_DIR and DOTKIT_DEFAULT_KIT |
~/.local/share/dotkit/update.env | Version check cache for the update notice |
~/.local/bin/ | The CLI scripts, when not installed via Homebrew |