Skip to content

ryanfowler/fetch

Repository files navigation

fetch

A terminal API client for requests, streams, and network debugging.

Example of fetch with an image and JSON responses

fetch combines formatted HTTP responses with WebSockets, gRPC, DNS and TLS inspection, request timing, authentication, sessions, and terminal-native image rendering.

Features

  • 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

Quick Start

Install on macOS or Linux:

curl -fsSL https://raw.githubusercontent.com/ryanfowler/fetch/main/install.sh | bash

Or use Homebrew or Cargo:

brew install ryanfowler/tap/fetch
cargo install --git https://github.com/ryanfowler/fetch --locked

Make a request:

fetch httpbin.org/json

Send JSON (body options infer POST):

fetch -j '{"name":"Ada"}' https://httpbin.org/post

Inspect 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/Check

fetch -h shows concise help. Use fetch -v -h for the complete, colorized command menu.

Output

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.

Documentation

Start with the documentation index, or jump directly to:

License

fetch is released under the MIT License.

About

A terminal API client for requests, streams, and network debugging

Topics

Resources

License

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Contributors