Skip to content

vdufloth/pifbip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pifbip — Put In Folder By Interactive Prompt

Fast bulk file sorting when there's no pattern and you need to decide manually.

For each file in the source folder, pifbip shows the filename and a preview, then prompts you to type a destination subfolder. As you type, existing folder names appear as fuzzy autocomplete suggestions. The file is moved instantly and the next one loads.

demo

Windowed mode (full resolution preview)

windowed demo

Previews

  • Images (jpg, png, gif, webp, bmp, etc.) — rendered directly in the terminal (kitty, sixel, or Unicode half-blocks)
  • Text files (txt, md, csv, json, py, etc.) — first 10 and last 10 lines
  • Other files — name, size, and MIME type

Requirements

  • Rust toolchain (for building)
  • No external dependencies — image rendering and fuzzy matching are built in

Installation

cargo build --release

The binary will be at target/release/pifbip. Copy it anywhere on your PATH.

Usage

pifbip <source> <destination> [options]

Options

Flag Description
-d, --depth N How many levels deep to scan source subfolders for files. 0 (default) = only top-level files, 1 = include one level of subfolders, etc.
--image-mode MODE Image preview mode: auto (default), chafa, viuer, or windowed. auto uses chafa if available, otherwise viuer. windowed opens a GUI preview window at full resolution.
-h, --help Show help message and exit

Examples

# Sort files from Downloads into organized folders
pifbip ~/Downloads ~/Sorted

# Include files from subfolders one level deep
pifbip ~/Downloads ~/Sorted -d 1

# Scan all nested subfolders up to 3 levels
pifbip ~/Downloads ~/Sorted -d 3

Controls

  • Type a folder name and press Enter to move the file there (created if it doesn't exist)
  • Tab to accept the selected autocomplete suggestion
  • Up/Down arrows to navigate suggestions (list uses full terminal height)
  • Left arrow to go back to the previous file (undoes the move)
  • Right arrow or empty Enter to skip a file
  • Ctrl+R to rename the selected folder
  • Press Ctrl+C or Esc to quit at any time

Smart sorting

Recently used folders appear first in the suggestion list, so folders you're actively sorting into stay at the top.

Demo

A demo/ folder is included with sample source files. After sorting, run the restore script to reset:

./demo/restore.sh

To re-record the demo GIF (requires VHS):

./demo/restore.sh
vhs demo/demo.tape

About

pifbip — Put In Folder By Interactive Prompt. Shell or GUI multi-file folder list sorter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages