curst, a TUI API client written in RustThe API client
that stays in your terminal.
Like curl, with a memory. Send HTTP requests from a fast Rust TUI, keep them as plain files next to your code, and keep the secrets out of them. No account, no cloud, no telemetry.
$ npm install -g @curst/cli
┌ Collections ────── staging ┐ GET List orders Ctrl+G tabs Ctrl+T new Ctrl+W close │▾ Shop │┌ Method ─┐┌ List orders ────────────────────────────────────────────────┐ │ POST Log in ││ GET ││{{base_url}}/orders │ │ ▾ orders │└─────────┘└─────────────────────────────────────────────────────────────┘ │ GET List orders │┌ Request Params Headers Body Auth ─────────────────────────────────┐ │ GET Get order ││ Parameter Value │ │ POST Create order ││[x] status paid │ │ DEL Cancel order ││[x] limit 2 │ │ ▾ products ││ │ │ GET Search products ││ │ │ PUT Update product ││ │ │ ▸ customers ││ │ │ │└────────────────────────────────────────────────────────────────────────┘ │ │┏ Response Body Headers Timing Raw ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ │┃{ ┃ │ │┃ "items": [ ┃ │ │┃ { ┃ │ │┃ "id": "ord_7Hq2", ┃ │ │┃ "status": "paid", ┃ │ │┃ "total": 129.5, ┃ │ │┃ "currency": "EUR", ┃ │ │┃ "customer": { ┃ │ │┃ "id": "cus_41", ┃ └────────────────────────────┘┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 200 · 142.0 ms · 282 B ┛ ←→ tab ↑↓ scroll s save y copy body Ctrl+R send Ctrl+S save Ctrl+E environments Ctrl+O settings Ctrl+P commands F1 help Ctrl+C quit
Your requests are files you can read.
One request per TOML file, a folder per folder. Diff them, review them, commit them. Put a .curst/ folder in a project and the whole team opens the same collection. It stays untrusted until you say so, so a repository can never send your secrets anywhere.
collections/shop/
collection.toml
environments/
staging.toml
production.toml
orders/
folder.toml
list-orders.toml
create-order.toml
# orders/list-orders.toml name = "List orders" method = "GET" url = "{{base_url}}/orders" [[params]] name = "status" value = "paid"
Secrets go where you say, and nowhere else.
Values live in the OS keychain or in a file encrypted with a passphrase, never in the collection. Each secret is approved for an origin, so a token for staging is not sent to production by accident, and a redirect elsewhere stops instead of carrying it along. A credential typed in as plain text is flagged; one key turns it into a secret.
┌ Collections ─── production ┐ GET List orders Ctrl+G tabs Ctrl+T new Ctrl+W close │▾ Shop │┌ Method ─┐┌ List orders ────────────────────────────────────────────────┐ │ POST Log in ││ GET ││{{base_url}}/orders │ │ ▾ orders │└─────────┘└─────────────────────────────────────────────────────────────┘ │ GET List orders │┌ Request Params Headers Body Auth ─────────────────────────────────┐ │ GET Get order ││ Parameter Value │ │ POST Create ┏ Send secrets? ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ │ DEL Cancel ┃This request would send these secrets for the first time to ┃ │ │ ▾ products ┃https://api.shop.dev ┃ │ │ GET Search ┃ ┃────────────────┘ │ PUT Update ┃token (environment) ┃━━━━━━━━━━━━━━━━┓ │ ▸ customers ┃ ┃ ┃ │ ┃ y send them there, now and later n don't send ┃ ┃ │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┃ │ │┃ "id": "ord_7Hq2", ┃ │ │┃ "status": "paid", ┃ │ │┃ "total": 129.5, ┃ └────────────────────────────┘┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 200 · 142.0 ms · 282 B ┛ y send n don't send Ctrl+C quit
Point it at a spec, or at the docs page.
OpenAPI 3.0, 3.1 and Swagger 2.0, from a file, a folder or a URL. Give it a Swagger UI or Redoc page and curst finds the spec behind it. Tags become folders, servers become environments, security schemes become auth. When the spec changes, u shows what is new, what changed and what is gone, and you pick what to take. A curl command pastes in too.
┌ Collections ───────────────┐ GET new request Ctrl+G tabs Ctrl+T new Ctrl+W close │▾ Shop │┌ Method ─┐┏ URL ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ POST Log in ││ GET │┃ https://example.com/api, then Enter to send ┃ │ ▸ orders │└─────────┘┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ ▸ products │┌ Request Params Headers Body Auth ─────────────────────────────────┐ │ ▸ cu┏ Import Store ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ │ ┃4 requests in 1 folder, from https://api.shop.dev/docs ┃ │ │ ┃2 servers, an environment each, each holding the variables ┃ │ │ ┃secrets to fill in after: x_api_key, access_token, token ┃──────┘ │ ┃ ┃──────┐ │ ┃1 example value looked like a credential and was left out: ┃ │ │ ┃ List orders: access_token, the name suggests a credential ┃ │ │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ │ ││ │ │ ││ │ └────────────────────────────┘└────────────────────────────────────────────────────────────────────────┘ Enter import ↑↓ scroll Esc cancel Ctrl+C quit
Log in once. Every request after uses it.
Set auth on a collection or folder and its requests inherit it. A workflow sends a few requests in order and keeps values from the answers: log in, keep $.access_token as {{token}}, and the next request carries it.
┌ Collections ────── staging ┐ GET List orders Ctrl+G tabs Ctrl+T new Ctrl+W close │▾ Shop │┌ Method ─┐┌ List orders ────────────────────────────────────────────────┐ │ POST Log in ││ GET ││{{base_url}}/orders │ │ ▾ orders │└─────────┘└─────────────────────────────────────────────────────────────┘ │ GET List orders │┌ Request Params Headers Body Auth ─────────────────────────────────┐ │ GET Get order ││ Parameter Value │ │ POST Cr┏ Log in ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ │ DEL Ca┃ 200 Log in → {{token}} ┃ │ │ ▾ product┃ · List orders ┃───────────┘ │ GET Se┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛━━━━━━━━━━━┓ │ PUT Update product │┃{ ┃ │ ▸ customers │┃ "items": [ ┃ │ │┃ { ┃ └────────────────────────────┘┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 200 · 142.0 ms · 282 B ┛ Esc close Ctrl+C quit
The same requests, from a script or CI.
curst run sends a saved request with its variables, inherited auth and secrets. The body goes to stdout, so it pipes; the status goes to stderr; the exit code tells you what happened.
$ curst run shop/orders/list-orders --env staging | jq '.items[0].id' HTTP/2 200 · 142 ms "ord_7Hq2"
- 0
- answered 1xx, 2xx or 3xx
- 1
- answered 4xx or 5xx
- 2
- no such request, an undefined variable, a secret not approved
- 3
- not sent: the connection failed or timed out
Easy on day one. Fast on day one hundred.
Ctrl+P finds every action and every saved request. The footer always shows the keys that work where you are, and the mouse works too. Prefer vim? Switch the preset and curst turns modal, with hjkl, gg, ciw and :wq. Every key can be rebound in config.toml, and themes are a few lines of TOML.
┌ Collections ───────────────┐ GET new request Ctrl+G tabs Ctrl+T new Ctrl+W close │▾ Shop │┌ Method ─┐┏ URL ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ POST Log in ││ GET │┃ https://example.com/api, then Enter to send ┃ │ ▾ orders │└─────────┘┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ GET List o┏ Commands and requests ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓───────────────┐ │ GET Get or┃orders ┃ │ │ POST Create┃ GET Shop › orders › List orders open ┃ │ │ DEL Cancel┃ GET Shop › orders › Get order open ┃ │ │ ▸ products ┃ POST Shop › orders › Create order open ┃───────────────┘ │ ▸ customers ┃ DELETE Shop › orders › Cancel order open ┃───────────────┐ │ ┃ the settings of the collection or folder global.collection-settings ┃ │ │ ┃ GET Shop › products › Search products open ┃ │ │ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ └────────────────────────────┘└────────────────────────────────────────────────────────────────────────┘ ↑↓ choose Enter run Esc close Ctrl+C quit
┌ Collections ────── staging ┐ GET List orders Ctrl+G tabs Ctrl+T new │▾ Shop │┌ Method ─┐┌ List orders ────────────────────────────────────────────────┐ │ POST Log in ││ GET ││{{base_url}}/orders │ │ ▾ orders │└─────────┘└─────────────────────────────────────────────────────────────┘ │ GET List orders │┌ Request Params Headers Body Auth ─────────────────────────────────┐ │ GET Get order ││ Parameter Value │ │ POST Create order ││[x] status paid │ │ DEL Cancel order │└────────────────────────────────────────────────────────────────────────┘ │ ▾ products │┏ Response Body Headers Timing Raw ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │ GET Search products │┃{ ┃ │ PUT Update product │┃ "items": [ ┃ └────────────────────────────┘┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 200 · 142.0 ms · 282 B ┛ :wq Ctrl+C quit
A curl you can keep, a Postman without the cloud.
Is curst a curl alternative?
It sends HTTP requests like curl does, and it keeps them. Import a curl command and it becomes a saved request; press C on any request to copy it back out as a curl command. From scripts, curst run sends a saved request the way you would call curl, body to stdout and status to stderr.
Is it a Postman or Insomnia alternative?
Yes, for the terminal. Collections, folders, environments, variables, inherited auth, login workflows and OpenAPI import, without an account or a cloud. A collection is a folder of TOML files, so sharing one is a commit or a single exported bundle.
What is it written in?
Rust, with a TUI drawn by ratatui. It ships as one binary for macOS, Linux and Windows, and installs with npm, a shell script, PowerShell or an MSI.
Is it free?
Yes. curst is free and open source under the MIT license. There is no account, no paid tier and no telemetry.
Does it work over SSH or on a server?
Yes, it runs in any terminal. Where there is no OS keychain, such as an SSH session on a Linux server, secrets go in a file encrypted with a passphrase instead.
Try it on any URL.
$ npm install -g @curst/cli $ curst
Type https://httpbin.org/get, press Enter. Then read the two-minute tour.