Automic VaultAutomic Vault

brew

使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, zypper 安装 tre

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install tre

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install tre

MacPorts ports tree · devel/tre/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add tre

Alpine Linux edge package indexes · tre · 来源: dl-cdn.alpinelinux.org

Fedora dnf已验证 · 92%
sudo dnf install tre

Fedora Rawhide package metadata · tre · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#tre

nixpkgs package indexes · pkgs/by-name/tr/tre/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S tre

Arch Linux sync databases · tre · 来源: geo.mirror.pkgbuild.com

Debian apt已验证 · 92%
sudo apt install libtre-dev

Debian stable package indexes · libtre-dev · 来源: deb.debian.org

openSUSE zypper已验证 · 92%
sudo zypper install agrep

openSUSE Tumbleweed package metadata · agrep · 来源: download.opensuse.org

概览

软件包摘要

Lightweight, POSIX-compliant regular expression (regex) library

命令和别名

  • agrep

历史

项目历史与用法

TRE is Ville Laurikari's lightweight POSIX regular-expression matching library with approximate, or fuzzy, matching. In Homebrew it also matters because the package provides the `agrep` executable, an approximate grep-style command built on TRE.

项目历史

The official README presents TRE as a POSIX-compliant regexp matcher focused on robustness, predictable performance, and features uncommon in free POSIX implementations. It advertises approximate matching, strict standard conformance, linear worst-case matching time in the searched text, modest memory use, multibyte and wide-character support, binary data support, thread safety, and portability.

TRE's approximate matching uses edit distance, allowing insertions, deletions, and substitutions with configurable costs. The README notes that TRE's included `agrep` differs from older agrep implementations by allowing full regexps of any length, any number of errors, and non-uniform insertion, deletion, and substitution costs.

The NEWS file records a long release line. Earlier releases added approximate matching syntax, pkg-config support, non-greedy repetition, system ABI support, Unicode and wide-character improvements, Python bindings, command-line `agrep` options, Cygwin and MinGW builds, and license changes. Later releases changed the license to a BSD-style license in 0.7.6, introduced a `tre_`-prefixed ABI in 0.8.0, and added raw byte-vector API variants in 0.9.0.

采用历史

TRE's adoption history is mostly library-driven: C programs and Unix-like systems package it for POSIX regex compatibility plus fuzzy matching. The batch input records package-manager names such as Homebrew `tre`, Debian and Ubuntu `libtre-dev`, MacPorts `tre`, Nix `tre`, and `agrep` packages in apk, dnf, pacman, and zypper.

The split between library package names and `agrep` executable names explains why package catalogs can look inconsistent. Some ecosystems expose the library as TRE, while others emphasize the user-facing approximate grep command.

使用方式

Library users compile and link against TRE for POSIX regex APIs with stronger matching guarantees, approximate matching, multibyte support, and thread-safe execution. The README documents the usual autotools build path through `./utils/autogen.sh`, `./configure`, `make`, `make check`, and `make install`.

Command-line users encounter TRE through `agrep`, which searches approximately rather than requiring exact matches. That makes it useful for typo-tolerant text search, OCR cleanup, fuzzy log investigation, and cases where edit-distance matching is more important than plain regular-expression grep.

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

For package nerds, TRE is a compact example of a C library that survives because it offers a hard-to-replace semantic feature: POSIX-like regular expressions with approximate matching and predictable execution behavior.

The Homebrew formula's significance is partly in the executable it exposes. Installing `tre` gives users `agrep`, a niche but memorable command for fuzzy grep workflows, while also supplying headers and libraries that downstream software can build against.

时间线

  • 0.5.x: NEWS records pkg-config support, system ABI work, minimal repetition operators, and best-match `agrep` mode.
  • 0.7.6: NEWS records license change from LGPL to BSD-style and removal of gnulib due to potential license conflicts.
  • 0.8.0: NEWS records `tre_` prefixes for exported libtre functions and an ABI change.
  • 0.9.0: NEWS records raw byte-vector API variants and updated Visual Studio project files.

Related projects

  • Related to POSIX regex implementations such as Rx, Regex++, and AT&T ast regex, which the README mentions in its discussion of subpattern correctness.
  • Related to earlier agrep implementations by Sun Wu and Udi Manber, which the README contrasts with TRE's included `agrep`.
  • Related to grep-like command-line search tools, but distinguished by edit-distance matching.

来源

  • Batch input fields: source_facts.description, source_facts.executables, source_facts.package-manager
  • Official NEWS file: https://github.com/laurikari/tre/blob/master/NEWS
  • Official README: https://github.com/laurikari/tre#readme

安全态势

风险级别:绿色

library-like package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • library-like package without higher-risk signals

