diff --git a/README.md b/README.md index 7dfe71a930e58..5bcc92bcd1416 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ To start using Homebrew Cask, you just need [Homebrew](https://brew.sh) installe Slower, now: -``` +```console $ brew install alfred ==> Downloading https://cachefly.alfredapp.com/Alfred_4.2.1_1187.dmg ######################################################################## 100.0% diff --git a/USAGE.md b/USAGE.md index b096416bb949d..ce9351aad09ab 100644 --- a/USAGE.md +++ b/USAGE.md @@ -4,27 +4,27 @@ Homebrew Cask is implemented as part of [Homebrew](https://brew.sh). All Homebrew Cask commands begin with `brew`, which works for both casks and formulae. The most frequently-used commands are: -* `install` — installs the given Cask. -* `uninstall` — uninstalls the given Cask. -* `reinstall` — reinstalls the given Cask. -* `list --casks` — lists installed Casks. +* `install --cask` — installs the given cask. +* `uninstall --cask` — uninstalls the given cask. +* `reinstall --cask` — reinstalls the given cask. +* `list --cask` — lists installed casks. ## Searching for Casks To search for Casks, use `brew search`. Let’s see if there’s a Cask for Google Chrome: -```bash -$ brew search google-chrome +```console +$ brew search --cask google-chrome ==> Casks google-chrome google-chrome-beta google-chrome-canary google-chrome-dev ``` ## Installing Casks -The command `brew install` accepts one or multiple Cask tokens. Let’s try to install Google Chrome: +The command `brew install --cask` accepts one or multiple cask tokens. Let’s try to install Google Chrome: -```bash -$ brew install google-chrome +```console +$ brew install --cask google-chrome ==> Downloading https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg ######################################################################## 100.0% ==> Verifying SHA-256 checksum for Cask 'google-chrome'. @@ -37,30 +37,32 @@ $ brew install google-chrome Easy peasy: -```bash -$ brew uninstall google-chrome +```console +$ brew uninstall --cask google-chrome ``` This will both uninstall the Cask and remove applications which were moved to `/Applications`. ## Other Commands -* `info` — displays information about the given Cask. -* `fetch` — downloads remote application files for the given Cask to the local cache (with `--force`, re-download even if already cached). -* `--cache` — displays the path to Homebrew's local cache. -* `doctor` — checks for configuration issues. -* `style` — checks Cask style using RuboCop. -* `home` — opens the homepage of the given Cask; or with no arguments, the Homebrew project page. -* `uninstall --zap` — try to remove *all* files associated with a Cask (may include resources shared with other applications). -* `outdated` — lists all outdated Casks. -* `upgrade` — updates all outdated Casks. +Unless noted, these are run with `--cask ` to apply to Homebrew Cask. -The following commands are for Cask authors: +* `info` — displays information about the given cask. +* `fetch` — downloads remote application files for the given cask to the local cache (with `--force`, re-downloads even if already cached). +* `--cache` — displays the expected path to Homebrew's local cache of application files. +* `doctor` — checks for configuration issues (run with no arguments). +* `style` — checks style for the given cask using RuboCop. +* `home` — opens the homepage of the given cask; or with no arguments, the Homebrew project page. +* `uninstall --zap` — try to remove *all* files associated with a cask (may include resources shared with other applications). +* `outdated` — lists all outdated casks (run with just `--cask`). +* `upgrade` — updates all outdated casks (run with just `--cask`). -* `audit` — verifies installability of Casks. -* `cat` — dumps the given Cask to the standard output. -* `create --cask` — creates a Cask and opens it in an editor. -* `edit` — edits the given Cask. +The following commands are for cask authors: + +* `audit` — verifies installability of casks. +* `cat` — dumps the given cask to the standard output. +* `create --cask` — creates a cask and opens it in an editor. +* `edit` — edits the given cask. The following aliases and abbreviations are provided for convenience: @@ -73,44 +75,39 @@ The following aliases and abbreviations are provided for convenience: ## Tab Completion -Homebrew Cask comes with `bash` and `zsh` completion for the `brew` command. +Homebrew comes with `bash`, `zsh` and `fish` tab completion for the `brew` command. See [`brew` Shell Completion](https://docs.brew.sh/Shell-Completion) for more information. -See https://docs.brew.sh/Shell-Completion for more information. +## Inspecting Installed Casks -`fish` completions can be installed with: +List staged files for an installed cask: -```bash -$ brew install brew-cask-completion +```console +$ brew list --cask firefox +==> App +/Applications/Firefox.app (112 files, 360MB) ``` -## Inspecting Installed Casks - -List all installed Casks: +List all installed casks: -```bash -$ brew list --casks -atom google-chrome 1password +```console +$ brew list --cask +firefox google-chrome opera ``` -With `--full-name` the Tap name will also be included, _e.g._: `purple/monkey/dishwasher` for the Cask `dishwasher` installed from the Tap `purple/monkey`. +With `--full-name` any external tap names will also be included, _e.g._: `purple/monkey/dishwasher` for the cask `dishwasher` installed from the tap `purple/monkey`. -Given an installed Cask, `brew list --casks ` lists the staged files. +Show details about a specific cask: -Show details about a specific Cask: - -```bash +```console $ brew info keepingyouawake -Error: No available formula with the name "keepingyouawake" -Found a cask named "keepingyouawake" instead. - -keepingyouawake: 1.5.2 (auto_updates) +==> keepingyouawake: 1.6.4 (auto_updates) https://keepingyouawake.app/ -/usr/local/Caskroom/keepingyouawake/1.5.2 (129B) -From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/keepingyouawake.rb +/usr/local/Caskroom/keepingyouawake/1.6.4 (129B) +From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/k/keepingyouawake.rb ==> Name KeepingYouAwake ==> Description -Prevents your computer from going to sleep +Tool to prevent the system from going into sleep mode ==> Artifacts KeepingYouAwake.app (App) ``` @@ -135,7 +132,7 @@ The primary Homebrew Cask Tap includes most of the Casks that a typical user wil You can tap any of the above with a `brew tap` command: ```bash -$ brew tap +brew tap ``` after which, Casks from the new Tap will be available to `search` or `install` just like Casks from the main Tap. `brew update` will automatically keep your new Tap up to date. @@ -143,7 +140,7 @@ after which, Casks from the new Tap will be available to `search` or `install` j You may also specify a fully-qualified Cask token (which includes the Tap) for any `brew` command. This will implicitly add the Tap if you have not previously added it with `brew tap`: ```bash -$ brew install homebrew/cask-fonts/font-symbola +brew install homebrew/cask-fonts/font-symbola ``` ## Options @@ -174,9 +171,9 @@ export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts" Note that you still can override the environment variable `HOMEBREW_CASK_OPTS` by _explicitly_ providing options in the command line: ```bash -# Will force the Chrome app to be moved to /Applications +# Will force the Google Chrome app to be moved to /Applications # even though HOMEBREW_CASK_OPTS specified ~/Applications -$ brew install --appdir="/Applications" google-chrome +brew install --appdir="/Applications" google-chrome ``` ## Other Ways to Specify a Cask