Profiles, and how they
inherit.

A profile is a named set of dotfiles and packages. You can have several — for work, personal use, a server, or any context you care about — and switch between them in one keystroke.

The short version

Resolution order

When you activate a profile, dotstate walks the inheritance chain and resolves files in this order — highest priority first:

01 · active
work-laptop.ssh/config
↑ overrides
02 · parent
work.zshrc · .ssh/config
↑ overrides
03 · grandparent
base.vimrc · .zshrc · .tmux.conf
↑ fallback
04 · common
common.gitconfig

In the example above, work-laptop ends up with: its own .ssh/config, work's .zshrc, base's .vimrc and .tmux.conf, and common's .gitconfig.

Inherit vs. copy

When you create a profile, you can either inherit or copy from an existing one:

A good rule: use inherit for long-lived relationships (a "base" profile that every machine extends), and copy for quick one-off duplicates when setting up a similar machine.

Switching profiles

Open Manage Profiles in the TUI, select a profile, and press Enter. dotstate removes the old symlinks and creates new ones — including any inherited files. Common files stay linked across every switch.

From the command line, use dotstate profile switch <name> for the same effect — handy in scripts or when you want to bind it to a shell alias. dotstate profile prints the active profile and dotstate profile list shows all of them.

From a fresh shell on a new machine, dotstate activate re-creates the symlinks for the profile recorded in your config — no flags needed.

If activation fails for any reason, the previous profile is restored automatically.

When to use common files

Put a file in common when it should be identical on every machine, regardless of the active profile — like .gitconfig, .tmux.conf, or editor config files you never vary.

Move files in and out of common from Manage Files by selecting a file and pressing M. See common files for details.

Use cases

Next

Profiles also track packages — CLI tools to install per context. Read package management to learn how.