curl
$ curl Foundation Med Riskcurl transfers data across HTTP/HTTPS, FTP, and dozens of protocols from any shell. With -sS, -f, and --write-out (-w), coding agents can inspect status codes, headers, and JSON payloads deterministically without interactive prompts.
brew install curl curl is pre-installed almost everywhere and beats MCP wrappers for ad-hoc REST debugging, header inspection, and piping responses into jq.
Agent-Readiness Checklist
Local Probe EvidenceCaptured --help excerpt
Usage: curl [options...] <url> -d, --data <data> HTTP POST data -f, --fail Fail fast with no output on HTTP errors -h, --help <category> Get help for commands -i, --include Include response headers in output -o, --output <file> Write to file instead of stdout -O, --remote-name Write output to file named as remote file -s, --silent Silent mode -T, --upload-file <file> Transfer local FILE to destination -u, --user <user:password> Server user and password -A, --user-agent <name> Send User-Agent <name> to server -v, --verbose Make the operation more talkative -V, --version Show version number and quit This is not the full help, this menu is stripped into categories. Use "--help category" to get an overview of all categories. For all options use the manual or "--help all".
FCRS-1.0 6-Dimension Breakdown
Deterministic non-interactive execution with -sS, -f, --max-time, and --write-out (%{http_code}), though raw output requires jq for structured filtering.
- Supports
-fsS,-w '%{http_code}', and--json(7.82+)
Read-only GET/HEAD by default unless -X POST/PUT/DELETE or -d is passed; --netrc and -v require care around secrets.
- Default invocation performs HTTP GET without mutating remote state
Pre-installed across virtually all macOS, Linux, Windows, and container environments.
- Ubiquitous system binary with zero runtime dependencies
Universal Swiss-army knife for HTTP, TLS, redirect tracing, and API smoke checks.
- Handles HTTP/1.1, HTTP/2, HTTP/3, TLS inspection, and multipart uploads
Decades-long active maintenance by Daniel Stenberg and the curl/curl project.
- Official
curl/curlrepository with rapid security releases
Exhaustive man page (--help all) and canonical online documentation.
- Official documentation at curl.se/docs/manpage.html
Security, Auth & Guardrails
Supports .netrc or explicit -H "Authorization: Bearer $TOKEN" headers; credentials are never persisted by default.
Free, open-source, and pre-installed on macOS, Linux, and modern Windows.
# curl Agent Rules - Always pass `-fsS` and `--max-time <seconds>` so progress bars stay off and hung sockets time out cleanly. - Never print `$Authorization` headers with `-v` into shared logs; pipe JSON bodies through `jq` before reading.
Agent-Ready Command Recipes
Safe Read-Only Queries
curl -fsS -w '\nHTTP_STATUS:%{http_code}\n' https://api.github.com/zen Hides progress meters (-sS), fails on HTTP >= 400 (-f), and appends the status code via -w.
curl -fsSI https://example.com
Sends a HEAD request (-I) to check redirects, caching headers, and content types without downloading bodies.
Controlled Writes & Previews
curl -fsS --max-time 15 -X POST -H 'Content-Type: application/json' -d '{"ping":true}' https://httpbin.org/post Posts a JSON payload with bounded execution time (--max-time 15) and non-zero exit on error.
Strengths for Agents
- + Pre-installed nearly everywhere with zero setup overhead.
- +
-fsSplus--max-timeprevents progress-bar noise and indefinite hangs. - +
--write-out(-w) exposes status codes, timings, and redirect URLs cleanly.
Caveats & Pitfalls
- ! Does not pretty-print or filter JSON natively; pair with
jq. - ! Verbose
-vlogs include sensitiveAuthorizationheaders unless redacted.