信号

  • metadata:library-like

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 8 个平台目标。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
agrepcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-10
管理器版本0.9.0
管理器更新时间
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/laurikari/tre

  • 信息No package-manager update timestamp was available.低 置信度
  • 信息No cached GitHub release or tag data was available.https://github.com/laurikari/trenone 置信度

安装元数据

软件包元数据

软件包键brew:tre
版本0.9.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/tre
主页https://github.com/laurikari/tre
仓库https://github.com/laurikari/tre
上游文档https://github.com/laurikari/tre#readme
许可证BSD-2-Clause
源码归档https://github.com/laurikari/tre/releases/download/v0.9.0/tre-0.9.0.tar.gz
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nametre
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

libtre-dev 0.9.0-1

development package for the libtre5 regexp matching library

https://laurikari.net/tre/

sudo apt install libtre-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: tre
  • 1 依赖
  • normalized package name match
  • 匹配方式:Tre
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libtre-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

libtre5 0.9.0-1

regexp matching library with approximate matching

https://laurikari.net/tre/

sudo apt install libtre5
  • Section: libs
  • Architecture: amd64
  • Source Package: tre
  • 1 依赖
  • 1 可选依赖
  • normalized package name match
  • 匹配方式:Tre
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libtre5 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

tre-agrep 0.9.0-1

approximate grep utility based on the tre library

https://laurikari.net/tre/

sudo apt install tre-agrep
  • Section: text
  • Architecture: amd64
  • Source Package: tre
  • 2 依赖
  • normalized package name match
  • 匹配方式:Tre
Debian stable package indexes · deb.debian.org · Debian stable package indexes: tre-agrep from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

tre

nix profile install nixpkgs#tre
  • normalized package name match
  • 匹配方式:Tre
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/tr/tre/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

libtre-dev 0.8.0-7

development package for the libtre5 regexp matching library

https://laurikari.net/tre/

sudo apt install libtre-dev
  • Section: universe/libdevel
  • Architecture: amd64
  • Source Package: tre
  • 1 依赖
  • normalized package name match
  • 匹配方式:Tre
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libtre-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

libtre5 0.8.0-7

regexp matching library with approximate matching

https://laurikari.net/tre/

sudo apt install libtre5
  • Section: universe/libs
  • Architecture: amd64
  • Source Package: tre
  • 1 依赖
  • 1 可选依赖
  • normalized package name match
  • 匹配方式:Tre
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libtre5 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

tre-agrep 0.8.0-7

approximate grep utility based on the tre library

https://laurikari.net/tre/

sudo apt install tre-agrep
  • Section: universe/text
  • Architecture: amd64
  • Source Package: tre
  • 2 依赖
  • normalized package name match
  • 匹配方式:Tre
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: tre-agrep from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

agrep 0.8.0-r2

approximate grepping

https://laurikari.net/tre

sudo apk add agrep
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: tre
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Tre
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: agrep from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
apk95%

agrep-doc 0.8.0-r2

POSIX compliant regexp matching library (documentation)

https://laurikari.net/tre

sudo apk add agrep-doc
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: tre
  • normalized package name match
  • 匹配方式:Tre
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: agrep-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
apk95%

tre 0.8.0-r2

POSIX compliant regexp matching library

https://laurikari.net/tre

sudo apk add tre
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: tre
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Tre
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: tre from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
apk95%

tre-dev 0.8.0-r2

POSIX compliant regexp matching library (development files)

https://laurikari.net/tre

sudo apk add tre-dev
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: tre
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Tre
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: tre-dev from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
apk95%

tre-static 0.8.0-r2

POSIX compliant regexp matching library (static library)

https://laurikari.net/tre

sudo apk add tre-static
  • License: BSD-2-Clause
  • Architecture: x86_64
  • Source Package: tre
  • normalized package name match
  • 匹配方式:Tre
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: tre-static from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
dnf95%

agrep 0.9.0-4.fc45

Approximate grep utility

http://laurikari.net/tre/

sudo dnf install agrep
  • License: BSD-2-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: tre
  • 3 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Tre
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: agrep from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

python3-tre 0.9.0-4.fc45

Python bindings for the tre library

http://laurikari.net/tre/

sudo dnf install python3-tre
  • License: BSD-2-Clause
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: tre
  • 4 依赖
  • 5 提供
  • normalized package name match
  • 匹配方式:Tre
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: python3-tre from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

tre 0.9.0-4.fc45

POSIX compatible regexp library with approximate matching

http://laurikari.net/tre/

sudo dnf install tre
  • License: BSD-2-Clause
  • Category: Unspecified
  • Architecture: i686
  • Source Package: tre
  • 3 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Tre
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: tre from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

tre-common 0.9.0-4.fc45

Cross-platform files for use with the tre package

http://laurikari.net/tre/

sudo dnf install tre-common
  • License: BSD-2-Clause
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: tre
  • 1 提供
  • normalized package name match
  • 匹配方式:Tre
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: tre-common from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment