Yek is a Rust-based CLI tool designed to serialize text-based files from a repository or directory into a single structured output for large language model use. It scans projects using .gitignore rules to exclude irrelevant files and automatically filters out binary or oversized content. Yek prioritizes files based on Git history, placing more important content later in the output to align with how language models process context. Yek supports multiple directories, individual files, and glob patterns, making it flexible for different workflows. It can stream output when piped or save results to a temporary file, depending on usage. Configuration is handled through a yek.yaml file, allowing users to define ignore rules and priority settings. By consolidating code and documents into a single, ordered format, Yek simplifies preparing repositories for AI-driven analysis, debugging, or automation tasks.
Features
- Uses .gitignore rules to automatically exclude unnecessary files
- Prioritizes files using Git history to improve LLM context relevance
- Supports multiple directories, files, and glob pattern selection
- Streams output when piped or writes to a temporary file by default
- Filters out binary, large, and irrelevant files automatically
- Configurable via yek.yaml for custom ignore rules and priorities