Skip to content

Releases: TimKoornstra/repoyank

v0.4.0

09 May 14:37

Choose a tag to compare

🎉 Release v0.4.0: File Output & Smarter Type Filtering!

repoyank v0.4.0 is a focused release that adds direct file output and improves extension filtering for compound file types.

🙏 Thanks:

Special thanks to Siem Kleuskens (@swekkiekekkie) for contributing key work in this release, including the new file output option and improved compound extension filtering.

✨ Key Highlights & New Features:

  • Write Output Directly to a File (-o, --output <FILE>):
    • Save generated repoyank output to a file instead of copying it to the clipboard.
    • Works with both relative and absolute paths.
    • Parent directories are created automatically when needed.
    • Clipboard output remains the default behavior when -o/--output is not provided.
    • The final summary now reports that files were written, including the approximate token count and destination path.

🐛 Fixes & Improvements:

  • Compound Extension Filtering:
    • Type filtering now supports compound extensions like contract.json.
    • For example, this now correctly matches files such as schema.contract.json:
      repoyank -a -t contract.json .
    • Existing single-extension filters like -t rs,md continue to work as before.

🔄 CLI Changes:

No breaking changes in this release.

  • New option:

    -o, --output <FILE>

    Writes generated output to FILE instead of copying to the clipboard.

  • Dry run behavior remains safe:

    repoyank -n -a 'docs/**/*.md' -o exports/docs-snippet.md

    This previews the output but does not write to the file or touch the clipboard.

🛠️ Installation:

No changes to the installation process.

  • Crates.io (Rust ecosystem):

    cargo install repoyank
  • AUR (Arch Linux):
    If you use an AUR helper like paru or yay:

    paru -S repoyank
    # or
    yay -S repoyank
  • Latest development version (from GitHub):

    cargo install --git https://github.com/TimKoornstra/repoyank.git --branch main

📝 Example Usage:

  1. Write all matching Rust files to a file:

    repoyank -a -t rs src/ -o /tmp/repoyank-output.txt
  2. Use a relative output path:

    repoyank -a 'docs/**/*.md' -o exports/docs-snippet.md
  3. Filter by a compound extension:

    repoyank -a -t contract.json .

v0.3.0

17 May 08:27

Choose a tag to compare

🎉 Release v0.3.0: Streamlined Workflow & Enhanced Control!

repoyank v0.3.0 is here, packed with significant UI/UX enhancements designed to make your interaction with the tool more intuitive, powerful, and informative. This release overhauls command-line arguments, introduces smarter path handling, and adds much-requested TUI features.

✨ Key Highlights & New Features:

  • Intuitive Scan Root & Path Handling (Major Change!):

    • Say goodbye to the dedicated [DIR] argument! repoyank now intelligently determines the scan root using the new [PATTERN ...] arguments:
      • If the first PATTERN provided is an existing directory (e.g., src/), it becomes the scan root.
      • Otherwise, the current working directory (.) is used as the scan root.
      • All subsequent PATTERN globs (e.g., **/*.rs, docs/*.md) are resolved relative to this scan root.
      • If no patterns are given, repoyank defaults to scanning all files (**/*) under the scan root.
    • This makes targeting specific project areas and files much more direct and flexible (e.g., repoyank my_project/src '**/*.rs' 'tests/**').
  • Dry Run Mode (-n, --dry-run):

    • A brand new feature! Preview exactly what would be selected and copied to the clipboard, including the tree structure and file contents, without actually modifying your clipboard. Essential for verifying complex selections before committing.
  • Enhanced Post-Yank Summary:

    • After yanking, repoyank now displays the concise tree structure of the files and directories that were copied to your console, right before the familiar token count. This gives you immediate visual confirmation of what's on your clipboard.

🔄 CLI Argument Refinements (Breaking Changes with Aliases):

