Practical overview
When it fits
Use Yek before a separate LLM interaction when you need repository files filtered, prioritized and combined into context, or when you want a configurable command-line serialization step.
Who it is for
- Developers preparing repository context for downstream LLM prompts.
- Users who want configurable file selection, filtering and output formatting in a command-line workflow.
- Teams assembling source files for an LLM workflow while prioritizing content using Git history.
Documented uses
- Collect and serialize repository text files into a single LLM-ready context file.
- Select files and directories using paths or glob patterns while applying ignore rules.
- Control context size with byte-based or token-based limits.
- Stream serialized content to another command-line destination.
- Configure file priorities, exclusions and output format through a project configuration file.
Requirements & limits
The project repository identifies Yek as open source under the MIT license. The README documents installation for Unix-like systems and Windows PowerShell, plus a Cargo source-build option.
- Yek prepares and serializes content but does not document an integrated LLM API request.
- Git history, .gitignore rules and inferred exclusions influence what is included and how files are ordered.
- Token limits can remove files that do not fit, with the tool attempting to preserve more important files.
- Configuration supports ignore patterns, priority rules, binary extensions, Git-based priority boosts and output options.
- The documented implementation is a Rust command-line tool.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Serialize a repository into an LLM context file
Create a consolidated file from the current repository for use as LLM input.
Before you start
- Yek installed using one of the README's documented installation methods.
- A repository or directory containing text-based files.
Steps
Open a terminal in the repository directory.
Run
yekwith no input paths to process the current directory.Read the printed path to locate the consolidated temporary file.
Expected outcome
A serialized file containing selected repository content, with higher-priority files placed later in the output.
Guide limitations
- Yek prepares content but does not submit it to an LLM.
- The tool applies ignore and file-selection behavior, including exclusions for binary or large files.
- When a size cap is used, files that do not fit are removed.
Serialize selected paths with a token limit
Prepare chosen directories or files as serialized input while applying a token cap.
Before you start
- Yek installed.
- The paths to include in the output.
Steps
From a terminal, pass the desired directories or files to Yek, such as
yek src/ tests/.Add
--tokens 128kto set a token-based output limit.Use the printed temporary-file path to locate the output, unless output is being streamed.
Expected outcome
A consolidated serialization of the specified paths within the token limit, with Yek attempting to retain more important files when trimming.
Guide limitations
- Files that do not fit the capped context are removed.
- The README documents examples, not a successful run on a particular repository.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 October 2026
- Original website title
- mohsen1/yek · Official homepage title · retained in its source language

