req is a local-first HTTP client for repeatable terminal workflows. It
combines direct HTTP requests, inspectable Postman-style collections,
environments, supported Postman scripts, and shell-free cURL import/export in
one Go binary.
It is designed for API work without a GUI, cloud account, Node.js runtime, or
external cURL process. req implements a documented compatibility subset,
not a full Postman clone; see the compatibility matrix
before relying on an imported feature.
- HTTP/HTTPS requests with query, headers, raw/JSON/form/multipart bodies, basic or bearer auth, redirects, TLS, timeouts and streamed downloads.
- Local JSON collections, nested folders, saved requests, environments and
inherited scripts under
.req/. - Postman v2.1 collection/environment import and supported inherited scripts.
- POSIX-safe cURL export with placeholders and file references preserved by default, plus shell-free cURL import.
- Embedded Goja scripts with callback/Promise
pm.sendRequest, assertions and explicit persisted-variable runs. - Body-only stdout, stderr diagnostics, versioned JSON envelopes and atomic output paths for pipelines.
The module targets Go 1.25. Build a local binary or install the local command:
go build -o req ./cmd/req
go install ./cmd/reqNo Node.js or external cURL executable is required at runtime. Check the available commands with:
req help
req --versionDirect requests do not require a workspace:
req send GET https://httpbin.org/get --query page=1
req send POST https://httpbin.org/anything --json '{"hello":"world"}'The response body goes to stdout; status and diagnostics go to stderr. Save a request in a workspace:
mkdir api-workspace
cd api-workspace
req init
req collection create "Example API"
req request create "Example API/Health" --method GET --url https://httpbin.org/get
req run "Example API/Health"From elsewhere, select the workspace before the command:
req --workspace ./api-workspace collection listFor a persisted login/profile example, start with Getting started.
- Getting started: install, workspace setup, environments, first requests, login/profile, imports and troubleshooting.
- CLI reference: commands, request/body/auth flags, run-only flags, output modes and exit codes.
- Scripting: inherited ordering, supported
pmAPIs, callback/Promise requests, assertions and variable persistence. - Import and export: Postman/cURL forms, strict mode, warnings, placeholders and file-reference bases.
- Compatibility matrix: supported behavior and deliberate limitations with acceptance evidence.
- Decision log: architecture decisions and the source-linked Goja runtime choice.
req uses Go’s net/http and never invokes a shell or external cURL. Scripts
cannot access arbitrary files, spawn processes, load modules or read the
complete process environment. Goja is an embedded interpreter, not a hard
heap/security sandbox; supported execution is bounded by deadlines, task,
body and log limits. Review imported scripts and files before running them.
Environment files and local configuration may contain secrets. Keep them out
of source control; .gitignore is not encryption. Verbose and JSON header
metadata redacts Authorization, Proxy-Authorization, Cookie, Set-Cookie and
configured secret_headers names. Response bodies and script logs are not
reliably redacted, and --resolve --env NAME can expose saved values in
stdout.
| Surface | Supported | Not promised |
|---|---|---|
| HTTP | HTTP/HTTPS, standard bodies, redirects, TLS and output streams | Retries, cookie jar, WebSockets, gRPC or a GraphQL-specific client |
| Postman | v2.1 data and documented inherited script APIs | Full Postman/Chai/Node compatibility, modules, timers or arbitrary globals |
| cURL | One shell-free supported command and POSIX-safe export | Pipelines, redirections, shell expansion or every cURL option |
| Storage | Local JSON workspace with revision-checked writes | Cloud sync, collaboration, GUI, collection runner or iteration data |