Skip to content

v0.3.0

Choose a tag to compare

@TimKoornstra TimKoornstra released this 17 May 08:27
· 5 commits to main since this release

🎉 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'