Profiles
A profile is a directory inside profiles/ that describes everything needed to configure a machine. Running dotkit apply on a profile executes its folders in order.
Structure
Section titled “Structure”Directorydotkit/
- dotkit.env
Directoryprofiles/
Directorypersonal/
- profile.env
- order.txt
Directoryconfigs/
- …
Directorytools/
- …
Directorypackages/
- …
Directorydotfiles/
- link.env
Directorymanual/
- todo.env
Directorywork/
- …
The profiles/ directory can hold any number of profiles. The bootstrap installer lists them and prompts for selection, or pass --profile NAME to skip the prompt.
Execution order
Section titled “Execution order”dotkit apply profiles/personal processes folders in this order:
configs/- system preferences, no dependencies requiredtools/- package managers and toolchains (brew, cargo, fnm, uv)packages/- apps and packages installed via those tools- Other run folders, alphabetically
- Link folders - folders with a
link.envfile (symlink farms) - Todo folders - folders with a
todo.envfile (manual checklists)
configs, tools, and packages are reserved names that always run first in that order. All other run folders follow, alphabetically.
Folder types
Section titled “Folder types”Every folder under a profile is one of three types, determined by which .env marker file it contains:
| Marker | Type | What happens |
|---|---|---|
| (none) | run | .txt, .md, and .sh files are executed |
link.env | link | dotkit link is called and files are symlinked to DEST |
todo.env | todo | dotkit todo is called and a TODO.md checklist is generated |
A folder cannot have more than one type marker. For example, dotkit will error if both link.env and todo.env are present in a directory.
Run folders
Section titled “Run folders”The default. Any .txt, .md, or .sh file found at the top level of the folder is executed. Subfolders are not descended into, so users can place supporting files or data in them.
Link folders
Section titled “Link folders”Require a link.env with a DEST variable pointing to the symlink target:
DEST=~Running dotkit apply (or dotkit link dotfiles) symlinks every file in the folder to ~/. Existing files are backed up with a timestamp before being replaced.
Todo folders
Section titled “Todo folders”Requires a todo.env. The todo.env file requires zero configuration (it can be blank). Dotkit generates a TODO.md checklist of manual steps from .txt and .md files in the folder. These are optional configurations:
DEST=.. # output location (relative to todo.env)TITLE=Setup # H1 heading (default: folder name)NAME=MANUAL.md # output filename (default: TODO.md)Config files
Section titled “Config files”dotkit.env
Section titled “dotkit.env”Sits at the repo root. Sourced before any profile runs. Use it for variables shared across all profiles:
# dotkit.envDOTKIT_DEV_DIR="~/dev"profile.env
Section titled “profile.env”Sits at the profile root. Sourced after dotkit.env and can override any variable:
DOTKIT_DEV_DIR="~/work"GITHUB_ORG=acmeBoth files are sourced with set -a, so all variables are automatically exported to scripts.
order.txt
Section titled “order.txt”Customize execution order by listing folder names, one per line:
configstoolstaskspackagesAny folder named in order.txt runs in that position. Any configs, tools, and packages folders will still get their default priority if omitted.
Prefix a name with ! to exclude a folder entirely:
!manualLines beginning with # are comments.
run.env
Section titled “run.env”A run folder can have a run.env to set variables available to all files in that folder:
GITHUB_USER=yournameDEV_DIR=$HOME/devMultiple profiles
Section titled “Multiple profiles”A suggested pattern is one profile per context:
Directoryprofiles/
Directorypersonal/
- …
Directorywork/
- …
Directoryserver/
- …
Dotkit works in many ways. There could also be a common/ profile that runs first before applying any other profile.