# 使用 Homebrew, MacPorts, Nix 安装 gat

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

## 安装

```sh
sudo av install brew:gat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gat
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gat
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#gat
```

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

## 软件包事实

- **软件包键:** brew:gat
- **软件包管理器:** Homebrew
- **版本:** 0.30.2
- **来源摘要:** Cat alternative written in Go
- **主页:** <https://github.com/koki-develop/gat>
- **仓库:** <https://github.com/koki-develop/gat>
- **最后更新:** 2026-07-27T14:57:48+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

gat is a Go implementation of a modern `cat`-style terminal file viewer. It keeps the familiar single-command file display model while adding syntax highlighting, Markdown rendering, image display for Sixel-capable terminals, pretty printing, and secret masking.

### 项目历史

The project started publicly in March 2023 and released v0.1.0 the same day. Its official README describes it as a cat alternative written in Go and documents a steady release series through the 0.x line.

### 采用历史

The README documents installation through the author's Homebrew tap, Homebrew core, `go install`, and GitHub release binaries. That places gat in the same terminal-tool packaging niche as other enhanced `cat` replacements, but with a small Go binary distribution story.

### 使用方式

Users run `gat` with one or more files and optional flags for language selection, output format, themes, Markdown rendering, nonprinting character display, and secret masking. Environment variables such as `GAT_FORMAT` and `GAT_THEME` can provide defaults for output style.

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

gat is package-nerd-relevant as another entry in the long-running ecosystem of `cat` replacements, but its mix of terminal image support, Markdown rendering, and built-in token masking makes it more than a straight colorizer.

### 时间线

- 2023: Public GitHub repository created.
- 2023: v0.1.0 released.
- 2025: v0.20.x releases continued the 0.x series.

### Related projects

- gat relates to traditional Unix `cat`; the official sources describe it generically as a cat alternative rather than positioning it against a specific competing package.

### 来源

- <https://github.com/koki-develop/gat>
- <https://github.com/koki-develop/gat/releases>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - gat: normalized package name match | nixpkgs package indexes: pkgs/by-name/ga/gat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - gat: normalized package name match | MacPorts ports tree: textproc/gat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/gat.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gat.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
