A modern HTTPS-only alternative to curl and wget, written in Go using only the standard library.
curb https://api.example.com/users # streams JSON to stdout
curb https://example.com/release.tar.gz # saves to disk
curb --vet https://get.example.com/sh | sh # vets before pipingcurb is built around the shapes of work modern developers actually do: hitting JSON APIs, downloading release artifacts, and (carefully) piping installers to shells.
curb picks the right behavior automatically based on what the server returns and whether the output is going to a human or a pipe. Fewer flags to memorize, sensible defaults that match the situation.
Three modes, picked automatically from Content-Type or by sniffing the first few bytes. Override with a flag:
--inspectstream textual payloads (JSON, HTML, XML, ...) to stdout. The default for anything that looks like text.--downloadsave binaries to disk; stream to stdout on a pipe;-o PATHalways takes precedence. The default for anything that doesn't look like text.--vetbuffer the body, run it through security sieves, emit only on pass. Opt-in; intended for thecurl | shuse case.
--vet runs the body through a chain of checks before any bytes reach a shell:
nonemptyrefuses empty bodies (e.g. HTTP 204) that would otherwise pipe silently.heuristicpattern smell-tests (rm -rf /, fetch-pipe-shell, base64-pipe-shell,sudo sh -c,eval "$(curl …)"). Friction layer, not a guarantee.tofutrust-on-first-use SHA-256 pinning, persisted at~/.config/curb/known.txt.--pinto accept a change,--no-pinto skip,--forceto override any sieve once.
- Memory-safe runtime. Go. The memory-unsafe failure modes that bite C-based transports don't apply.
- Standard library only. The attack surface is whatever ships with the Go toolchain, plus the few hundred lines of curb itself.
- HTTPS with no escape hatch. No plaintext fallback, no
http://, no carveouts (not evenlocalhost). - Opt-in friction on top.
--vetadds the sieves above for thecurl | shcase.
curb covers a small slice of what curl and wget cover, with modern defaults and a tighter focus. No protocol breadth, no recursive mirroring, no resume-across-runs, no retry-forever. Different tools for different jobs.
Homebrew (macOS):
brew install --cask 33b5e5/tap/curbGo 1.23+:
go install gocurb.dev/curb@latestPrebuilt binaries for macOS and Linux (amd64 and arm64) are attached to each release.
GPLv3. See LICENSE.