Skip to content
Userbit edited this page Oct 25, 2020 · 18 revisions

homeshick is used via subcommands, so simply typing homeshick will yield a helpful message that tersely explains all of the things you can do with it.

Most subcommands accept castlenames as arguments. You can also run a subcommand on all castles by not specifying any arguments.

link

homeshick link [castlename ...]

This command symlinks all files that reside in the home folders of your castles into your home folder. Note that only files tracked by git will be linked, untracked files are ignored. You will be prompted if there are any files or folders that would be overwritten.

If the castle does not contain a home folder it will simply be ignored. To further understand how the linking process works you can consult the linking table.

clone

homeshick clone URI..

The clone command clones a new git repository to .homesick/repos. The clone command accepts a github shorthand url, so if you want to clone oh-my-zsh you can type homeshick clone robbyrussell/oh-my-zsh.

pull

homeshick pull [castlename ...]

The pull command runs a git pull on your castle and any of its submodules. If there are any new dotfiles to be linked, homeshick will prompt you whether you want to link them.

check

homeshick check [castlename ...]

check determines the state of a castle.

  • There may be updates on the remote, meaning it is behind.
  • Your castle can also contain unpushed commits, meaning it is ahead.
  • When everything is in sync, check will report that your castle is up to date.

list

homeshick list

You can see your installed castles by running the list command.

track

homeshick track castlename .file [.folder ...]

If you have a new dotfile or folder that you want to put in one of your castles, you can ask homeshick to do the moving, symlinking and git-adding for you. To track your .bashrc and .zshrc in your dotfiles castle run homeshick track dotfiles .bashrc .zshrc, the files are automatically added to the git index.
Alternatively you may want to track an entire folder like your vim configuration, when given a path to a folder homeshick will traverse the entire structure and track all the files contained within: homeshick track dotfiles .vimrc .vim
Any files that would be git-ignored by the castle will be left untouched.

generate

homeshick generate castlename [castlename2 ...]

generate creates a new castle. All you need to do now is call track to fill it with your dotfiles.

refresh

homeshick refresh

Run this command to check if any of your repositories have not been updated the last week. This goes very well with your rc scripts (check out the tutorial for more about this).

cd

homeshick cd castlename

After you have used the track command, you will want to commit the changes and push them. Instead of cd'ing your way into the repository simply type homeshick cd dotfiles; homeshick will place you right inside the home/ directory of your dotfiles castle. From there you can run whatever git commands you like on your castle.

Tip: cd - places you in your previous directory, so if you did not change directories after running homeshick cd dotfiles you can simply type cd - to get back to where you left off.

Switches

homeshick has commandline switches that can automate some of its actions or modify its output. Their applicability is not enforced despite the fact that some only work on specific commands.

quiet

The --quiet flag (shorthand: -q) suppresses all status output except when input is required.

skip

When running homeshick link, the --skip flag (shorthand: -s) causes the command to automatically not overwrite files in your $HOME that conflict with files in your castles.

force

--force (shorthand: -f) will cause homeshick to overwrite any conflicting files in your $HOME when symlinking with homeshick link and any conflicting files in your castle when running homeshick track.

batch

When integrating homeshick with other scripts you can use --batch (shorthand: -b) to avoid any interactive prompts. homeshick will instead pick the defaults. You can combine this switch with the other switches to e.g. overwrite all conflicting files in $HOME.

Clone this wiki locally