Created
September 18, 2022 16:14
-
-
Save source-c/d02773232163b8592fb71539dedce6aa to your computer and use it in GitHub Desktop.
List packages locally installed with brew (on MacOS) in JSON format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
JQ=$(which jq) | |
[[ -n ${JQ} ]] || exit 1 | |
[[ -x ${JQ} ]] || exit 2 | |
brew info --json=v1 --installed | jq "map({name: .name, desc: .desc, version: .installed[].version})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment