Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Profiles

A profile describes an environment — work, home, a particular server — as a set of packages, variables, and prompts. The same repository can deploy differently depending on which profile is active.

Every repository has a default profile, created automatically by dotr init.

[profiles.work]
dependencies = ["nvim", "git"]

[profiles.work.variables]
GIT_EMAIL = "[email protected]"

[profiles.home]
dependencies = ["nvim", "gaming"]

[profiles.home.variables]
GIT_EMAIL = "[email protected]"

Selecting a profile

Most commands accept -P/--profile:

dotr deploy --profile work
dotr import ~/.ssh/config --profile work
dotr update --profile work
dotr diff --profile work

If no --profile is given, DotR resolves the active profile in this order:

  1. A DOTR_PROFILE variable, if set — .uservariables.toml wins over the environment if both are set (the reverse of DOTR_BITWARDEN_NOTE’s precedence).
  2. Otherwise, default.

Referencing a profile that doesn’t exist is an error (except default, which is created on the fly if missing).

Whichever value wins is also folded into variables as a low-priority fallback, so DOTR_PROFILE shows up in dotr print-vars and can be referenced in templates as {{ DOTR_PROFILE }} — a profile, package, or user variable of the same name still overrides it.

Fields

FieldTypePurpose
dependencieslist of stringsPackages deployed when this profile is active and no --packages is given
variablestableProfile-scoped variables — override package/config/env variables, see Variables
promptstableProfile-scoped prompts — see Prompts
prompt_backendstringOverrides the top-level prompt_backend when this profile is active — see Prompts
bitwarden_notestringOverrides the top-level bitwarden_note when this profile is active — see Prompts
platformstringShares a package’s targets destination with every other profile that sets the same value

How a profile decides which packages deploy

When you run dotr deploy (or update/diff) without --packages, DotR deploys every package listed in the active profile’s dependencies that doesn’t have skip = true (see Packages).

When you pass --packages explicitly, the profile’s dependencies list is irrelevant to selection — only the named packages (and their own dependencies) are used — but the profile still supplies variables, prompts, and any targets override.

Managing profiles

dotr profiles list
dotr profiles list --verbose
dotr profiles add laptop
dotr profiles add laptop --set-as-current
dotr profiles remove work
dotr profiles remove work --remove-orphans

--set-as-current writes DOTR_PROFILE = "laptop" into .uservariables.toml, so laptop becomes the implicit profile on this machine without needing --profile laptop on every command.

profiles remove deletes the profile from config.toml. --remove-orphans additionally removes any packages that were only referenced by that profile’s dependencies and no others.

Removing the default profile is not allowed.