yek

Из публичных источников

Быстрый инструмент на Rust для сериализации текстовых файлов репозитория или каталога для использования в LLM

Машинный перевод · Показать оригинал

A fast Rust based tool to serialize text-based files in a repository or directory for LLM consumption

AI-инструментКатегория: AI-инструментыOpen sourceданные проверены 15 окт. 2026 г.

Обзор

  • ai
  • cli
  • large-language-models
  • llm
  • rust-lang
  • serialization

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Файлы официального релизаИз публичных источниковиз последнего официального релиза
    github.com/mohsen1/yek/releases/tag/v0.25.5 ↗
  • Реестр пакетов языкаИз публичных источниковиз манифеста пакета — публикация в реестре не проверена
    cargo install yek

    Не проверено: перед установкой убедитесь, что пакет в реестре принадлежит этому проекту.

    crates.io/crates/yek ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/mohsen1/yek ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
WindowsСовместимоarm64официальная сборка в релизе v0.25.5: yek-aarch64-pc-windows-msvc.zip0.70
Совместимоx86_64официальная сборка в релизе v0.25.5: yek-x86_64-pc-windows-msvc.zip0.70
macOSСовместимоarm64официальная сборка в релизе v0.25.5: yek-aarch64-apple-darwin.tar.gz0.70
Совместимоx86_64официальная сборка в релизе v0.25.5: yek-x86_64-apple-darwin.tar.gz0.70
LinuxСовместимоarm64официальная сборка в релизе v0.25.5: yek-aarch64-unknown-linux-gnu.tar.gz0.70
Совместимоx86_64официальная сборка в релизе v0.25.5: yek-x86_64-unknown-linux-gnu.tar.gz0.70
Web browserНеизвестно———
Server / self-hostedНеизвестно———
Container (OCI)Неизвестно———

Релизы

проверено 29 окт. 2026 г.
v0.25.5Последний29 июн. 2026 г.Официальный источник ↗

Файлы версии 0.25.5

Маркетплейс не хранит эти файлы: загрузка идёт из официального источника. Мы их не сканировали.
ФайлПлатформаРазмерSHA-256Скачать из официального источника
yek-aarch64-apple-darwin.tar.gzmacos · arm64 · tarball6,4 MB0797f0b8f255…Официальный источник ↗
yek-aarch64-pc-windows-msvc.zipwindows · arm64 · zip4,8 MBd66d47645c70…Официальный источник ↗
yek-aarch64-unknown-linux-gnu.tar.gzlinux · arm64 · tarball6,9 MB7f3e60da9b32…Официальный источник ↗
yek-x86_64-apple-darwin.tar.gzmacos · x86_64 · tarball6,1 MB51482c1b6a65…Официальный источник ↗
yek-x86_64-pc-windows-msvc.zipwindows · x86_64 · zip4,9 MB4d964df9c202…Официальный источник ↗
yek-x86_64-unknown-linux-gnu.tar.gzlinux · x86_64 · tarball6,8 MB6a6302c596bb…Официальный источник ↗
yek-x86_64-unknown-linux-musl.tar.gzlinux · x86_64 · tarball7 MBbedf98d7c391…Официальный источник ↗

История релизов

Профиль качества

алгоритм quality-v1.0 · оценено 15 окт. 2026 г.
Оценка качества84
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 2012
last activity 108 days ago
Документация · 1515
README 10495 chars, description present
Готовность к использованию · 1515
install instructions: yes; releases: yes
Метаданные · 108
3/4 of description, homepage, license, topics
Релизы · 1010
10 release(s), latest 108 days ago
Точность категории · 107
classifier confidence 0.65
Популярность · 108
2476 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MIT
Сообщество · 55
issues enabled, 67 forks

Лицензия

MIT
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/mohsen1/yekОсновной★ 2 476 звёздактивность 29 июн. 2026 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

code2promptПохожий
CLI-инструмент для преобразования кодовой базы в один промпт для LLM с деревом исходных файлов, шаблонизацией промптов и подсчётом токенов.MIT · AI-инструменты
openscienceПохожий
Открытая рабочая среда на основе ИИ для научных исследованийApache-2.0 · AI-инструменты
opensrcПохожий
Получение исходного кода npm-пакетов для предоставления AI-агентам для программирования более глубокого контекстаApache-2.0 · AI-инструменты
zeroПохожий
Агент для программирования, который подчиняется вам: ваша модель, ваша машина, ваши правила.MIT · AI-инструменты
ccg-workflowПохожий
Движок рабочих процессов для совместной работы нескольких моделей — одна команда /ccg:go, в которой ИИ анализирует намерение, выбирает стратегию и координирует Codex + Gemini + Claude для совместного выполненияMIT · AI-инструменты
openserpПохожий
Самостоятельно размещаемый SERP API для ИИ, SEO и автоматизации. Поиск Google, Bing, Yandex, Baidu, DuckDuckGo и Ecosia с отрисовкой в браузере и извлечением содержимого страниц 🎉MIT · AI-инструменты

