trurl for Mac
Command-line tool for URL parsing and manipulation
trurl — overview
Command line tool for URL parsing and manipulation
Examples
Replace the hostname of a URL:
Create a URL by setting components:
Redirect a URL:
Change port number:
Extract the path from a URL:
Extract the port from a URL:
Append a path segment to a URL:
Append a query segment to a URL:
Read URLs from stdin:
Output JSON:
Remove tracking tuples from query:
Show a specific query key value:
Sort the key/value pairs in the query component:
Work with a query that uses a semicolon separator:
Accept spaces in the URL path:
Install
Linux
It is quite easy to compile the C source with GCC:
trurl is also available in some package managers. If it is not listed you can try searching for it using the package manager of your preferred distribution.
Windows Download and run Cygwin installer. Follow the instructions provided by the installer. When prompted to select packages, make sure to choose the following: curl, libcurl-devel, libcurl4, make and gcc-core. (optional) Add the Cygwin bin directory to your system PATH variable. Use make, just like on Linux.
Prerequisites
Development files of libcurl (e.g. libcurl4-openssl-dev or libcurl4-gnutls-dev) are needed for compilation. Requires libcurl version 7.62.0 or newer (the first libcurl to ship the URL parsing API).
trurl also uses CURLUPART_ZONEID added in libcurl 7.81.0 and curl_url_strerror() added in libcurl 7.80.0
It would certainly be possible to make trurl work with older libcurl versions if someone wanted to.
Older libcurls
trurl builds with libcurl older than 7.81.0 but will then not work as well. For all the documented goodness, use a more modern libcurl.
trurl / libcurl Compatibility
For more details on how trurl will behave if these features are missing see URL Quirks. To see the features your version of trurl supports as well as the version of libcurl it is built with, run the following command: trurl --version
Details
用于 URL 解析和操作的命令行工具
How to install trurl
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2025-05-12; current version trurl-0.16.1, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| trurl-0.16.1 | 2025-05-12 | Stable | 63 KB | Download | — | — |
| trurl-0.16 | 2024-09-19 | Stable | 58 KB | — | — | — |
| trurl-0.15.1 | 2024-09-12 | Stable | 53 KB | — | — | — |
| trurl-0.15 | 2024-08-28 | Stable | 53 KB | — | — | — |
| trurl-0.14 | 2024-07-29 | Stable | — | — | — | — |
| trurl-0.13 | 2024-05-15 | Stable | — | — | — | — |
| trurl-0.12 | 2024-04-18 | Stable | — | — | — | — |
| trurl-0.11 | 2024-04-18 | Stable | — | — | — | — |
| trurl-0.10 | 2024-02-19 | Stable | — | — | — | — |
| trurl-0.9 | 2023-10-31 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| trurl | trurl-0.16.1 | curl | CLI | 4 |
| cpptoml | v0.1.1 | MIT | CLI | 915 |
| perl-xml-parser | 2.59 | Artistic-2.0 | CLI | 17 |
| libicns | 0.8.1 | LGPL-2.0-or-later OR LGPL-2.1-or-later | CLI | 6 |
Similar apps: Command-line Tools
cpptoml
cpptoml A header-only library for parsing TOML configuration files.perl-xml-parser
XML::Parser - A perl module for parsing XML documentslibicns
libicns is a command-line tool library specifically designed for handling the macOS .byteman
Byteman is a bytecode manipulation tool for Java developers and testers, whose core purpose is…tuc
tuc (when cut doesn't cut it)openssl@4
Cryptography and SSL/TLS ToolkitCategories: Command-line Tools