homeshick

git-based dotfile synchronizer written in Bash

TLDR

Create a new castle (dotfiles repository)
$ homeshick generate [castle_name]
Track a file in your castle
$ homeshick track [castle_name] [path/to/file]
Go to a castle directory
$ homeshick cd [castle_name]
Clone a castle from GitHub
$ homeshick clone [github_username]/[repository_name]
Symlink all files from a castle
$ homeshick link [castle_name]
List installed castles
$ homeshick list
Update all castles from their remotes
$ homeshick pull

SYNOPSIS

homeshick [options] command [arguments]

DESCRIPTION

homeshick is a Git-based dotfile synchronizer written in Bash. It uses "castles" (Git repositories) to manage dotfiles, creating symlinks from the repository to your home directory.Each castle is a Git repository stored in ~/.homesick/repos/. Files tracked in a castle (with track) are moved into the repository and replaced with symlinks pointing back to the repository copy. This allows version control and easy synchronization across machines. Multiple castles can be installed side by side, letting you combine shared dotfile collections (e.g. an oh-my-zsh castle) with your own.

PARAMETERS

generate CASTLE [CASTLE...]

Create a new castle (dotfiles repository)
track CASTLE FILE [FILE...]
Move a file/folder into a castle and replace it with a symlink
cd CASTLE
Change directory to a castle's repository, for running git commands directly
clone URL...
Clone a castle from a Git repository (supports GitHub "user/repo" shorthand)
link, symlink [CASTLE...]
Symlink all files in the given castles' (or all castles') home folders into $HOME
pull [CASTLE...]
Run git pull for the given castles (or all castles) and their submodules
check, updates [CASTLE...]
Check whether castles are behind, ahead, or up to date with their remote
refresh
Check remotes for updates, skipping castles checked within the last week
list, ls
List all installed castles
-q, --quiet
Suppress status output except when input is required
-s, --skip
Skip conflicting files in $HOME instead of overwriting them
-f, --force
Overwrite conflicting files in $HOME automatically
-b, --batch
Run non-interactively, accepting default answers
-v, --verbose
Print additional diagnostic output

INSTALL

sudo zypper install homeshick
brew install homeshick

CAVEATS

Requires Bash 3+ and Git 1.5+. Symlinks may not work correctly on some filesystems or in containers. Conflicts can arise when multiple castles contain the same file; use -f/--force or -s/--skip to resolve them non-interactively.

HISTORY

homeshick was created by Anders Ingemann, with the repository dating to 2012, as a pure Bash alternative to homesick (a Ruby gem). The name combines "home" (dotfiles) with "shell" (Bash implementation).

SEE ALSO

chezmoi(1), stow(8), git(1)

RESOURCES

Source code · Documentation