| Crates.io | repoyank |
| lib.rs | repoyank |
| version | 0.3.0 |
| created_at | 2025-05-10 10:15:20.991907+00 |
| updated_at | 2025-05-17 08:24:53.257458+00 |
| description | Interactively traverse your repository, select files/directories, and quickly prepare structured snippets for LLM interactions. |
| homepage | |
| repository | https://github.com/TimKoornstra/repoyank |
| max_upload_size | |
| id | 1668274 |
| size | 150,899 |
repoyank is a CLI tool specifically designed to help you interactively select and format code snippets from your repository, perfect for easily preparing structured input for large language models (LLMs) without the need to upload your sensitive data to third-party services.
--all): Skip the TUI and directly yank files matching patterns and filters.arboard..gitignore.There are three easy ways to install repoyank:
Via crates.io (Rust ecosystem)
cargo install repoyank
Via AUR (Arch Linux)
If you use an AUR helper like paru or yay, simply run:
paru -S repoyank
# or
yay -S repoyank
Latest development version (from GitHub)
cargo install --git https://github.com/TimKoornstra/repoyank.git --branch main
repoyank [OPTIONS] [PATTERN ...]
[PATTERN ...]
src/**/*.rs, docs/*.md, path/to/specific_file.txt).PATTERN provided is an existing directory, it is used as the scan root..) is the scan root.repoyank defaults to scanning all files (**/*) under the scan root.| Short | Long / value | Purpose & Notes |
|---|---|---|
-a |
--all |
Skip the TUI entirely – yank everything selected by patterns and filters. |
-t |
--type <EXT[,EXT...]> |
Filter by comma-separated file extensions (e.g., rs,md; no dots). Applied after patterns. |
-s |
--select <GLOB[,...]> |
Pre-select items in the TUI matching these globs. Globs are relative to the scan root. User can still change pick. |
-i |
--include-ignored |
Include files that are normally excluded by .gitignore. |
-n |
--dry-run |
Print the final tree and selection summary, but don't touch the clipboard. |
-h |
--help |
Show help information. |
-V |
--version |
Show version information. |
(Deprecated aliases like --headless and --preselect may still work for a limited time but will be removed in a future version.)
Browse the current directory and cherry-pick files:
repoyank
Browse a specific subdirectory (my_project/src) and pick files:
repoyank my_project/src
(Here, my_project/src becomes the scan root, and the default pattern **/* is applied within it.)
Interactively select only Python files from the current directory:
repoyank -t py '**/*.py'
# or more simply, if you want all python files as candidates:
repoyank -t py
Pre-highlight all C++ test files in the TUI for review:
repoyank -s 'tests/**/*.cpp' src/ include/ tests/
Instantly yank (skip TUI) all C++ test files:
repoyank -a 'tests/**/*.cpp'
Instantly yank all Rust and Markdown files from the src and docs directories:
repoyank -a -t rs,md src/ docs/
See what would be yanked from Markdown files in docs/, without copying:
repoyank -n -a 'docs/**/*.md'
Include generated files (e.g., in build/) that are in .gitignore:
repoyank -i 'build/**/*'
After selection (or direct yanking), your clipboard will contain output like:
./
├─ src/
│ └─ main.rs
└─ README.md
---
File: src/main.rs
---
// File contents
---
File: README.md
---
# Project README
...
And repoyank will provide a helpful confirmation on your console, including the tree structure that was copied:
./
├─ src/
│ └─ main.rs
└─ README.md
✅ Copied 2 files (≈ 150 tokens) from the displayed tree to the clipboard.
Clone and run locally:
git clone https://github.com/TimKoornstra/repoyank.git
cd repoyank
cargo run -- -t rs,md src/
This is my first Rust project! Contributions, suggestions, and improvements are very welcome. Feel free to open issues or pull requests at GitHub.
This project is licensed under the GPLv3 License. See LICENSE for details.