• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

msanders/cider: Hassle-free bootstrapping with Homebrew.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

msanders/cider

开源软件地址:

https://github.com/msanders/cider

开源编程语言:

Python 95.2%

开源软件介绍:

Deprecation Notice

Cider is no longer actively maintained, and has been superseded by a new tool, zero.sh.

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

Cider is available directly from PyPI:

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap