# 使用 Homebrew, apk, Nix 安装 txr

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

## 安装

```sh
sudo av install brew:txr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install txr
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add txr
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#txr
```

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

## 软件包事实

- **软件包键:** brew:txr
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/txr>
- **版本:** 302
- **来源摘要:** Lisp-like programming language for convenient data munging
- **主页:** <https://www.nongnu.org/txr/>
- **仓库:** <https://www.kylheku.com/cgit/txr>
- **上游文档:** <https://www.nongnu.org/txr>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://www.kylheku.com/cgit/txr/snapshot/txr-302.tar.bz2>
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- txr (cli)
- txrlisp (cli)
- txrvm (cli)
- txr (别名)
- txrlisp (别名)
- txrvm (别名)

## 构建依赖

- pkgconf

## macOS 提供的库

- libffi
- libxcrypt

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 302
- 本地数据: OK
- 上游仓库: https://www.nongnu.org/txr/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

TXR is Kaz Kylheku's programming language and command-line tool for convenient data munging, combining a whole-document pattern language with TXR Lisp.

### 项目历史

The official homepage says the TXR project started in 2009 and describes it as a pragmatic tool for daily data-munging tasks. Its first identity is the TXR Pattern Language, which matches loosely structured text and binds variables using a template-like syntax; its second identity is TXR Lisp, a full Lisp dialect for data processing and scripting.

Over time TXR grew from a compact extraction language into a large language runtime. The homepage notes a substantial reference manual, an optimizing bytecode compiler, deployable saved executables, low external dependencies, and influences from Common Lisp, Scheme, Awk, shell, Prolog, Ruby, Python, Arc, Clojure, and other languages.

### 采用历史

TXR remains niche, but its official homepage lists packaging by GNU Guix, NixOS, Chimera Linux, Alpine Linux, Void Linux, EasyBuild, and T2 SDE. The supplied Homebrew record also shows Homebrew, Alpine, and Nix formulas, though the upstream page warns users not to use the Homebrew package.

The homepage also documents a practical user history through accepted TXR-based answers on Stack Overflow and Unix StackExchange. That is a useful signal for a package-nerd niche: TXR spread as a sharp text-processing answer to hard one-off problems more than as a mainstream application platform.

### 使用方式

TXR is used from the command line for scraping, extracting, transforming, and reporting on arbitrary text. Users can write compact one-liners, pattern files that act like reverse templates, or larger TXR Lisp programs and scripts.

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

TXR matters in package collections because it sits between awk, sed, Perl, and Lisp: a small executable with a large manual, a distinctive pattern language, and enough runtime to solve messy text problems without pulling in a larger language stack.

### 时间线

- 2009: Official homepage says the TXR project started.
- 2025: Official manpage build is dated July 19, 2025.
- 2026: Official homepage advertises TXR 302 installers and downloads.

### Related projects

- Awk: explicitly compared with TXR's pattern language on the homepage.
- TXR Lisp: the Lisp dialect bundled with the TXR system.
- Rosetta Code solutions in TXR: linked from the official homepage as examples.

### 来源

- <https://www.nongnu.org/txr/>
- <https://www.nongnu.org/txr/txr-manpage.html>
- <https://www.nongnu.org/txr/txr-pattern-language.html>
- source_facts.package-manager


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 源数据库详情

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

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

- Nix - txr: normalized package name match | nixpkgs package indexes: pkgs/by-name/tx/txr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - txr - 302-r2: normalized package name match | Alpine Linux edge package indexes: txr from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Programming language for convenient data munging | https://www.nongnu.org/txr/
- apk - txr-doc - 302-r2: normalized package name match | Alpine Linux edge package indexes: txr-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Programming language for convenient data munging (documentation) | https://www.nongnu.org/txr/
- apk - txr-vim - 302-r2: normalized package name match | Alpine Linux edge package indexes: txr-vim from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Vim syntax for txr | https://www.nongnu.org/txr/


## 相关链接

- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Language runtime packages](https://www.automicvault.com/zh-hans/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [pkgconf](https://www.automicvault.com/zh-hans/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [fennel](https://www.automicvault.com/zh-hans/pkg/brew/fennel/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [hy](https://www.automicvault.com/zh-hans/pkg/brew/hy/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [janet](https://www.automicvault.com/zh-hans/pkg/brew/janet/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [lfe](https://www.automicvault.com/zh-hans/pkg/brew/lfe/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [minimal-racket](https://www.automicvault.com/zh-hans/pkg/brew/minimal-racket/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [newlisp](https://www.automicvault.com/zh-hans/pkg/brew/newlisp/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [nu](https://www.automicvault.com/zh-hans/pkg/brew/nu/) - Shares av.db curated category or tags: cli, language-runtime, lisp, programming-language.
- [agda](https://www.automicvault.com/zh-hans/pkg/brew/agda/) - Shares av.db curated category or tags: cli, language-runtime, programming-language.

## Combined YAML source

View the package source record on GitHub. [combined/txr.yml](https://github.com/automic-vault/db/blob/main/combined/txr.yml)


## 来源

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