CLI for my dotfiles.
npm install -g @eliasnorrby/dotfiles-cli
The CLI is available under the name boom
💥. It's just a placeholder for
now. Hello there, doom. 👋
List available topics and their states.
Enable a topic (i.e. set its state to present
in .dotfiles/root.config.yml
).
Disable a topic (i.e. set its state to disabled
in .dotfiles/root.config.yml
).
Remove a topic (i.e. set its state to absent
in .dotfiles/root.config.yml
).
Run the configured update script (eg. for zplug
, vim-plug
, brew
),
optionally with verbose output.
Run the configured ansible playbook to deploy the dotfile configuration, optionally with verbose output.
Use the -t
(--topic
) flag to limit which topics to deploy. Pass a single
topic name or a comma separated list:
# Deploy all topics
boom deploy
# Deploy a single topic
boom deploy -t shell/zsh
# Deploy multiple topics
boom deploy -t shell/zsh,shell/git,editor/vscode
# Deploy with escalated priveleges (tell ansible to prompt for sudo password)
boom deploy -b
Deploying a topic completely involves many operations:
- Ensure configuration files are symlinked
- Ensure homebrew dependencies are installed
- Ensure App Store dependencies are installed
- Ensure npm/pip/gem dependencies are installed
- Ensure MacOS defaults are applied
The default behaviour of boom deploy
is to only make sure configuration files
are symlinked. This is the most important part of the underlying playbook, so it
is always run. It is also fast. The other operations are more time consuming.
They can be performed using the -o
(--operations
) flag. Pass a single
operation or a comma separated list:
# Make sure all brew formulae and casks are installed for all topics
boom deploy -o homebrew # (This takes a while)
# Combined with the topic flag
boom deploy -t editor/vscode -o homebrew
# Enable multiple operations
boom deploy -o apps,packages
# Using shorthand notation
boom deploy -t shell/zsh -o h,a,p
The available operations can be listed using
boom deploy --list-operations
.
Available operations
operation: homebrew
shorthand: h
description: install homebrew formulae & casks
operation: pacman
shorthand: m
description: install packages with pacman
operation: apps
shorthand: a
description: install app store apps
operation: packages
shorthand: p
description: install global packages (npm/pip/gem)
operation: defaults
shorthand: d
description: apply MacOS defaults