HTTP client for shell pipelines.
# Fetch and extract
pipefetch get https://api.github.com/repos/praneshnikhar/pipefetch --extract .description
# Chain requests — pipe extracted values into templates
pipefetch get /users --extract '[0].id' | pipefetch get "/users/{.}"
# Run multi-step YAML collections
pipefetch run examples/demo.yamlcargo install --git https://github.com/praneshnikhar/pipefetchDownload the latest release from GitHub Releases.
pipefetch get <url>
pipefetch post <url> <body> # body is JSON (auto-sets Content-Type)
pipefetch put <url> <body>
pipefetch patch <url> <body>
pipefetch delete <url>| Flag | Description |
|---|---|
| (default) | Status line, headers, pretty-printed JSON body |
--status |
Print only the status line (e.g. 200 OK) |
--headers |
Print only response headers |
--raw |
Print raw response body, no formatting |
--json |
Machine-readable JSON output — {status, headers, body} |
| Flag | Description |
|---|---|
--extract .path |
Extract a JSON value via dot notation |
Dot notation supports:
.field— object key.field.subfield— nested access[0]— array index.field[0].subfield— mixed
# Extract a string value
pipefetch get /user --extract .name # → Alice
# Pipe extracted value → next request
pipefetch get /repo --extract .owner.login |
pipefetch get "/users/{.}"Template resolution {.path} reads from piped context:
{.}— entire piped value{.field}— field from piped JSON{.field[0]}— array element
Use ${VAR} in URLs and bodies — resolved from process environment:
pipefetch get "https://api.github.com/repos/${OWNER}/${REPO}" --extract .descriptionWorks alongside pipe templates — env vars resolve first, then pipe context.
pipefetch auth add prod --auth-type bearer --value ghp_xxx
pipefetch auth add staging --auth-type basic --value admin:secret
pipefetch auth list
pipefetch auth remove prodUse profiles when making requests:
pipefetch get /users --auth prodProfiles are stored at ~/.config/pipefetch/config.yaml (Linux) or ~/Library/Application Support/pipefetch/config.yaml (macOS).
Create config.yaml for defaults:
default_base: https://api.example.com
auth:
- name: prod
type: bearer
value: ghp_xxxWith default_base set, relative URLs resolve automatically:
pipefetch get /users # → GET https://api.example.com/usersPreview a request without sending it:
pipefetch get /users --auth prod --dry-run
# GET /users
# Authorization: Bearer ghp_xxxRun multi-step YAML collections where steps can reference each other:
# examples/demo.yaml
steps:
- name: get_uuid
method: GET
path: https://httpbin.org/uuid
extract: .uuid
- name: verify
method: GET
path: https://httpbin.org/anything/{get_uuid}
status: 200
extract: .urlpipefetch run examples/demo.yaml
# [OK] 200 get_uuid → 7c06ad58-...
# [OK] 200 verify → https://httpbin.org/anything/7c06ad58-...Collection features:
{step_name}references the extracted value of a prior stepstatus:asserts expected status code (exits 1 on mismatch)body:accepts YAML (auto-converted to JSON) or raw stringsheaders:per-step and client-levelclient.base:base URL for relative pathsclient.auth:auth profile name
# Simple GET
pipefetch get https://httpbin.org/get
# POST with JSON body
pipefetch post https://httpbin.org/post '{"hello":"world"}'
# Extract and chain
pipefetch get /repos/praneshnikhar/pipefetch --extract .owner.login |
pipefetch get "/users/{.}" --extract .name
# Check status in CI
pipefetch get https://api.example.com/health --status
# JSON report for scripting
pipefetch get /users --json | jq '.body | length'
# Abbreviated response
pipefetch get /users --extract '[0].name'cargo test
cargo clippy
cargo fmtGPL-3.0