有没有办法获取可使用Homebrew Cask安装的所有木桶的列表(可能带有描述) ?
9 回答
列出所有可安装的 cask 包的新方法是:
brew search --casks
brew 的手册页包含以下信息:
搜索——木桶
显示所有本地可用的酒桶(包括已分装的酒桶)。不执行在线搜索。
Brew 搜索现在有一个 --desc 标志。
这列出了所有它们的描述:
brew search --casks --desc ''
使用浏览器列出
- 访问网站https://formulae.brew.sh/
- 用作搜索字符串,将
*
显示所有木桶
使用命令行列出
for cask in $(brew search); do
brew cask info $cask;
done
不带参数运行brew search
以列出所有这些。你不会得到描述,想。
Multiple ways to do, collating different answers:
1.
for cask in $(brew search ''); do
brew info $cask; done
brew search --casks
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
有一个新的 GUI 可以快速浏览所有 Homebrew 包。
你可能想试试Cakebrew
另外值得注意的是过去 365 天内所有 cask 包的最高下载量的分析数据:https ://formulae.brew.sh/analytics/
对上面的答案稍作修改:
for cask in $(brew search --casks); do
brew cask info $cask;
done
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)