README

Из mohsen1/yek · лицензия MIT · загружено 29 окт. 2026 г.

yek

A fast Rust based tool to serialize text-based files in a repository or directory for LLM consumption.1

By default:

  • Uses .gitignore rules to skip unwanted files.
  • Uses the Git history to infer what files are more important.
  • Infers additional ignore patterns (binary, large, etc.).
  • Automatically detects if output is being piped and streams content instead of writing to files.
  • Supports processing multiple directories in a single command.
  • Supports glob patterns and individual file selection.
  • Configurable via a yek.yaml file.

Yek يک means "One" in Farsi/Persian.

Consider having a simple repo like this:

.
├── README.md
├── src
│   ├── main.rs
│   └── utils.rs
└── tests
    └── test.rs

Running yek in this directory will produce a single file and write it to the temp directory with the following content:

>>>> README.md
... content ...
>>>> tests/test.rs
... content ...
>>>> src/utils.rs
... content ...
>>>> src/main.rs
... content ...

[!NOTE]
yek will prioritize more important files to come last in the output. This is useful for LLM consumption since LLMs tend to pay more attention to content that appears later in the context.

Installation

Choose the installation method for your platform:

Unix-like Systems (macOS, Linux)

curl -fsSL https://azimi.me/yek.sh | bash

For Windows (PowerShell):

irm https://azimi.me/yek.ps1 | iex
git clone https://github.com/mohsen1/yek
cd yek
cargo install --path .

Usage

yek has sensible defaults, you can simply run yek in a directory to serialize the entire repository. It will serialize all files in the repository and write them into a temporary file. The path to the file will be printed to the console.

Examples

Process current directory and write to temp directory:

yek

Pipe output to clipboard (macOS):

yek src/ | pbcopy

Cap the max output size to 128K tokens:

yek --tokens 128k

[!NOTE] yek will remove any files that won't fit in the capped context size. It will try to fit in more important files

yek --max-size 100KB --output-dir /tmp/yek src/

Process multiple directories:

yek src/ tests/

Process multiple files

yek file1.txt file2.txt file3.txt

Use glob patterns:

yek "src/**/*.ts"
yek "src/main.rs" "tests/*.rs" "docs/README.md"

[!NOTE] When using glob patterns, make sure to quote them to prevent shell expansion.

CLI Reference

yek --help
Usage: yek [OPTIONS] [input-paths]...

Arguments:
  [input-paths]...                Input files and/or directories to process

Options:
      --no-config                              Do not use a config file
      --config-file <CONFIG_FILE>              Path to the config file
  -V, --version                                Print version of yek
      --max-size <MAX_SIZE>                    Max size per chunk. e.g. "10MB" or "128K" or when using token counting mode, "100" or "128K" [default: 10MB]
      --tokens <TOKENS>                        Use token mode instead of byte mode
      --json                                   Enable JSON output
      --debug                                  Enable debug output
      --line-numbers                           Include line numbers in output
      --output-dir [<OUTPUT_DIR>]              Output directory. If none is provided & stdout is a TTY, we pick a temp dir
      --output-name [<OUTPUT_NAME>]            Output filename. If provided, write output to this file in current directory
      --output-template [<OUTPUT_TEMPLATE>]    Output template. Defaults to ">>>> FILE_PATH\nFILE_CONTENT"
      --ignore-patterns <IGNORE_PATTERNS>...  Ignore patterns
      --unignore-patterns <UNIGNORE_PATTERNS>... Unignore patterns. Yek has some built-in ignore patterns, but you can override them here.
  -t, --tree-header                            Include directory tree header in output (incompatible with JSON output)
      --tree-only                              Show only the directory tree (no file contents, incompatible with JSON output)
  -h, --help                                   Print help
