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.
- 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
- Rust toolchain (for building)
- No external dependencies — image rendering and fuzzy matching are built in
cargo build --releaseThe binary will be at target/release/pifbip. Copy it anywhere on your PATH.
pifbip <source> <destination> [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 |
# 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- 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
Recently used folders appear first in the suggestion list, so folders you're actively sorting into stay at the top.
cargo testThis runs both the Rust unit tests and an end-to-end interactive CLI scenario defined in tests/scenarios/demo.toml.
The demo/demo.tape file remains the recorded demo script for VHS.
A demo/ folder is included with sample source files. After sorting, run the restore script to reset:
./demo/restore.shTo re-record the demo GIF (requires VHS):
./demo/restore.sh
vhs demo/demo.tape
