A convenient HTTP CLI with expressive inline request syntax.
get starts simple (GET a URL) and scales to real request building with:
- headers (
Header:Value) - query params (
name==value) - body fields (
path=value) - typed JSON values (
path:=json)
brew install jclem/tap/getOr run directly in this repo:
cargo run -- <args># Plain GET
get https://httpbin.org/get
# Add a header
get https://httpbin.org/headers Authorization:Bearer_token
# Add query params
get https://httpbin.org/get q==rust page==1
# Send a JSON body (auto-switches method to POST)
get https://httpbin.org/anything title=ship-itEvery extra argument after the URL is parsed as one of these forms:
| Form | Meaning | Example |
|---|---|---|
Header:Value |
Request header | Accept:application/json |
name==value |
Query parameter | q==hello |
path=value |
Body string assignment | title=fix-parser-docs |
path:=json |
Body typed JSON assignment | count:=10, enabled:=true |
Parser precedence is:
path:=jsonname==valueHeader:Valuepath=value
This matters when syntax could overlap.
Use : to set headers:
get https://api.example.com/me \
Authorization:Bearer_sk_live_123 \
X-Trace-Id:abc-123Notes:
- Header names allow letters, numbers,
-, and_. - Header values may contain additional
:characters. - Repeating a header name is appended.
Use == to append query params:
get https://api.example.com/search \
q==observability \
sort==updated \
tag==rust \
tag==cliResulting URL contains repeated keys when repeated in input (for example tag=rust&tag=cli).
Notes:
- Query names can contain almost any character except
=. - Empty values are allowed (for example
q==).
= always stores a JSON string value:
get https://api.example.com/issues \
title=fix-login-redirect \
meta.priority=highBody produced:
{
"title": "fix-login-redirect",
"meta": {
"priority": "high"
}
}:= parses the right side as JSON:
get https://api.example.com/issues \
count:=10 \
is_draft:=false \
'labels:=["bug","urgent"]' \
'owner:={"id":42,"name":"jules"}'Body produced:
{
"count": 10,
"is_draft": false,
"labels": ["bug", "urgent"],
"owner": {
"id": 42,
"name": "jules"
}
}path supports nested objects and arrays:
# Nested object keys
project.name=apollo
# Bracket keys (useful for special chars)
project[build.version]=v1
# Array append
items[]=a
items[]=b
# Array index
items[0]=first
items[2]=third
# Root array
[]=first
[]=secondget -X POST https://api.example.com/tasks \
Authorization:Bearer_token \
X-Request-Id:req-123 \
expand==owner \
expand==labels \
title=write-readme \
priority:=2 \
labels:=["docs","cli"] \
owner[id]:=42- Default method is
GET. - If body input exists (
=or:=) and no-X/--methodis set, method becomesPOST. -X/--methodalways wins.
Examples:
# Auto POST because body exists
get https://httpbin.org/anything title=hello
# Force GET even with body
get -X GET https://httpbin.org/anything title=helloget can send requests over Unix domain sockets using two URL formats:
unix:<socket>:<path>— explicit prefix/<socket>:<path>— shorthand (any URL starting with/)
If <path> is omitted, it defaults to /.
# GET / on a Unix socket
get unix:/tmp/app.sock
# GET /health on a Unix socket
get unix:/tmp/app.sock:/health
# Shorthand form
get /tmp/app.sock:/health
# POST with body
get /tmp/app.sock:/api/items title=hello# Show request + response headers
get -v https://httpbin.org/get
# Print request and exit (no network call)
get --dry-run https://httpbin.org/post title=preview
# Send body as x-www-form-urlencoded instead of JSON
get --form https://httpbin.org/post title=hello meta[level]:=2
# Stream response body as it arrives
get --stream https://httpbin.org/stream/20
# Disable response body output
get -B https://httpbin.org/get
# Disable response formatting + syntax highlighting
get -H https://httpbin.org/jsonget can persist selected headers per host/session and manage profiles:
# Show session/profile commands
get session --help
get profile --help
# Switch active profile
get session switch work
# Inspect a saved session
get session show api.example.comTo edit config (including session-headers):
get config editExample config snippet:
session-headers = ["Authorization", "x-api-key"]
[sessions."api.example.com"]
session-headers = ["x-session-token"]When requesting api.example.com, host-specific session-headers replace the global list (no merge).
get completions zsh
get completions bash
get completions fish- With
:=, JSON must be valid. Use JSON strings when needed:name:='"alice"'. - Use
--dry-runwhen building complex request syntax to verify the final request before sending. - Response formatting (JSON/HTML) and syntax highlighting are enabled only when stdout is a TTY;
-H/--no-highlightdisables both.