@eliasnorrby/dotfiles-cli
v3.2.22
Published
CLI for eliasnorrby/dotfiles
Downloads
80
Readme
dotfiles-cli
CLI for my dotfiles.
Installation
npm install -g @eliasnorrby/dotfiles-cli
The CLI is available under the name boom
:boom:. It's just a placeholder for
now. Hello there, doom. :wave:
Commands
list
List available topics and their states.
enable <topic>
Enable a topic (i.e. set its state to present
in .dotfiles/root.config.yml
).
disable <topic>
Disable a topic (i.e. set its state to disabled
in .dotfiles/root.config.yml
).
remove <topic>
Remove a topic (i.e. set its state to absent
in .dotfiles/root.config.yml
).
update [-v]
Run the configured update script (eg. for zplug
, vim-plug
, brew
),
optionally with verbose output.
deploy [-vb] [-t <topic(s)>] [-o <operation(s)>]
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
Operations
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
.
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