Skip to main content

Hassle-free bootstrapping using Homebrew.

Project description

Start with a clean slate

Cider is a simple wrapper for Homebrew and Homebrew Cask that allows you to save your setup across different machines. This lets you to restore a backup without having to deal with the mess that was the state of your previous installation, or painstakingly babysit the process step-by-step.

Simply run the following on a new machine:

git clone [YOUR_REPO] ~/.cider
cider restore

... and you'll be back up and running, with all of your applications and command line utilities re-installed (and configurations restored).

In addition to Homebrew, Cider also supports managing your user defaults, restoring symlinks, and running scripts to conveniently manage other settings such as your dotfiles.

Installation

pip install -U cider

Configuration

All configuration files are stored in the ~/.cider directory as JSON. For instance, here's an example bootstrap file:

{
    "after-scripts": [
        "brew linkapps"
    ],
    "casks": [
        "adobe-creative-cloud",
        "dropbox",
        "firefox",
        "flash",
        "flux",
        "github",
        "google-chrome",
        "google-hangouts",
        "heroku-toolbelt",
        "iterm2",
        "mplayerx",
        "sublime-text",
        "transmission",
    ],
    "formulas": [
        "brew-cask",
        "emacs",
        "fish",
        "git",
        "go",
        "macvim --overwrite-system-vi",
        "python",
        "python3",
        "xctool"
    ],
	"icons": {
		"iTerm": "https://dribbble.com/shots/1702947-iTerm-Replacement-Icon/attachments/271548"
	},
	"symlinks": {
		"bash/.*": "~",
		"bin/*": "~/bin/",
		"git/.*": "~",
		"sh/.*": "~",
		"vim/.*": "~"
	},
    "taps": [
        "caskroom/cask"
    ]
}

User defaults are stored similarly:

{
    "NSGlobalDomain": {
        "ApplePressAndHoldEnabled": false
    },
    "com.apple.dock": {
        "tilesize": 48
    },
    "com.iconfactor.mac.xScope": {
        "generalShowDockIcon": false
    }
}

Cider also supports YAML if you'd like to add comments to either of these. To see how this works out in practice, feel free to take a look at my dotfiles.

Backup your existing setup

To save the state of your existing setup:

cider missing
cider tap missing
cider cask missing

Manage symlinks

Cider supports the following commands to manage symlinks (inspired in part by GNU Stow).

cider addlink NAME ITEM...
cider relink # (invoked automatically by restore)

For example, cider addlink git ~/.gitconfig will move ~/.gitconfig to ~/.cider/symlinks/git/, create a link back to its original location, and add an entry to your bootstrap denoting this:

"symlinks": {
    "git/.*": "~"
}

To undo this change, simply run cider unlink git.

Directories in targets are automatically expanded, so the entry "bin/*": "~/bin/" will first create the directory ~/bin/ if it doesn't exist already, and then link all items in symlinks/bin/* to children of that directory.

Caveats

There doesn't seem to be a way to re-install purchases made from Mac App Store via the command line just yet, so those have to be done by hand.

Note: Cider is a work-in-progress, but it's well-tested and should be kind to your machine.

For more information, see the GitHub Repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cider-1.1.12.tar.gz (24.9 kB view details)

Uploaded Source

File details

Details for the file cider-1.1.12.tar.gz.

File metadata

  • Download URL: cider-1.1.12.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for cider-1.1.12.tar.gz
Algorithm Hash digest
SHA256 e3e7855f6ac86557527c06c0544d3328db9ca7cb512b16445cfc07aa8c971dc3
MD5 ce682e296db68a3fb816d6e858df4f53
BLAKE2b-256 bdeaddf10365bf6d0e61170ca94959bba4413340ad3a9d6c03e343b7f2e95490

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page