mise bootstrap
- Usage:
mise bootstrap [FLAGS] [SUBCOMMAND] - Aliases:
bs - Effect: destructive — may delete or irreversibly overwrite
- Source code:
src/cli/bootstrap.rs
Set up this machine from your mise config
Applies each part your config declares, in this order. Each step names its parts as --only and --skip accept them, followed by any condition.
accounts, thenplugins(package manager plugins)fileswithphase = "pre-packages", then built-inpackages- The remaining
files, thenservices,firewall, andcompose repos, thendotfilesmise-shell-activate,macos-defaults, andmacos-launchd-agentslinux-systemd-units, thenuser(the login shell)tools- Plugin
packages, then userserviceswithrequires_tools = true task(thebootstraptask, if defined), thenfinal-hook
Hooks run before and after packages, repos, dotfiles, macOS defaults, the login shell, and tools. The post-packages hook runs right after built-in packages, or after plugin packages when any are configured. See https://mise.jdx.dev/bootstrap.html#how-it-runs.
Parts that already match the config are left alone, but hooks and the bootstrap task run every time, so make them safe to repeat. Checking dotfile state can render templates, which may run exec().
Preview with --dry-run. To inspect without applying, use mise bootstrap status for current state or mise bootstrap plan for resource-level changes.
Flags
--from <GIT_URL>— Clone a bootstrap project (a Git repository with a mise.toml) and apply itThe checkout is reused on later runs; add
--updateto fast-forward it first. Append?ref=<branch|tag|commit>to check out a ref instead of the default branch, for examplehttps://github.com/example/workstation.git?ref=v1. See https://mise.jdx.dev/bootstrap/from-repository.html.--adopt <GIT_URL|OWNER/REPO>— Clone a repository of global mise config or dotfile history, then apply itA repository of global config (
config.toml,conf.d/,tasks/) is cloned into the global config directory, normally ~/.config/mise. A setup repository shared withmise dotfiles origin setrestores its tracked files instead.OWNER/REPOis short forhttps://github.com/OWNER/REPO.git.--replace-history— Discard this machine's dotfile history and adopt the repository'sUse it with
--adoptwhen the two histories are unrelated. Files that differ from the repository still stop the adoption until you resolve them, or add--take-remote-allto take the repository's version of each.--take-remote-all— Take the setup repository's version of every existing file that differs while adoptingThe replaced versions are saved first, so
mise dot undorestores them.--from-dir <DIR>— Directory for the--fromcheckout (default:$MISE_DATA_DIR/bootstrap-repo)-n --dry-run— Show what would change without changing anythingHooks and the
bootstraptask are printed instead of run.-y --yes— Skip confirmation prompts--skip-dirty— Skip configured repositories with local changes instead of failing--force-dotfiles— Overwrite existing files that conflict with whole-file dotfile entries--only <PART>— Run only these partsRepeat the flag or separate parts with commas. Cannot be combined with
--skip.Choices:
plugins,packages,accounts,files,services,firewall,compose,repos,dotfiles,mise-shell-activate,macos-defaults,macos-launchd-agents,linux-systemd-units,user,tools,task,final-hook--prompt-secrets— Prompt securely for missing bootstrap secret inputs--prompt-vars— Ask for[vars]entries that declare apromptand have no saved answermise saves each answer under
$MISE_STATE_DIR, not in any config file, and never asks for it again. Without a terminal, a var keeps its default. A--dry-runstill saves the answers it asks for.--skip <PART>— Skip these partsRepeat the flag or separate parts with commas. Cannot be combined with
--only.Choices:
plugins,packages,accounts,files,services,firewall,compose,repos,dotfiles,mise-shell-activate,macos-defaults,macos-launchd-agents,linux-systemd-units,user,tools,task,final-hook--update— Refresh package metadata and update repositories before applyingAlso fast-forwards a checkout that
--fromor--adoptreuses. Without--update, a reused checkout stays at its current commit.-h --help— Print help
Examples
Preview every configured part
mise bootstrap --dry-runApply every configured part
mise bootstrapApply only dotfiles and tools
mise bootstrap --only dotfiles,toolsApply everything except tools and the bootstrap task
mise bootstrap --skip tools,taskReplace files that conflict with whole-file dotfile entries
mise bootstrap --force-dotfilesClone a bootstrap project and apply it
mise bootstrap --from git@github.com:example/workstation.gitDo the same and also load the project's mise.work.toml
mise -E work bootstrap --from git@github.com:example/workstation.gitClone global config into ~/.config/mise, then apply it
mise bootstrap --adopt example/mise-configUse a setup repository's dotfile history instead of this machine's
mise bootstrap --adopt example/setup --replace-history --yesRefresh package metadata and fast-forward repositories first
mise bootstrap --updateSubcommands
mise bootstrap accounts <SUBCOMMAND>mise bootstrap compose <SUBCOMMAND>mise bootstrap files <SUBCOMMAND>mise bootstrap firewall <SUBCOMMAND>mise bootstrap linux <SUBCOMMAND>mise bootstrap macos <SUBCOMMAND>mise bootstrap mise-shell-activate <SUBCOMMAND>mise bootstrap packages <SUBCOMMAND>mise bootstrap plan [FLAGS]mise bootstrap plugins <SUBCOMMAND>mise bootstrap remote [FLAGS] [TARGET]…mise bootstrap repos <SUBCOMMAND>mise bootstrap secrets <SUBCOMMAND>mise bootstrap services <SUBCOMMAND>mise bootstrap status [FLAGS]mise bootstrap unapply [FLAGS] <ENV>…mise bootstrap user <SUBCOMMAND>