OS Manuals

/usr/local/bin/trurl

trurl is a command line tool for URL parsing and manipulation.

From trurl 0.16.1-r3 (os), captured 2026-11-05 by running trurl --help (exit 0). permalink

Usage: trurl [options] [URL]
  -a, --append [component]=[data]  - append data to component
      --accept-space               - give in to this URL abuse
      --as-idn                     - encode hostnames in idn
      --curl                       - only schemes supported by libcurl
      --default-port               - add known default ports
  -f, --url-file [file/-]          - read URLs from file or stdin
  -g, --get [{component}s]         - output component(s)
  -h, --help                       - this help
      --iterate [component]=[list] - create multiple URL outputs
      --json                       - output URL as JSON
      --keep-port                  - keep known default ports
      --no-guess-scheme            - require scheme in URLs
      --punycode                   - encode hostnames in punycode
      --qtrim [what]               - trim the query
      --query-separator [letter]   - if something else than '&'
      --quiet                      - Suppress (some) notes and comments
      --redirect [URL]             - redirect to this
      --replace [data]             - replaces a query [data]
      --replace-append [data]      - appends a new query if not found
  -s, --set [component]=[data]     - set component content
      --sort-query                 - alpha-sort the query pairs
      --url [URL]                  - URL to work with
      --urlencode                  - show components URL encoded
  -v, --version                    - show version
      --verify                     - return error on (first) bad URL
 URL COMPONENTS:
  url, scheme, user, password, options, host, port, path, query, fragment, zoneid
Options (24)
OptionDescriptionSource
-a, --append component]=[data- append data to componenthelp
--accept-spaceWhen set, trurl tries to accept spaces as part of the URL and instead URL encode such occurrences accordingly.help + man
--as-idnConverts a punycode ASCII hostname to its original International Domain Name in Unicode.help + man
--curlOnly accept URL schemes supported by libcurl.help + man
--default-portWhen set, trurl uses the scheme's default port number for URLs with a known scheme, and without an explicit port number.help + man
-f, --url-file file/-- read URLs from file or stdinhelp
-g, --get component}s- output component(s)help
-h, --helpShow the help output.help + man
--jsonOutputs all set components of the URLs as JSON objects.help + man
--keep-portBy default, trurl removes default port numbers from URLs with a known scheme even if they are explicitly specified in the input URL.help + man
--no-guess-schemeDisables libcurl's scheme guessing feature.help + man
--punycodeUses the punycode version of the hostname, which is how International Domain Names are converted into plain ASCII.help + man
--qtrim what- trim the queryhelp
--query-separator letter- if something else than '&'help
--quiet- Suppress (some) notes and commentshelp + man
--redirect URL- redirect to thishelp
--replace data- replaces a query [data]help
--replace-append data- appends a new query if not foundhelp
-s, --set component]=[data- set component contenthelp
--sort-queryThe "variable=content" tuplets in the query component are sorted in a case insensitive alphabetical order.help + man
--url URLSet the input URL to work with.help + man
--urlencodeOutputs URL encoded version of components by default when using --get or --json.help + man
-v, --versionShow version information and exit.help + man
--verifyWhen a URL is provided, return error immediately if it does not parse as a valid URL.help + man
Exit status (12) from the manual page
1A problem with --url-file
2A problem with --append
3A command line option misses an argument
4A command line option mistake or an illegal option combination.
5A problem with --set
6Out of memory
7Could not output a valid URL
8A problem with --qtrim
9If --verify is set and the input URL cannot parse.
10A problem with --get
11A problem with --iterate
12A problem with --replace or --replace-append
Examples (16) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.