# 使用 Homebrew, Nix, scoop 安装 yek

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

## 安装

```sh
sudo av install brew:yek
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install yek
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#yek
```

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

### Windows

- Scoop (92%):

```sh
scoop install extras/yek
```

  证据: Scoop official bucket manifest trees: bucket/yek.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:yek
- **软件包管理器:** Homebrew
- **版本:** 0.25.5
- **来源摘要:** Fast Rust based tool to serialize text-based files for LLM consumption
- **主页:** <https://github.com/mohsen1/yek>
- **仓库:** <https://github.com/mohsen1/yek>
- **最后更新:** 2026-06-29T18:57:35Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- yek (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

yek is a Rust command-line tool that serializes text files from a repository or directory into an LLM-friendly single output. It respects ignore rules, can prioritize files using Git history, supports token or size caps, and can be configured with YAML, TOML, or JSON.

### 项目历史

The mohsen1/yek repository was created on 2025-01-11, right as developer tooling around LLM context packaging was becoming its own small software category. The name means "one" in Persian, matching the tool's core idea of turning many project files into one consumable context file.

The README shows the project's early design priorities: use .gitignore rules, infer additional binary or large-file ignores, use Git history to decide which files are more important, stream when output is piped, process multiple directories, support globs, and optionally read a `yek.yaml` configuration file.

Subsequent documentation expanded the tool from simple concatenation into a configurable context generator with token caps, JSON output, line numbers, custom output templates, tree-only/tree-header modes, priority rules, binary extension overrides, and alternative config formats.

### 采用历史

Yek saw fast adoption for a young CLI because it landed in a timely niche: packaging repository context for LLMs. The GitHub repository has thousands of stars, the project was discussed on Reddit and Hacker News, and it appears in Rust/LLM tool lists and package indexes such as Cargo/lib.rs, Homebrew, Nix, and Scoop.

Its adoption is practical rather than institutional: developers use it when a repository is too large or too scattered to paste manually, but they still want a local, inspectable text artifact rather than a hosted indexing service.

### 使用方式

The basic workflow is to run `yek` at a repository root and receive a generated file path, or pipe the output directly into a clipboard or another command. Users can pass files, directories, multiple roots, or quoted glob patterns, and can cap output with options such as `--max-size` or `--tokens`.

For repeatable project behavior, users add `yek.yaml`, `yek.toml`, or `yek.json` with ignore patterns, unignore patterns, output settings, priority rules, binary extensions, and Git-based priority tuning. That makes it useful in AI coding workflows where the same repository context needs to be regenerated often.

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

Yek is package-nerd significant because it is part of the post-LLM wave of repository-to-context tools, but implemented as a small native CLI rather than a web service. That makes package-manager availability especially useful: developers can install it next to Git and editors and keep data local.

It also shows a new kind of packaging demand: tools whose main job is not compiling, linting, or deploying code, but preparing source trees for machine consumption.

### 时间线

- 2025-01-11: The mohsen1/yek repository is created.
- 2025-01: The project is shared as a Rust tool for serializing code repositories for LLM consumption on Reddit and Hacker News.
- 2025: The README documents Git-aware file prioritization, .gitignore handling, streaming output, glob support, and `yek.yaml` configuration.
- 2025: Package availability expands through ecosystems including Homebrew, Cargo/lib.rs, Nix, and Scoop.
- 2026-06-29: GitHub release activity shows continuing maintenance into mid-2026.

### Related projects

- Related tools include Repomix, gitingest, onefilellm, repo2file, repo2txt, project-context generators, clipboard-based LLM workflows, Git, ripgrep-style file discovery, and local RAG/context-pack tooling.

### 来源

- <https://api.github.com/repos/mohsen1/yek>
- <https://formulae.brew.sh/formula/yek>
- <https://github.com/mohsen1/yek>
- <https://lib.rs/crates/yek>
- <https://news.ycombinator.com/item?id=42753302>
- <https://raw.githubusercontent.com/mohsen1/yek/main/README.md>
- <https://waylonwalker.com/using-yek/>
- <https://www.reddit.com/r/LocalLLaMA/comments/1i4oeg9/yek_serialize_your_code_repo_or_part_of_it_to/>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: yek.yaml, yek.toml, yek.json
## 其他软件包管理器记录

- Nix - yek: normalized package name match | nixpkgs package indexes: pkgs/by-name/ye/yek/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - extras/yek: normalized package name match | Scoop official bucket manifest trees: bucket/yek.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

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