Skip to content
gurl detect

gurl detect

Parse a curl command from stdin or a file and save it as a named request.

Synopsis

gurl detect [--file <path>] [--name <name>] [--collection <name>]

Flags

FlagShortDefaultDescription
--file-fstdinRead the curl command from a file instead of stdin
--name-nnoneName for the detected request
--collection-cnoneAssign to a collection

Aliases

  • parse

Examples

Parse a curl command from stdin

echo 'curl -X POST https://api.example.com/orders -H "Content-Type: application/json" -d "{}"' \
  | gurl detect --name create-order

Parse a command saved in a file

gurl detect --file ./request.txt --name "my-request" --collection api

Paste from the clipboard (macOS)

pbpaste | gurl detect --name from-browser

Related commands