Modern Replacements for curl

Replace curl with xh, HTTPie, curlie or Posting: HTTPie-style request syntax, formatted output, and a TUI option for saved requests.

Updated

short verdict

Pick xh if you want HTTPie-style syntax in a single Rust binary, or HTTPie if you want the original with sessions and offline mode. Pick curlie when you need every curl option kept intact, since it runs curl underneath. Posting suits interactive API work in a terminal UI, not one-line scripted calls.

curl takes a URL plus flags for methods, headers and bodies. Most replacements here swap that for HTTPie's request-item syntax (`=`, `==`, `:`) and add formatted, colorized output. They differ in implementation: xh reimplements HTTPie in Rust, HTTPie is the Python original, curlie wraps curl itself, and Posting is a full-screen TUI with saved requests.

this page is for

  • Developers who type JSON API requests by hand and want shorter syntax than curl -d
  • Teams that want saved, version-controlled requests instead of shell history
  • curl users who want nicer output without losing any curl flags
#1

xh

★ 8.2kRust
details

Reimplements HTTPie's syntax in Rust and switches to strict HTTPie compatibility when invoked as `http` or `https`.

best for

  • HTTPie syntax with a Rust binary
  • Replacing HTTPie in existing scripts
  • Quick calls to localhost services

strengths

  • Supports HTTP/2 and HTTP/3, digest, basic and bearer auth, and resumable downloads
  • `:3000/users` shorthand expands to `localhost:3000/users`; `xhs` defaults to HTTPS
  • Can print the equivalent curl command and generate shell completions
  • Installs with `brew install xh`, `cargo install xh --locked` or apt

weaknesses

  • Not curl-flag compatible; you learn HTTPie's request-item syntax instead
  • Reimplementation of HTTPie, so behavior follows HTTPie rather than curl
#2

HTTPie

★ 38.7kPython
details

The original `http` and `https` commands, with formatted output, native JSON, persistent sessions and an offline mode.

best for

  • Testing REST APIs by hand
  • Workflows that reuse sessions across requests
  • Inspecting a request before sending it

strengths

  • Request syntax like `http PUT api.example.com/users/1 name=John` sends JSON natively
  • Persistent sessions keep state across requests
  • Offline mode builds and shows a request without sending it
  • Includes wget-style downloads, form and file uploads, and proxy support

weaknesses

  • Python application, so it needs a Python runtime, unlike a single binary
  • Does not take curl flags; existing curl commands must be rewritten
#3

curlie

★ 3.7kGo
details

A Go frontend that passes requests to curl, so HTTPie-style syntax sits on top of the full curl option set.

best for

  • Keeping all curl options and behavior
  • Debugging streamed responses
  • Seeing exactly which curl command runs

strengths

  • Runs through curl, so all curl options and performance characteristics carry over
  • Formats on the fly without buffering, which suits streamed data
  • `--curl` shows the underlying curl command
  • Installs via Homebrew, Scoop or `go install`

weaknesses

  • Requires curl underneath
  • Writes headers to stderr rather than stdout, which differs from HTTPie
#4

posting

★ 12.6kPython
details

A Textual-based TUI HTTP client that stores requests as YAML files and is driven by keyboard, closer to Postman than to curl.

best for

  • Building and organizing API requests in a terminal
  • Sharing request collections through version control
  • Working over SSH

strengths

  • Requests live in local YAML files, easy to commit and share
  • Imports and exports curl commands, Postman collections and OpenAPI specs
  • Environment variables, templating, and Python code before and after requests
  • Vim keybindings, jump mode, command palette and $EDITOR/$PAGER support

weaknesses

  • Full-screen interface; it is not a one-line command you pipe in shell scripts
  • Needs Python 3.13 when installed with `uv tool install --python 3.13 posting`

What changes compared to curl

  • Syntax: HTTPie-style items such as `name=John` (JSON field), `==` (query string) and `:` (header) replace -d and -H.
  • Output: HTTPie and xh format and colorize responses; curlie pretty-prints JSON when output is interactive.
  • Headers: curlie writes them to stderr, not stdout, and formats without buffering.
  • Offline mode: HTTPie builds and inspects a request without sending it.
  • Storage: Posting keeps requests in YAML files and imports curl commands, instead of relying on shell history.

Switching from curl

Some tools document ways to bridge from curl.

  • curlie accepts all curl options since it runs curl, and `--curl` prints the command it executes.
  • xh can print the equivalent curl command, which helps translate requests in both directions.
  • Posting imports curl commands, so an existing command becomes a saved YAML request.
  • xh invoked as `http` or `https` runs in strict HTTPie compatibility mode.

When not to use these

  • You need identical curl flags and output in scripts across machines where none of these tools is installed.
  • You only need a minimal request on a host where installing Python, Rust or Go tooling is not an option.

FAQ

Are these tools drop-in replacements for curl in scripts?
Not documented as such. xh, HTTPie and Posting use different syntax, so curl commands need rewriting. curlie accepts curl options because it runs curl, though its stderr header output differs. xh is documented as a drop-in replacement for HTTPie, not curl.
Which tool is fastest?
xh is the one that states a performance focus, as a Rust reimplementation of HTTPie. curlie keeps curl's performance characteristics because it runs curl. No benchmark numbers are provided.
Can I see the curl command behind a request?
Yes. curlie's `--curl` option shows the curl command it executes, and xh can output curl command translations.
Is there a terminal UI alternative to curl?
Posting is a TUI HTTP client with keyboard navigation, YAML request storage, and import of curl commands.

related