# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, winget 安装 trurl

查看 trurl 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:trurl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install trurl
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install trurl
```

  证据: MacPorts ports tree: net/trurl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add trurl
```

  证据: Alpine Linux edge package indexes: trurl from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install trurl
```

  证据: Debian stable package indexes: trurl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install trurl
```

  证据: Fedora Rawhide package metadata: trurl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#trurl
```

  证据: nixpkgs package indexes: pkgs/by-name/tr/trurl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S trurl
```

  证据: Arch Linux sync databases: trurl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install trurl
```

  证据: openSUSE Tumbleweed package metadata: trurl from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- winget (92%):

```sh
winget install --id cURL.trurl -e
```

  证据: Windows Package Manager source index: cURL.trurl from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:trurl
- **软件包管理器:** Homebrew
- **版本:** 0.16.1
- **来源摘要:** Command-line tool for URL parsing and manipulation
- **主页:** <https://curl.se/trurl/>
- **仓库:** <https://github.com/curl/trurl>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- trurl (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.16.1
## 项目历史与用法

trurl is a curl-adjacent command-line tool for parsing, normalizing, extracting, and modifying URLs using libcurl's URL parser.

### 项目历史

Daniel Stenberg introduced trurl in April 2023 as a small command-line tool in the spirit of Unix 'tr', but for URLs. He wrote that it was created on March 31, 2023 to help shell script authors avoid repeatedly inventing unsafe or inconsistent URL parsing.

The curl project page positions trurl as a companion to curl: it uses libcurl's URL parser, so it understands URLs the same way curl does. That makes it especially useful in scripts that already rely on curl and need to manipulate URLs before passing them to other tools.

The GitHub repository stayed intentionally compact: C source, tests, a man page, release notes, and compatibility notes around libcurl versions. Releases on curl.se and GitHub turned it from a fresh helper into a packaged utility available through Homebrew and multiple Unix distributions.

### 采用历史

trurl was adopted in the curl ecosystem because URLs are deceptively hard to parse correctly in shell. Instead of sed, awk, cut, or hand-rolled regular expressions, users can ask trurl for structured URL parts, normalized URLs, redirects, query edits, or JSON output.

Its package-manager spread is unusually broad for a young utility: the input package facts list Homebrew, Debian, Ubuntu, Fedora, Alpine, Arch, Nix, MacPorts, and openSUSE-style packages, matching its role as a small Unix command that distribution maintainers can ship easily.

### 使用方式

trurl can change hosts, schemes, ports, paths, query strings, and fragments; append path or query components; trim tracking parameters; sort query pairs; handle redirects; read URLs from files or stdin; and emit JSON for scripts.

For package nerds, the appeal is that trurl is a purpose-built URL transformer that composes cleanly with curl, xargs, shell pipelines, package build scripts, and CI jobs without pulling in a heavier language runtime.

### 为什么软件包爱好者会关心

trurl is significant because it packages a common but error-prone scripting task into a tiny, curl-family binary. It is the sort of tool that shows up in dotfiles, release scripts, URL cleanup jobs, and packaging automation once people stop trusting ad hoc regex parsing.

Its libcurl dependency also matters: package maintainers can reason about its URL behavior in terms of the same parser used by curl, while its compatibility table documents which libcurl versions enable which features.

### 时间线

- 2023-03-31: Daniel Stenberg creates trurl.
- 2023-04-03: Stenberg publishes the introductory trurl article.
- 2024-09-12: Stenberg describes trurl as maturing in the 0.15.1 release notes.
- 2025-05-12: curl.se lists trurl 0.16.1 as the current download.

### Related projects

- curl is the command-line tool trurl is designed to complement.
- libcurl provides the URL parser used by trurl.
- wcurl is another small curl.se-listed command-line companion tool.

### 来源

- <https://curl.se/trurl/>
- <https://daniel.haxx.se/blog/2023/04/03/introducing-trurl/>
- <https://daniel.haxx.se/blog/2024/09/12/trurl-0-15-1/>
- <https://github.com/curl/trurl>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - trurl - 0.16.1-1: normalized package name match | Debian stable package indexes: trurl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command line tool for URL parsing and manipulation | https://github.com/curl/trurl
- Nix - trurl: normalized package name match | nixpkgs package indexes: pkgs/by-name/tr/trurl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - trurl - 0.9-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: trurl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command line tool for URL parsing and manipulation | https://github.com/curl/trurl
- apk - trurl - 0.16.1-r1: normalized package name match | Alpine Linux edge package indexes: trurl from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | command line tool for URL parsing and manipulation | https://curl.se/trurl/
- apk - trurl-doc - 0.16.1-r1: normalized package name match | Alpine Linux edge package indexes: trurl-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | command line tool for URL parsing and manipulation (documentation) | https://curl.se/trurl/
- dnf - trurl - 0.16.1-6.fc45: normalized package name match | Fedora Rawhide package metadata: trurl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Command line tool for URL parsing and manipulation | https://curl.se/trurl
- pacman - trurl - 0.16.1-1: normalized package name match | Arch Linux sync databases: trurl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command line tool for URL parsing and manipulation | https://github.com/curl/trurl
- zypper - trurl - 0.16.1-4.3: normalized package name match | openSUSE Tumbleweed package metadata: trurl from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Command line tool for URL parsing and manipulation | https://curl.se/trurl
- zypper - trurl-zsh-completion - 0.16.1-4.3: normalized package name match | openSUSE Tumbleweed package metadata: trurl-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh Completion for trurl | https://curl.se/trurl
- MacPorts - trurl: normalized package name match | MacPorts ports tree: net/trurl/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - cURL.trurl: normalized package name match | Windows Package Manager source index: cURL.trurl from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/trurl.yml](https://github.com/mxcl/pkgdb/blob/main/combined/trurl.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
