Your shell environment in one place. Easy to sync. Feel at home on any machine.
home
helps you manage all your shell scripts and libraries in one place.
Putting them all in this one place allows easy synchronisation
between multiple machine by versioning the directory
with git or another version-control system.
I'll mainly speak about my own experience, but I'm sure most of you can relate to it.
My usecases:
- Since I moved to Linux, back in 2011, I grew quite a collection of shell scripts and personalised a lot my shell environment.
- I use many different machines: remote servers, home computer, work computer, laptop, friends laptops, VMs.
My requirements:
- I want to feel at home on each of these machine. I want my shell environment wherever I am.
- I want it easily synced, and easily installed on new systems.
home
aims at solving that.
Installation is done with basher:
basher install gitlab.com/shellm/home
- choose a location on your disk
- initialize your home there
- load your home environment whenever you need it, or...
- (optional) add two lines in
~/.bashrc
to load it automatically each time you open your console.
I know, I know, again adding lines in .bashrc
.
But the goal here is to move all the previously appended lines
to your home, so you don't have to mess with .bashrc
anymore!
Since home
depends on shellm
,
which itself depends on basher
,
the minimal set of lines that you have to put in .bashrc
is the following:
export PATH="$HOME/.basher/bin:$PATH"
eval "$(basher init -)"
eval "$(home init - /path/to/my/home)"
And it will not grow anymore!
Now put all your shell environment and configuration
in your /path/to/my/home
directory, put it under git
,
and voilà!
OK, but I could have done that in one line, like
. /path/to/my/env/startup
...
Indeed, so what does home
really bring here? Well:
- it comes with handy commands allowing you to manipulate your data,
- it autocompletes with the contents of your home so you can quickly
run commands on your files:
home vim bin/my_script
- it will take care of setting your PATH variable