# 使用 Homebrew, apk, MacPorts, Nix, zypper 安装 tuc

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

## 安装

```sh
sudo av install brew:tuc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tuc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tuc
```

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

### Linux

- apk (92%):

```sh
sudo apk add tuc
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#tuc
```

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

- zypper (92%):

```sh
sudo zypper install tuc
```

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

## 软件包事实

- **软件包键:** brew:tuc
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/tuc>
- **版本:** 1.3.0
- **来源摘要:** Text manipulation and cutting tool
- **主页:** <https://github.com/riquito/tuc>
- **仓库:** <https://github.com/riquito/tuc>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://github.com/riquito/tuc/archive/refs/tags/v1.3.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- tuc (cli)
- tuc (别名)

## 构建依赖

- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.3.0
- 本地数据: OK
- 上游仓库: https://github.com/riquito/tuc
- 检测到的最新版本: v1.3.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

tuc is a Rust command-line text cutting tool whose README expands the name as "when cut doesn't cut it". It extends the familiar field-selection niche with multi-character delimiters, negative indexes, field formatting, line/byte/character modes, regex delimiters, JSON output, and memory-conscious options.

### 项目历史

The changelog records tuc 0.1.0 on 2020-05-30 with multi-character delimiter cutting, delimiter compression, delimiter replacement, and omission of non-delimited lines. It reached 1.0.0 in early 2023, when regex support became enabled by default.

Subsequent releases focused on making the small utility more complete without changing its role: 1.1.0 improved errors and documentation, 1.2.0 added JSON output, and 1.3.0 added file-path input, mmap support, fixed-memory line cutting, fallback output for out-of-bounds fields, and performance improvements.

### 采用历史

The README documents installation through Cargo and prebuilt binaries, and thanks community package maintainers for Arch Linux, openSUSE, Homebrew, MacPorts, Debian, Ubuntu, Nix, and other package ecosystems. The supplied package facts also show apk, Homebrew, MacPorts, Nix, and zypper entries.

tuc's adoption pattern is the Rust CLI replacement pattern: it does not replace `cut` for POSIX compatibility, but gives users a packaged tool for cases where `cut` lacks negative fields, regex delimiters, line slicing, JSON output, or custom formatting.

### 使用方式

The README examples show rearranging fields, joining them back with the delimiter, replacing delimiters, selecting ranges, using negative indexes, cutting with regular expressions, emitting JSON, cutting with multi-character delimiters, using greedy delimiter behavior, formatting selected fields, cutting lines, and operating on UTF-8 characters or bytes.

The help text documents stdin and file-path input, `--fixed-memory` for large-line cases, `--no-mmap`, `NO_COLOR` handling, and a no-regex build through `cargo install tuc --no-default-features` for smaller binaries.

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

For package-manager users, tuc is a compact example of a modern Rust CLI that deliberately lives next to a classic Unix command. It is package-worthy because it adds behavior users often script around with awk, sed, cut, perl, or Python one-liners.

Its changelog and README are also unusually explicit about maintainer concerns: binary size, regex default features, generated man pages, community packages, mmap, fixed-memory processing, and dependency removal.

### 时间线

- 2020: 0.1.0 released with multi-character delimiter cutting and delimiter transformation features.
- 2022: 0.11.0 released with MacPorts documentation and generated man page notes.
- 2023: 1.0.0 released with regex support enabled by default.
- 2024: 1.2.0 added JSON output.
- 2025: 1.3.0 added mmap, file-path input, fixed-memory line cutting, and 2x to 5x performance improvements depending on workload.

### Related projects

- The README positions tuc relative to the standard Unix `cut` command.
- The README points to a WebAssembly tuc playground and to Cargo/crates.io distribution.

### 来源

- <https://github.com/riquito/tuc>
- <https://github.com/riquito/tuc/blob/master/CHANGELOG.md>
- official git tags from https://github.com/riquito/tuc
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** tuc
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Nix - tuc: normalized package name match | nixpkgs package indexes: pkgs/by-name/tu/tuc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - tuc - 1.3.0-r0: normalized package name match | Alpine Linux edge package indexes: tuc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | When cut doesn't cut it | https://github.com/riquito/tuc
- zypper - tuc - 1.3.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: tuc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | When cut doesn't cut it | https://github.com/riquito/tuc
- MacPorts - tuc: normalized package name match | MacPorts ports tree: textproc/tuc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [choose-rust](https://pkg.so/zh-hans/brew/choose-rust/) - Shares pkgdb curated category or tags: cli, cut, developer-tools, rust, text-processing.
- [hck](https://pkg.so/zh-hans/brew/hck/) - Shares pkgdb curated category or tags: cli, cut, developer-tools, rust, text-processing.
- [sd](https://pkg.so/zh-hans/brew/sd/) - Shares pkgdb curated category or tags: cli, developer-tools, rust, text-processing.
- [decasify](https://pkg.so/zh-hans/brew/decasify/) - Shares pkgdb curated category or tags: cli, developer-tools, rust, text-processing.
- [counts](https://pkg.so/zh-hans/brew/counts/) - Shares pkgdb curated category or tags: cli, developer-tools, rust, text-processing.
- [chars](https://pkg.so/zh-hans/brew/chars/) - Shares pkgdb curated category or tags: cli, developer-tools, rust, text-processing.
- [srgn](https://pkg.so/zh-hans/brew/srgn/) - Shares pkgdb curated category or tags: cli, developer-tools, rust, text-processing.
- [uv](https://pkg.so/zh-hans/brew/uv/) - Shares pkgdb curated category or tags: cli, developer-tools, rust.

## Combined YAML source

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


## 来源

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