Cheat Sheet
The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.
curl
Make HTTP requests from the terminal - test APIs, download files, debug.| Command | What it does | Example |
|---|---|---|
curl <url> | GET a URL and print the response. | curl https://api.github.com/zen |
curl -s | Silent: hide the progress meter. | curl -s https://api.github.com |
curl -o | Save the response to a named file. | curl -o page.html https://example.com |
curl -O | Save using the remote file name. | curl -O https://example.com/app.zip |
curl -L | Follow redirects. | curl -L https://github.com |
curl -I | Fetch only the response headers. | curl -I https://example.com |
curl -X POST -d | POST a JSON body. | curl -X POST -H "Content-Type: application/json" -d '{"name":"Ana"}' https://api.example.com/users |
curl -d (form) | POST form-encoded data. | curl -d "user=ana&pw=s3cret" https://api.example.com/login |
curl -H (header) | Send a custom header, e.g. auth. | curl -H "Authorization: Bearer ghp_abc123" https://api.github.com/user |
curl -u | Use HTTP basic auth. | curl -u ana:s3cret https://api.example.com |
curl -X PUT | Send a PUT request. | curl -X PUT -H "Content-Type: application/json" -d '{"active":true}' https://api.example.com/users/5 |
curl -X DELETE | Send a DELETE request. | curl -X DELETE https://api.example.com/users/5 |
curl -v | Verbose: see the full request and response. | curl -v https://example.com |
curl --max-time | Give up after N seconds. | curl --max-time 10 https://example.com |