CLI Options Detail
  • [input-paths]... - Files or directories to process. Supports glob patterns (quote them to prevent shell expansion)
  • --no-config - Skip loading any configuration file
  • --config-file <CONFIG_FILE> - Use a specific configuration file path instead of searching for default config files
  • -V, --version - Print version information and exit
  • --max-size <MAX_SIZE> - Maximum size limit per output (e.g., "10MB", "128K"). Used in byte mode
  • --tokens <TOKENS> - Use token-based counting instead of bytes (e.g., "128k", "100"). Enables token mode
  • --json - Output results in JSON format instead of text
  • --debug - Enable debug logging for troubleshooting
  • --line-numbers - Include line numbers in the output for each file
  • --output-dir [<OUTPUT_DIR>] - Directory to write output files. If not specified and not streaming, uses temp directory
  • --output-name [<OUTPUT_NAME>] - Specific filename for output. If specified, writes to current directory with this name
  • --output-template [<OUTPUT_TEMPLATE>] - Template for formatting output. Use FILE_PATH and FILE_CONTENT placeholders
  • --ignore-patterns <IGNORE_PATTERNS>... - Additional patterns to ignore (extends .gitignore and defaults)
  • --unignore-patterns <UNIGNORE_PATTERNS>... - Patterns to override built-in ignore rules
  • -t, --tree-header - Include a directory tree at the beginning of output (incompatible with JSON)
  • --tree-only - Show only the directory tree structure without file contents (incompatible with JSON)

Configuration File

You can place a file called yek.yaml at your project root or pass a custom path via --config-file. The configuration file allows you to:

  1. Add custom ignore patterns
  2. Define file priority rules for processing order
  3. Add additional binary file extensions to ignore (extends the built-in list)
  4. Configure Git-based priority boost
  5. Define output directory and output filename
  6. Define output template and other output options

Configurable Options

Most CLI options can be configured in the config file. The following options can be set:

File Processing:

  • max_size - Size limit (same as --max-size)
  • tokens - Token count limit (same as --tokens)
  • ignore_patterns - Additional ignore patterns (same as --ignore-patterns)
  • unignore_patterns - Override built-in ignores (same as --unignore-patterns)

Output Configuration:

  • json - Enable JSON output (same as --json)
  • debug - Enable debug mode (same as --debug)
  • line_numbers - Include line numbers (same as --line-numbers)
  • output_dir - Output directory (same as --output-dir)
  • output_name - Output filename (same as --output-name)
  • output_template - Output template (same as --output-template)
  • tree_header - Include directory tree header (same as --tree-header)
  • tree_only - Show only directory tree (same as --tree-only)

Config-only Options:

  • priority_rules - File priority rules (config file only)
  • binary_extensions - Additional binary file extensions (config file only)
  • git_boost_max - Maximum Git-based priority boost (config file only)

[!NOTE] Some CLI options like --no-config, --config-file, and --version are CLI-only and cannot be set in config files.

Example yek.yaml

You can also use yek.toml or yek.json instead of yek.yaml.

This is optional, you can configure the yek.yaml file at the root of your project.

# Add patterns to ignore (in addition to .gitignore)
ignore_patterns:
  - "ai-prompts/**"
  - "__generated__/**"

# Configure Git-based priority boost (optional)
git_boost_max: 50 # Maximum score boost based on Git history (default: 100)

# Define priority rules for processing order
# Higher scores are processed first
priority_rules:
  - score: 100
    pattern: "^src/lib/"
  - score: 90
    pattern: "^src/"
  - score: 80
    pattern: "^docs/"

# Add additional binary file extensions to ignore
# These extend the built-in list (.jpg, .png, .exe, etc.)
binary_extensions:
  - ".blend" # Blender files
  - ".fbx" # 3D model files
  - ".max" # 3ds Max files
  - ".psd" # Photoshop files

# Output configuration
max_size: "128K"           # Size limit (can also use tokens: "100k")
json: false                # Enable JSON output
debug: false               # Enable debug logging
line_numbers: false        # Include line numbers in output
tree_header: false         # Include directory tree at start

# Define output directory
output_dir: /tmp/yek

# Define output filename (writes to current directory with this name)
output_name: yek-output.txt

# Define output template.
# FILE_PATH and FILE_CONTENT are expected to be present in the template.
output_template: "FILE_PATH\n\nFILE_CONTENT"

Performance

yek is fast. It's written in Rust and does many things in parallel to speed up processing.

Here is a benchmark comparing it to Repomix serializing the Next.js project:

time yek
Executed in    5.19 secs    fish           external
   usr time    2.85 secs   54.00 micros    2.85 secs
   sys time    6.31 secs  629.00 micros    6.31 secs
time repomix
Executed in   22.24 mins    fish           external
   usr time   21.99 mins    0.18 millis   21.99 mins
   sys time    0.23 mins    1.72 millis    0.23 mins

yek is 230x faster than repomix.

Roadmap

See proposed features. I am open to accepting new feature requests. Please write a detailed proposal to discuss new features.

Alternatives

  • Repomix: A tool to serialize a repository into a single file in a similar way to yek.
  • Aider: A full IDE like experience for coding using AI

License

MIT

Footnotes

  1. yek is not "blazingly" fast. It's just fast, as fast as your computer can be. ↩

Открыть репозиторий ↗