The following is a collection of ways to get the latest release of a program from its GitHub repository, using the command line. The example repositories used below can be replaced with any repository hosted on GitHub.

sed

This gets the URL of the latest release using sed. It then filters out files that contain ".rpm" and ".deb".

curl -s https://api.github.com/repos/matheus-git/systemd-manager-tui/releases/latest \
    | sed -n 's/.*"browser_download_url": //p' \
    | grep -v -E ".rpm|.deb" \
    | tr -d '"'

Output:
https://github.com/matheus-git/systemd-manager-tui/releases/download/v1.2.4/systemd-manager-tui

To get the SHA256 digest corresponding to the file, use jq in combination with awk.

curl -s https://api.github.com/repos/matheus-git/systemd-manager-tui/releases/latest \
    | jq -c '.assets.[] | select(.browser_download_url | contains(".deb") or contains(".rpm") | not) | .digest' \
    | tr -d '"' \
    | awk -F: '{print $2}'

Output:
63a977112f97462d55a4e41fc0280d32b3f801c3b9f0fad329cd79843c7ae1ec

jq

This gets the URL of the latest release using jq. If you know that the file you want contains "bw-linux-arm64" in the filename, you can use jq to select it.

curl -s https://api.github.com/repos/bitwarden/clients/releases/latest \
    | jq -r '.assets[] | select(.name | contains("bw-linux-arm64")) | .browser_download_url'

Output:
https://github.com/bitwarden/clients/releases/download/cli-v2026.3.0/bw-linux-arm64-2026.3.0.zip

You can then pipe this to curl via the xargs command to download the file to the current working directory.

curl -s https://api.github.com/repos/bitwarden/clients/releases/latest \
    | jq -r '.assets[] | select(.name | contains("bw-linux-arm64")) | .browser_download_url' \
    | xargs -I {} curl -SL -O {}

Nushell

This gets the URL of the latest release of Bitwarden using Nushell.

http get https://api.github.com/repos/bitwarden/clients/releases/latest
| get assets.browser_download_url
| find "bw-linux-arm64"
| get 0

Output:
https://github.com/bitwarden/clients/releases/download/cli-v2026.3.0/bw-linux-arm64-2026.3.0.zip

More examples