51

有没有办法获取可使用Homebrew Cask安装的所有木桶的列表(可能带有描述) ?

4

9 回答 9

54

列出所有可安装的 cask 包的新方法是:

brew search --casks

brew 的手册页包含以下信息:

搜索——木桶

显示所有本地可用的酒桶(包括已分装的酒桶)。不执行在线搜索。

于 2018-09-30T08:16:02.737 回答
23

Brew 搜索现在有一个 --desc 标志。

这列出了所有它们的描述:

brew search --casks --desc ''
于 2018-12-04T19:08:21.167 回答
14

使用浏览器列出

  1. 访问网站https://formulae.brew.sh/
  2. 用作搜索字符串,将*显示所有木桶

使用命令行列出

for cask in $(brew search); do
    brew cask info $cask;
done
于 2016-08-13T07:51:03.060 回答
7

不带参数运行brew search以列出所有这些。你不会得到描述,想。

于 2016-08-13T08:10:39.913 回答
2
于 2020-01-27T23:59:09.157 回答
2

Multiple ways to do, collating different answers:

1.

for cask in $(brew search ''); do
brew info $cask; done
  1. brew search --casks
  2. brew search

You could one-line it to put results into file for later (because its really slow querying packages one by one):

for cask in $(brew search ''); do brew info $cask; echo "==="; done > list_of_casks.txt
于 2020-06-02T15:55:54.410 回答
1

有一个新的 GUI 可以快速浏览所有 Homebrew 包。

你可能想试试Cakebrew

另外值得注意的是过去 365 天内所有 cask 包的最高下载量的分析数据:https ://formulae.brew.sh/analytics/

于 2019-05-13T11:41:41.707 回答
0

对上面的答案稍作修改:

for cask in $(brew search --casks); do
    brew cask info $cask;
done
于 2019-05-04T21:51:24.270 回答
0

If you're not interested in installation stats, which you could get by using brew search answers above, you could simply go with:

grep  -e '\(version\|cask\|creator\|desc\|homepage\) ' /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/*.rb

This will get you a list lite this:

zotero.rb:cask "zotero" do
zotero.rb:  version "5.0.96.3"
zotero.rb:  desc "Collect, organize, cite, and share research sources"
zotero.rb:  homepage "https://www.zotero.org/"
zprint.rb:cask "zprint" do
zprint.rb:  version "1.2.1"
zprint.rb:  desc "Library to reformat Clojure and Clojurescript source code and s-expressions"
zprint.rb:  homepage "https://github.com/kkinnear/zprint"
zterm.rb:cask "zterm" do
zterm.rb:  version "1.2"
zterm.rb:  desc "Terminal emulation program"
zterm.rb:  homepage "https://www.dalverson.com/zterm/"

which will be instant, rather than waiting for ages for

for cask in $(brew search ''); do brew info $cask; echo "\n\n"; done

where you'd get prettier results and info regarding popularity:

cobalt: stable 0.17.5 (bottled)
Static site generator written in Rust
https://cobalt-org.github.io/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/cobalt.rb
License: MIT
==> Dependencies
Build: rust
==> Analytics
install: 10 (30 days), 45 (90 days), 147 (365 days)
install-on-request: 10 (30 days), 45 (90 days), 147 (365 days)
build-error: 0 (30 days)



coccinelle: stable 1.1.1 (bottled), HEAD
Program matching and transformation engine for C code
http://coccinelle.lip6.fr/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/coccinelle.rb
License: GPL-2.0-only
==> Dependencies
Build: autoconf, automake, hevea, ocaml-findlib, opam, pkg-config
Required: ocaml, pcre
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 3 (30 days), 22 (90 days), 167 (365 days)
install-on-request: 3 (30 days), 22 (90 days), 167 (365 days)
build-error: 0 (30 days)
于 2022-02-03T20:09:27.190 回答