• Stars
    star
    2,389
  • Rank 19,249 (Top 0.4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 14 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Your home directory is your castle. Don't leave your dotfiles behind.

homesick

Gem Version Build Status Dependency Status Coverage Status Code Climate Gitter chat

Your home directory is your castle. Don't leave your dotfiles behind.

Homesick is sorta like rip, but for dotfiles. It uses git to clone a repository containing dotfiles, and saves them in ~/.homesick. It then allows you to symlink all the dotfiles into place with a single command.

We call a repository that is compatible with homesick to be a 'castle'. To act as a castle, a repository must be organized like so:

  • Contains a 'home' directory
  • 'home' contains any number of files and directories that begin with '.'

To get started, install homesick first:

gem install homesick

Next, you use the homesick command to clone a castle:

homesick clone git://github.com/technicalpickles/pickled-vim.git

Alternatively, if it's on github, there's a slightly shorter way:

homesick clone technicalpickles/pickled-vim

With the castle cloned, you can now link its contents into your home dir:

homesick link pickled-vim

You can remove symlinks anytime when you don't need them anymore

homesick unlink pickled-vim

If you need to add further configuration steps you can add these in a file called '.homesickrc' in the root of a castle. Once you've cloned a castle with a .homesickrc run the configuration with:

homesick rc CASTLE

The contents of the .homesickrc file must be valid Ruby code as the file will be executed with Ruby's eval construct. The .homesickrc is also passed the current homesick object during its execution and this is available within the .homesickrc file as the 'self' variable. As the rc operation can be destructive the command normally asks for confirmation before proceeding. You can bypass this by passing the '--force' option, for example homesick rc --force CASTLE.

If you're not sure what castles you have around, you can easily list them:

homesick list

To pull your castle (or all castles):

homesick pull --all|CASTLE

To commit your castle's changes:

homesick commit CASTLE

To push your castle:

homesick push CASTLE

To open a terminal in the root of a castle:

homesick cd CASTLE

To open your default editor in the root of a castle (the $EDITOR environment variable must be set):

homesick open CASTLE

To execute a shell command inside the root directory of a given castle:

homesick exec CASTLE COMMAND

To execute a shell command inside the root directory of every cloned castle:

homesick exec_all COMMAND

Not sure what else homesick has up its sleeve? There's always the built in help:

homesick help

If you ever want to see what version of homesick you have type:

homesick version|-v|--version

.homesick_subdir

homesick link basically makes symlink to only first depth in castle/home. If you want to link nested files/directories, please use .homesick_subdir.

For example, when you have castle like this:

castle/home
`-- .config
    `-- fooapp
        |-- config1
        |-- config2
        `-- config3

and have home like this:

$ tree -a
~
|-- .config
|   `-- barapp
|         |-- config1
|         |-- config2
|         `-- config3
`-- .emacs.d
    |-- elisp
    `-- inits

You may want to symlink only to castle/home/.config/fooapp instead of castle/home/.config because you already have ~/.config/barapp. In this case, you can use .homesick_subdir. Please write "directories you want to look up sub directories (instead of just first depth)" in this file.

castle/.homesick_subdir

.config

and run homesick link CASTLE. The result is:

~
|-- .config
|   |-- barapp
|   |     |-- config1
|   |     |-- config2
|   |     `-- config3
|   `-- fooapp        -> castle/home/.config/fooapp
`-- .emacs.d
    |-- elisp
    `-- inits

Or homesick track NESTED_FILE CASTLE adds a line automatically. For example:

homesick track .emacs.d/elisp castle

castle/.homesick_subdir

.config
.emacs.d

home directory

~
|-- .config
|   |-- barapp
|   |     |-- config1
|   |     |-- config2
|   |     `-- config3
|   `-- fooapp        -> castle/home/.config/fooapp
`-- .emacs.d
    |-- elisp         -> castle/home/.emacs.d/elisp
    `-- inits

and castle

castle/home
|-- .config
|   `-- fooapp
|       |-- config1
|       |-- config2
|      `-- config3
`-- .emacs.d
    `-- elisp

Supported Ruby Versions

Homesick is tested on the following Ruby versions:

  • 2.2.6
  • 2.3.3
  • 2.4.0

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Need homesick without the ruby dependency?

Check out homeshick.

Copyright

Copyright (c) 2010 Joshua Nichols. See LICENSE for details.

More Repositories

1

jeweler

Opinionated tool for creating and managing Rubygem projects
Ruby
1,479
star
2

capistrano-spec

Helpers and matchers for testing capistrano
Ruby
85
star
3

rspec-spies

test spies, for rspec
Ruby
79
star
4

shoulda_generator

Rails generators which produce tests using shoulda instead of straight up Test::Unit. Other goodies as well.
Ruby
59
star
5

sinatra-mongo

A light extension to sinatra for using mongo
Ruby
39
star
6

pickled-vim

My personal VIM configurations
Vim Script
38
star
7

sleepyq

SleepIQ API for Python
Python
34
star
8

factory_girl_on_rails

Some minor conveniences for using factory_girl on a Rails project
Ruby
34
star
9

pager_duty-connection

Ruby API wrapper for the PagerDuty REST API
Ruby
30
star
10

wheres-your-database-yml-dude

UNMAINTAINED A small Rails plugin to answer the question of "Where's your database.yml, dude?"
Ruby
26
star
11

gemstalker

A library for determining if GitHub has built a gem yet
Ruby
19
star
12

has_ip_address

An extension to ActiveRecord to store IP Addresses in the database as integers
Ruby
19
star
13

capistrano-campfire

A tiny shim for using campfire from capistrano
Ruby
19
star
14

safety_valve

Rails plugin to rescue common Rails exceptions, render an error with your look and feel, and return an appropriate HTTP status code
Ruby
18
star
15

dotfiles

My shareable dotfiles
Vim Script
17
star
16

ambitious-sphinx

Ambition adapter for Sphinx
Ruby
17
star
17

picklehome

Configuration & Planning for my Home Automation systems
Shell
14
star
18

has_markup

Manage markup close to home... right in the model! Caching, validation, etc
Ruby
14
star
19

mailinator-spec

a library for using mailinator for testing email from rspec and cucumber
Ruby
14
star
20

le-git

It's a GitHub party and you're invited! Ruby wrapper for the GitHub API
Ruby
13
star
21

isolate-scenarios

Tool for testing libraries using different senarios of gem versions
Ruby
11
star
22

rails-3-blog

Demo blog app using rails 3 and moonshine
Ruby
10
star
23

capistrano-mountaintop

Easily announce capistrano deploys to a Campfire room
Ruby
9
star
24

therapist

Helps you deal with your (GitHub) issues
Ruby
9
star
25

daywalker

A Ruby wrapper around the Sunlight Labs API using httparty and happymapper
Ruby
8
star
26

rankles

Ranking algorithms.
Ruby
8
star
27

g-gem

Tool for creating Gentoo ebuilds based on gems
Ruby
8
star
28

capistrano-benchmark

Benchmarking for capistrano tasks
Ruby
8
star
29

caveat_patch_kids

Manage caveatPatchor.js files for Propane
JavaScript
8
star
30

pickles-on-rails

A fresh Rails app, with some niceties and cleanup
Ruby
6
star
31

thescotchzone

thescotchzone.heroku.com
Ruby
6
star
32

mustache-ride

Example app that takes mustache for a ride in rails
Ruby
5
star
33

content_given

An ActionView helper for determining if content_for
5
star
34

nice_assert_select

make assert_select nicer
Ruby
5
star
35

obsidian-hook-scripts

Scripts to add to Hook for compatibility with Obsidian
JavaScript
5
star
36

technicalpickles.github.com

jekyll site for technicalpickles.com
HTML
5
star
37

ifib

A web service for providing the fibonacci sequence, implemented using sinatra and memcache
5
star
38

deliciousr

Ruby library for the del.icio.us API
Ruby
5
star
39

feedbarn

A 'planet' like feed aggregator using feedparser and erubis
Ruby
5
star
40

flvorflv

A tiny wrapper around flvstreamer, an open source command-line RTMP client
Ruby
5
star
41

hubot-irc-development-server

For quickly getting up and running in development with hubot-irc using ngircd
Shell
5
star
42

multiple-domain-demo

Demo of using subdomain_fu and proxy to handle subdomains and domain names
4
star
43

pickled-nvim

Lua
4
star
44

vlad-extras

Extra tasks for vlad
Ruby
4
star
45

alfred-system-audio

Alfred Workflow to quickly change the default system input audio and output
Swift
4
star
46

paperclip-in-attachment_fus-clothing

evil twin of paperclip to ease migration from attachment_fu
4
star
47

adopt-a-garden

Adopt a Garden, in Savannah, GA
Ruby
4
star
48

the-perfect-gem

Experiment for generating a jeweler-enabled project
Ruby
4
star
49

gimme-octo-kitty-wiki

A script to pull down a project's wiki on GitHub locally.
Ruby
3
star
50

feedra

Simple feed aggregation for Rails.
Ruby
3
star
51

pb2md

Convert the macOS clipboard (aka pasteboard) to Markdown
HTML
3
star
52

chester

chester the cheat.errtheblog.com clone
Ruby
3
star
53

flockup

site powering tweetfleet.heroku.com, formerly flockup.com
Ruby
3
star
54

mr_github

A tool to make it easy to clone and pull all your GitHub repositories
Ruby
3
star
55

voteontherandom

entry for barcamp boston programming contest
JavaScript
3
star
56

file_fixture

A helper method for loading files during test
Ruby
3
star
57

jquery.googlesearch

Simple jQuery wrapper around the Google AJAX Search API.
JavaScript
3
star
58

in-file-test

A tiny generator for creating a ruby file, that when executed, runs a test/unit suite
3
star
59

posterrrrous

Quick and dirty Ruby API wrapper for Posterous
Ruby
3
star
60

zomgblog

Ruby
2
star
61

moonshined

test app for moonshine
Ruby
2
star
62

puppet-flux

F.lux Puppet Module for Boxen
Shell
2
star
63

omgwtfcreaterepo

2
star
64

bcb4-attendees

TODO
Ruby
2
star
65

repo_creation_test

2
star
66

zomg-created

TODO: one-line summary of your gem
Ruby
2
star
67

snapchop

Grabs a snapshot of a movie using ffmpeg
Ruby
2
star
68

blueprint-layout

Rails helpers to generate Blueprint CSS-based structures
Ruby
2
star
69

railsconfcal

TODO
Ruby
2
star
70

glob-test

Test globs across different languages and libraries
Ruby
2
star
71

4tehlulz.biz

Ruby
1
star
72

pickledtunes

Notes, links, resources from experimenting making musics
Ruby
1
star
73

ghsup

JavaScript
1
star
74

pickled-atom

My personal Atom configuration
CoffeeScript
1
star
75

broadlinky

Python
1
star
76

ragamuffin

I'm a bad, bad man
Ruby
1
star
77

hello_extension

Hello world, but for making a gem with native extensions
1
star
78

my-created-gem

1
star
79

hello_rubyconf

An gem created for a lightning talk on a hacked version of jeweler with sinatra support
Ruby
1
star
80

hubot-test-harness

CoffeeScript
1
star
81

puppet-airfoil

Airfoil Puppet Module for Boxen
Shell
1
star
82

tools.scrollable

mirror of jQuery TOOLS Scrollable, since I couldn't find a version control for it
JavaScript
1
star
83

flamegraph-lighting-talk

Ruby
1
star
84

slackhubotbot

Hubot for developing hubot against SlackHQ
Shell
1
star