yek
A fast Rust based tool to serialize text-based files in a repository or directory for LLM consumption
What is yek?
A fast Rust based tool to serialize text-based files in a repository or directory for LLM consumption
Overview of yek
What it is
yek is a fast Rust-based tool that serializes text-based files in a repository or directory into a single output, designed for LLM consumption. It is developed by Proofline and released as free, open-source software under the MIT license. The tool automatically respects .gitignore rules, uses Git history to infer file importance, and detects binary or large files to exclude. It supports streaming output when piped, multiple input directories, glob patterns, and individual file selection. Configuration is possible via a yek.yaml (or yek.toml/yek.json) file.
Key features
- Uses
.gitignorerules to skip unwanted files. - Leverages Git history to prioritize more important files (important files appear later in output).
- Automatically infers ignore patterns for binary, large, and other non-text files.
- Detects if output is being piped and streams content instead of writing to a file.
- Supports processing multiple directories, glob patterns, and individual files in a single command.
- Configurable via a
yek.yamlfile, allowing custom ignore patterns, priority rules, binary extensions, and output settings. - Offers token-based or byte-based size limits, JSON output, line numbers, and directory tree headers.
Use cases
- Preparing a repository’s text content for LLM context windows.
- Serializing codebases for AI-powered code analysis or summarization.
- Creating a single-file snapshot of a project for ingestion by language models.
- Quickly extracting relevant files from a directory while respecting
.gitignoreand importance heuristics.
Getting started
Install yek using one of the following methods: bash curl -fsSL https://proofline.sh/yek/install.sh | bash For Windows (PowerShell): powershell irm https://proofline.sh/yek/install.ps1 | iex With Homebrew: bash brew install yek With Cargo: bash cargo install yek Build from source: bash git clone https://github.com/prooflinedev/yek cd yek cargo install --path . Basic usage: run yek in a directory to serialize all files and print the output file path.
License and pricing
yek is open source and free. The license is MIT, as stated in the repository metadata.
Based on the project's public README and repository metadata.