phinze
12 years ago
3 changed files with 159 additions and 140 deletions
@ -0,0 +1,60 @@ |
|||
# Frequently Asked Questions |
|||
|
|||
## What is a Cask? |
|||
|
|||
A `Cask` is like a `Formula` in Homebrew except it describes how to download |
|||
and install a binary application. |
|||
|
|||
Casks currently have three fields: |
|||
|
|||
* __url__: (required) points to binary distribution of the application |
|||
* __version__: (required) describes the version of the application available at the URL |
|||
* __homepage__: the same as Homebrew's - it doesn't do anything yet, but will be wired in |
|||
|
|||
## What's the status of this project? Where's it headed? |
|||
|
|||
`brew-cask` currently understands how to install `dmg` and `zip` files that |
|||
contain a `.app` file. I'd like to extend it to be able to handle `pkg` files |
|||
as well as the numerous other permutations of compression and distribution in |
|||
the wild (`.app` inside `dmg` inside `zip`; folder inside `dmg`; etc.). |
|||
|
|||
The idea is for each Cask to encapsulate and automate the story of how a given |
|||
application should be installed. Join us in building up a community-maintained |
|||
collection of Casks that is striving to become the standard way that hackers |
|||
install Mac apps. |
|||
|
|||
## Can I contribute? |
|||
|
|||
__Yes, yes, yes!__ Please fork/pull request to update Casks, to add features, |
|||
to clean up documentation—anything at all that you can do to help out is very |
|||
welcome. |
|||
|
|||
It's also [__pretty darn easy__ to create Casks (see CONTRIBUTING.md)][c1], so |
|||
please build more of them for the software you use. And if `brew-cask` doesn't |
|||
support the packaging format of your software, please [open an issue][c2] |
|||
and we can get it working together. |
|||
|
|||
The whole idea is to build a _community-maintained_ list of easily installable |
|||
packages, so the community part is important! Every little bit counts. |
|||
|
|||
[c1]: https://github.com/phinze/homebrew-cask/blob/master/CONTRIBUTING.md |
|||
[c2]: https://github.com/phinze/homebrew-cask/issues |
|||
|
|||
## Why use Homebrew's Cellar? Why not just manage apps directly in Applications? |
|||
|
|||
The short answer to this would be: for the same reason that Homebrew does not |
|||
install applications directly into /usr/local. |
|||
|
|||
We don't know up-front precisely what files are going to be in the |
|||
dmg/zip/tgz/etc, so it's really helpful to have a place to dump all of them |
|||
safely then iterate through and act on the files we care about. For a .app file |
|||
this may be symlinking it into ~/Applications or /Applications, for a .pkg file |
|||
this might be running the installer. For a screensaver it may be symlinking it |
|||
into the appropriate directory for it to show up in System Preferences. |
|||
|
|||
The reason we implement this project on top of Homebrew was based on a belief |
|||
that their methodology for managing applications has a lot of merit. We'd |
|||
prefer to try and work things so that we can keep ourselves Homebrewy both in |
|||
implementation and idioms. Trying to manage all of ~/Applications would move |
|||
the project more towards a standalone system, which would mean reimplementing a |
|||
lot of the Homebrew stuff we lean on now. |
@ -0,0 +1,91 @@ |
|||
# How to Use |
|||
|
|||
## Getting started |
|||
|
|||
First ensure you have Homebrew version '0.9' or higher: |
|||
|
|||
$ brew --version |
|||
0.9.3 |
|||
|
|||
Tap this repository and install the `brew-cask` tool: |
|||
|
|||
$ brew tap phinze/homebrew-cask |
|||
$ brew install brew-cask |
|||
|
|||
## Searching for Casks |
|||
|
|||
Let's see if there's a Cask for Chrome: |
|||
|
|||
$ brew cask search chrome |
|||
google-chrome |
|||
|
|||
Listing all available casks can be done with a `search` command with no search term: |
|||
|
|||
$ brew cask search |
|||
# list of all available casks |
|||
|
|||
## Installing Casks |
|||
|
|||
$ brew cask install google-chrome |
|||
==> Downloading https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg |
|||
==> Success! google-chrome installed to /opt/homebrew-cask/Caskroom/google-chrome/stable-channel |
|||
==> Linking Google Chrome.app to /Users/paulh/Applications/Google Chrome.app |
|||
|
|||
## Inspecting Installed Casks |
|||
|
|||
List all installed Casks |
|||
|
|||
$ brew cask list |
|||
adium google-chrome one-password |
|||
|
|||
Details about a single Cask: |
|||
|
|||
$ brew cask info caffeine |
|||
caffeine: 1.1.1 |
|||
http://lightheadsw.com/caffeine/ |
|||
Not installed |
|||
https://github.com/phinze/cask/commits/master/Casks/caffeine.rb |
|||
|
|||
## Updating/Upgrading Casks |
|||
|
|||
Since this repository is a Tap, you'll pull down the latest Casks with a simple |
|||
`brew-update`. When the `brew-cask` tool itself is updated, it will show in |
|||
`brew outdated` and you can upgrade it via the normal Homebrew workflow. |
|||
|
|||
## Uninstalling Casks |
|||
|
|||
Easy peasy: |
|||
|
|||
brew cask uninstall google-chrome |
|||
|
|||
This will both uninstall and unlink the Cask. |
|||
|
|||
## Options |
|||
|
|||
You can set options on the command-line and/or using the `HOMEBREW_CASK_OPTS` environment variable, e.g. (again, using google-chrome): |
|||
|
|||
```bash |
|||
# This probably should happen in your ~/.{ba|z}shrc |
|||
$ export HOMEBREW_CASK_OPTS="--appdir=/Applications" |
|||
|
|||
# Installs app links to /Applications |
|||
$ brew cask install google-chrome |
|||
|
|||
# Trumps the ENV and installs app links to ~/Applications |
|||
$ brew cask install --appdir="~/Applications" google-chrome |
|||
``` |
|||
|
|||
# Taps |
|||
|
|||
You can add Casks to your existing (or new) taps: just create a directory named |
|||
`Casks` inside your tap, put your Casks there, and everything will just work. |
|||
|
|||
# Alfred Integration |
|||
|
|||
I've been using Casks along with Alfred to great effect. Just add |
|||
`/opt/homebrew-cask/Caskroom` as a Search Scope in Alfred's preferences or |
|||
manage the scope addition via `brew cask alfred`. Then applications become |
|||
available in Alfred immediately after a `brew cask install`. Your fingertips |
|||
will thank you. |
|||
|
|||
Oh, and you can `brew cask install alfred` too! Not bad, eh? |
Loading…
Reference in new issue