Strongly consider using a direct download approach.
Discussion
While some environments have added DuckDB to their package manager, this is not the case for all. As a result, I find it easier to just download the binary and put it in a directory that is in your path.
For Windows, macOS, and Linux there are individual ZIP archives for the CLI, drivers, and libraries, making it pretty straightforward to build a cross-platform workflow for doing so:
Not to get ahead of ourselves, but – once you have the DuckDB on a system – you can use it vs. the curl + jq operations, to perform the same operation:
duckdb-noheader-list-c"WITH assets AS ( FROM read_json('https://api.github.com/repos/duckdb/duckdb/releases/latest') SELECT UNNEST(assets) rec)FROM assetsSELECT rec.browser_download_url"
You can use grep, rg (ripgrep), jq idioms, or SQL (if you go the DuckDB route) to filter for your platform and download the appropriate archive.
DuckDB ships as a single binary, so there’s no need to have a different installation idiom on each platform. This simplifies the process and also any documentation you may need to write for you or your team.
Package managers can also lag behind days or weeks for each new DuckDB release, and there are usually some pretty handy features in the updates that warrant getting in on the action early