curly

A modern HTTP client for the command line. Curl-like syntax with smart defaults, built-in load testing, and developer-friendly features.

$npm install -g @cwl/curly
View on GitHub

Try it out

Select an example and click Run to see curly in action.

Fetch a single user by ID
$ curly https://curly.dev/api/users/1

Features

Everything you need for HTTP requests and API testing.

Smart Defaults

Auto-sets Content-Type for JSON, infers methods, and parses responses intelligently.

Load Testing

Built-in load testing with concurrency control, histograms, and percentile stats.

Environment Variables

Use {{VAR}} syntax to inject secrets without exposing them in shell history.

Config Profiles

Define named profiles with base URLs, headers, and timeouts. Switch with --profile.

Saved Aliases

Save complex requests with --save and replay them instantly with --use.

Retry & Resilience

Automatic retry with exponential backoff, timeouts, and redirect handling.

Output Control

Save to file with -o, structured JSON output with -j, or custom formats with -w.

Cookie Handling

Send cookies with -b, save response cookies to a jar with --cookie-jar.

Interactive TUI

Live dashboard for load testing with -T. See real-time charts, histograms, and stats.

Form & File Upload

Send multipart form data with -F. Upload files using @file syntax.

Proxy Support

Route requests through HTTP/HTTPS proxy with -x for debugging or corporate networks.

Quick Examples

Common patterns to get you started.

Basic Requests

curly https://api.example.com/users
curly -X POST -d name="Alice" https://api.example.com/users
curly -X DELETE https://api.example.com/users/1

Headers & Auth

curly -H "Authorization: Bearer {{TOKEN}}" https://api.example.com/me
curly -u admin:secret https://api.example.com/admin
curly -i https://api.example.com/users/1

Load Testing

curly -n 1000 -c 50 https://api.example.com/health
curly -n 100 -c 10 -X POST -d test=true https://api.example.com/benchmark

Resilience

curly --retry 3 --retry-delay 1000 https://api.example.com/unstable
curly -t 5000 https://api.example.com/slow
curly -L --max-redirects 5 https://example.com/redirect

Output Control

curly -o response.json https://api.example.com/data
curly -j https://api.example.com/users | jq .
curly -w '%{http_code} %{time_total}s' --quiet https://api.example.com

Cookies & Forms

curly -b "session=abc123" https://api.example.com/me
curly -F name=John -F avatar=@photo.jpg https://api.example.com/upload
curly --cookie-jar cookies.txt https://api.example.com/login

Advanced

curly -x http://proxy:8080 https://api.example.com
curly -n 1000 -T https://api.example.com/health
curly -n 100 -e json -o results.json https://api.example.com

curl vs curly

Same power, less typing.

curlverbose
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"title":"Hello","body":"World"}' \
  https://api.example.com/posts
curlysimple
curly -X POST \
  -d title=Hello \
  -d body=World \
  https://api.example.com/posts

Content-Type is set automatically. JSON is built from key-value pairs.