/ellipsis

◦◦◦ Ellipsis is a package manager for dotfiles.

Primary LanguageShellMIT LicenseMIT

Ellipsis Build Status Documentation status Latest tag Gitter chat

 _    _    _
/\_\ /\_\ /\_\
\/_/ \/_/ \/_/   …because $HOME is where the <3 is!

Ellipsis is a package manager for dotfiles.

Features

  • Creating new packages is trivial (any git repository is already a package).
  • Modular configuration files are easier to maintain and share with others.
  • Allows you to quickly see which dotfiles have been modified, and keep them updated and in-sync across systems.
  • Adding new dotfiles to your collection can be automated with ellipsis add.
  • Cross platform, known to work on Mac OS X, Linux, FreeBSD and even Cygwin.
  • Large test suite to ensure your $HOME doesn't get ravaged.
  • Completely customizable.
  • Works with existing dotfiles!

Install

Requirements: bash, curl, git

Installation location overview:

  • Agnostic install
    • Agnostic Install as module:
      • ELLIPSIS_PATH=~/.shell/ellipsis
      • ELLIPSIS_PACKAGES=~/.shell/
    • Agnostic Default install:
      • ELLIPSIS_PATH=~/.shell
      • ELLIPSIS_PACKAGES=$ELLIPSIS_PATH/packages
  • Explicit install:
    • Install as module:
      • ELLIPSIS_PATH=~/.ellipsis/ellipsis
      • ELLIPSIS_PACKAGES=~/.ellipsis/
    • Default install:
      • ELLIPSIS_PATH=~/.ellipsis
      • ELLIPSIS_PACKAGES=$ELLIPSIS_PATH/packages

Installation mode:

  • min
    • git base installation, extra files are removed
    • Useful for production and minimal deployment
  • full:
    • git base installation
    • Useful for dev and hacking

You can combine any of those parameters above.

Installation

Define how you want ellipsis to be deployed:

export ELLIPSIS_PATH=~/.shell/ellipsis
export ELLIPSIS_PACKAGES=~/.shell/

# For de mode (default is 'https'):
export ELLIPSIS_PROTO=git

If you want to auto install packages, you can space separate them:

PACKAGES='mrjk-collections/profile-min'
PACKAGES='mrjk-collections/profile-sensible'
PACKAGES='mrjk-collections/profile-user'
PACKAGES='mrjk-collections/profile-devops'
PACKAGES='mrjk-collections/profile-admin'

Two options from there:

  • Curl based install
  • Manual git based install

For automated install:

# Install ellipsis, install packages and enable init system
curl https://raw.githubusercontent.com/mrjk/ellipsis/alpha/scripts/install.bash | PACKAGES=$PACKAGES bash

For manual install:

# Install ellipsis
git clone https://github.com/mrjk/ellipsis "$ELLIPSIS_PATH"

# Auto install packages
PACKAGES=$PACKAGES $ELLIPSIS_PATH/bin/ellipsis install ellipsis

# Enable init system
$ELLIPSIS_PATH/bin/ellipsis link ellipsis

Then restart or reload your shell, and you are ready to go:

. ~/.bashrc

Without shell init system

Add '$ELLIPSIS_PATH/binto your$PATH(or symlink somewhere convenient) and start managing your dotfiles in style :) To enable init system, runellipsis link ellipsis`

Other examples

# Manually
$ git clone https://github.com/mrjk/ellipsis .shell/ellipsis
$ ELLIPSIS_PACKAGES=$HOME/.shell ./shell/ellipsis/bin/ellipsis link ellipsis

# With curl helper
$ curl https://raw.githubusercontent.com/mrjk/ellipsis/alpha/scripts/install.bash | \
  PACKAGES='mrjk-collections/profile-min' \
  ELLIPSIS_PROTO=git \
  bash

Install another module:

ellipsis install https://framagit.org/mrjk-dotfiles/home_base

Future

  • Installation
    • Install itself
    • install pkg $SHELL
    • When install $SHELL is linked

Init system

As of version 1.7.3 you can also use the init system to automatically setup you environment. As a bonus it will allow you to use the powerful pkg.init hook to do the same for your packages.

As of version 1.9, you can enable or disable shell hooks:

# Enable init system
./ellipsis/bin/ellipsis link ellipsis

# Disable init system
./ellipsis/bin/ellipsis unlink ellipsis

Usage

Ellipsis comes with no dotfiles out of the box. To install packages, use ellipsis install. Packages can be specified by github-user/repo or full ssh/git/http(s) urls:

$ ellipsis install ssh://github.com/zeekay/private.git
$ ellipsis install zeekay/vim
$ ellipsis install zsh

...all work. By convention username/package and package are aliases for https://github.com/username/dot-package. (customizable using ELLIPSIS_PREFIX)

For full usage information you can read the docs or ask help from the command line with the -h option.

Configuration

You can customize ellipsis by exporting a few different variables:

Variable Description
GITHUB_USER / ELLIPSIS_USER Customizes whose dotfiles are installed when you ellipsis install without specifying user or a full repo url. Defaults to $(git config github.user) or whoami.
ELLIPSIS_REPO Customize location of ellipsis repo cloned during a curl-based install. Defaults to https://github.com/mrjk/ellipsis.
ELLIPSIS_PROTO Customizes which protocol new packages are cloned with, you can specify https,ssh, git. Defaults to https.
ELLIPSIS_PREFIX Customizes the prefix of ellipsis configuration packages (default: dot-).
ELLIPSIS_HOME Customize which folder files are symlinked into, defaults to $HOME. (Mostly useful for testing)
ELLIPSIS_PATH Customize where ellipsis lives on your filesystem, defaults to ~/.ellipsis.
ELLIPSIS_PACKAGES Customize where ellipsis installs packages on your filesystem, defaults to ~/.ellipsis/packages.
ELLIPSIS_LOGFILE Customize location of the logfile, defaults to /tmp/ellipsis.log.
export ELLIPSIS_USER="zeekay"
export ELLIPSIS_PROTO="ssh"
export ELLIPSIS_PATH="~/.el"

Packages

A package is any repo with files you want to symlink into $ELLIPSIS_HOME (typically $HOME). By default all of a repository's non-hidden files (read: not beginning with a .) will naively be linked into place, with the exception of a few common text files (README, LICENSE, etc).

You can customize how ellipsis interacts with your package by adding an ellipsis.sh file to the root of your project. Here's an example of a complete ellipsis.sh file:

#!/usr/bin/env bash

Yep, that's it :) If all you want to do is symlink some files into $HOME, adding an ellipsis.sh to your package is completely optional. But what if you need more? That's where hooks come in...

Docs

Please consult the docs for more information.

Specific parts that could be off interest:

Development

Pull requests welcome! New code should follow the existing style (and ideally include tests).

Suggest a feature or report a bug? Create an issue!

License

Ellipsis is open-source software licensed under the MIT license.