A terminal API client for requests, streams, and network debugging.
fetch combines formatted HTTP responses with WebSockets, gRPC, DNS and TLS
inspection, request timing, authentication, sessions, and terminal-native image
rendering.
- HTTP/1.1, HTTP/2, HTTP/3, WebSockets, and gRPC with reflection
- Automatic formatting for JSON, XML, YAML, HTML, CSV, Markdown, MessagePack, Protocol Buffers, SSE, NDJSON, and images
- JSON, XML, forms, multipart uploads, files, stdin, and editor-based bodies
- Basic, Digest, Bearer, AWS SigV4, and mutual TLS authentication
- DNS, TLS certificate, and request timing diagnostics
- Proxies, custom DNS, cookie sessions, configuration, and self-update workflows
Install on macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/ryanfowler/fetch/main/install.sh | bashOr use Homebrew or Cargo:
brew install ryanfowler/tap/fetch
cargo install --git https://github.com/ryanfowler/fetch --lockedMake a request:
fetch httpbin.org/jsonSend JSON (body options infer POST):
fetch -j '{"name":"Ada"}' https://httpbin.org/postInspect a connection or call a reflected gRPC method:
fetch -vvv https://example.com
fetch --grpc -j '{"service":""}' \
http://127.0.0.1:50051/grpc.health.v1.Health/Checkfetch -h shows concise help. Use fetch -v -h for the complete, colorized
command menu.
Response bodies go to stdout; status, headers, timing, warnings, and errors go to stderr. This keeps pipelines clean:
fetch example.com/api | jq .Terminal output is formatted automatically. Redirected output is unformatted by default, and binary responses are protected from accidental terminal output. See Output Formatting for pager, color, binary, clipboard, and file behavior.
Start with the documentation index, or jump directly to:
- Getting Started — installation and common tasks
- CLI Reference — every command-line option
- Configuration — global and per-host settings
- Request Bodies — JSON, forms, multipart, and files
- Authentication — supported authentication methods
- Troubleshooting — diagnostics and exit codes
fetch is released under the MIT License.