To improve clarity, consistency, and power, command-line arguments have been significantly revamped.
Old flags/aliases from v0.2.0 (like --headless and --preselect <PATTERN>) will work for a limited time with a deprecation warning but will be removed in a future version. Please update your scripts!

  • Positional Argument:
    • Old (v0.2.0): [DIR] (for root directory)
    • New (v0.3.0): [PATTERN ...] (for scan root and glob patterns)
  • Headless Mode:
    • Old (v0.2.0): --headless (required --preselect)
    • New (v0.3.0): -a, --all (globs are now primary via [PATTERN ...], so --preselect is no longer a strict requirement for this mode if patterns are provided directly).
  • Pre-selection in TUI:
    • Old (v0.2.0): --preselect <PATTERN> (could be specified multiple times)
    • New (v0.3.0): -s, --select <GLOB[,...]> (comma-separated list of globs for pre-selection, relative to scan root).
  • Type Filtering:
    • Old (v0.2.0): --types <EXT1,EXT2>
    • New (v0.3.0): -t, --type <EXT[,EXT...]> (alias --types still works for now).

⌨️ TUI Power-Ups: More Control & Filtering!

The interactive TUI has gained powerful new capabilities:

  • Live Filtering (/):
    • Press / to enter filter mode. Type to instantly filter the tree view. Matching is case-insensitive against filenames.
    • Esc cancels filtering, Enter applies the current filter view.
  • Expand All Directories (*): Instantly expand all foldable directory items in the tree.
  • Collapse All Directories (-): Instantly collapse all expanded directory items (except the root, if visible).
  • Select All Visible (a): Mark all currently visible (and non-directory) items as selected.
  • Deselect All Visible (d): Mark all currently visible items as not selected.
  • (Controls for navigation, selection, folding, confirm, quit remain similar: Arrows/jk, Space/Enter, Tab/o, y, q/Esc)

🛠️ Installation:

No changes to the installation process. Choose your preferred method:

  • Crates.io (Rust ecosystem):

    cargo install repoyank
  • AUR (Arch Linux):
    If you use an AUR helper like paru or yay:

    paru -S repoyank
    # or
    yay -S repoyank
  • Latest development version (from GitHub):

    cargo install --git https://github.com/TimKoornstra/repoyank.git --branch main

📝 Example of New Usage:

  1. Browse my_project/src and pick files (interactive):

    repoyank my_project/src

    (Here, my_project/src becomes the scan root, and the default pattern **/* is applied within it.)

  2. Instantly yank (skip TUI) all Rust and Markdown files from src/ and docs/ directories:

    repoyank -a -t rs,md src/ docs/
  3. Interactively select, but pre-highlight all C++ test files for review, scanning src/, include/, and tests/:

    repoyank -s 'tests/**/*.cpp' src/ include/ tests/
  4. See what would be yanked from Markdown files in docs/, without copying (dry run):

    repoyank -n -a 'docs/**/*.md'

v0.2.0

15 May 15:41

Choose a tag to compare

🎉 Release v0.2.0: Headless Mode & Preselect Patterns

I'm excited to announce repoyank v0.2.0, bringing powerful new features and improved usability!

✨ New Features:

  • Headless Mode (--headless):

    • Directly copy files to the clipboard based on provided glob patterns without launching the interactive TUI.
  • Pre-selection Patterns (--preselect):

    • Quickly preselect files using glob patterns to streamline your selection process.

🔄 TUI Improvements:

  • Swapped Expansion and Selection States:

    • Improved clarity in the Tree UI. The format is now [Expansion] [Selection] TreeLabel.

⌨️ Updated Controls:

  • Old: Arrows/jk: Navigate | Space: Toggle Select | Tab/o: Toggle Fold | Enter: Confirm | q/Esc: Quit
  • New: Arrows/jk: Navigate | Space/Enter: Toggle Select | Tab/o: Toggle Fold | y: Confirm | q/Esc: Quit

🛠️ Installation:

  • Crates.io:

    cargo install repoyank
  • AUR (Arch Linux):

    paru -S repoyank
    # or
    yay -S repoyank
  • Latest from GitHub:

    cargo install --git https://github.com/TimKoornstra/repoyank.git --branch main