prooflinedev/yek

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

What it solves

When you want to give a large language model (LLM) the full context of a code repository, sending every file is impractical: it consumes tokens, includes irrelevant files, and slows down processing. yek solves this by turning a repository or directory into a single, clean text file that is ready for LLM input. It automatically skips files that are not useful (like binary files or those ignored by .gitignore) and orders the remaining files so that the most important ones come last, because LLMs tend to pay more attention to content later in context.

How it works

yek runs in a directory and produces a single output file. By default it: -respects .gitignore patterns to skip unwanted files,

  • uses Git history to infer which files are more important,
  • detects and ignores binary, large, or other non-text files,
  • streams output directly to stdout if you pipe it (instead of saving to a file),
  • supports processing multiple directories, glob patterns, and specific files in one command,
  • can be configured via a yek.yaml (or yek.toml / yek.json) file.

The output file uses a simple delimiter format (>>>> FILE_PATH followed by the file’s content) and can be customized with an output template. It also offers practical options like limiting the total size or token count, adding line numbers, including a directory tree header, or outputting JSON.

Who it’s for

yek is aimed at developers and teams who work with LLMs for coding tasks—such as code review, bug detection, refactoring, or generating code suggestions. It is especially useful when you need to provide a model with a concise but complete snapshot of a project without exceeding context limits. The tool is also ideal for automating data preparation for LLM evaluation pipelines.

Highlights

  • Extremely fast: written in Rust and parallelized; benchmarked at 230x faster than Repomix on the Next.js repository.
  • Automatic ignore rules: uses .gitignore, built-in heuristics, and configurable patterns to skip irrelevant content.
  • Git-aware prioritization: scores files based on Git history, so more important files appear later in the output for better LLM attention.
  • Flexible and configurable: supports token limits, size caps, custom output formats, multiple inputs, and a YAML/TOML/JSON config file.
  • Open source (MIT) with an active roadmap and easy installation (brew, cargo, or install scripts).

Related

  • Project
  • Project
  • Project
  • Project