Link inside archives
Treat zips and tarballs like directories. The archive is downloaded and extracted to the disk cache, and the path is printed.
$ ls `url downloads.hydraulic.dev/conveyor/conveyor-22.2-linux-amd64.tar.gz/lib` app runtime
url downloads an HTTP resource to a disk cache and prints its local path.
run does that, then executes it.
~ ❯ url https://omarchy.org/brand/omarchy-wordmark.svg /home/mike/.cache/dev.hydraulic/url-tool/cache/entries/af/2c/af2c4969d14f020b/content/omarchy-wordmark.svg ~ ❯ chafa `url https://omarchy.org/brand/omarchy-wordmark.svg`
HTTP's caching protocol is used; run it again and the result comes back fast. If the resource has changed it's refreshed.
Treat zips and tarballs like directories. The archive is downloaded and extracted to the disk cache, and the path is printed.
$ ls `url downloads.hydraulic.dev/conveyor/conveyor-22.2-linux-amd64.tar.gz/lib` app runtime
run appends /run.zip/run.pkl, resolves the package's
URLs, then executes its launch plan.
sh
$ run https://hydraulic-software.github.io/url/ hello Hello from run.zip. argument: helloinspect the package ↗
On zsh just use an HTTPS URL as a command directly.
zsh
$ https://hydraulic-software.github.io/url/ hello Hello from run.zip. argument: hello
The run.pkl file detects the running OS and produces the right
launch plan.
Add a SHA-256 fragment to lock expected content.
sh
$ url example.com/tool#sha256=e9e433…602712 …/content/tool
$ url example.com/tool#sha256=e9e433…ffffff url: SHA-256 mismatch: expected e9e433…ffffff but resolved e9e433…602712
Multiple URLs are downloaded in parallel. Comments and blank lines are ignored, so the input doubles as a small lockfile.
sh
$ url <<'EOF' # pinned inputs https://a.example/a#sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef # another pinned input https://b.example/b#sha256=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789 EOF …/content/a …/content/b
Use --progress=bar for an animated Unicode progress bar while url downloads.
sh · asciicast
Don't like the reference implementation? No problem.
Give the specification to your favourite model and make a better one.