Media Fairy is a charming CLI (Command Line Interface) tool designed to intelligently rename your media files (photos and videos) using the power of local AI. Built using the Charm ecosystem, it offers a visually pleasing and interactive experience directly in your terminal.
- Interactive File Selection: Navigate your local directory via a beautiful TUI.
- Local AI Analysis: Utilizes Ollama running locally (specifically the
llava:v1.6model) to analyze your media. - Smart Renaming: Generates short, descriptive filenames based on the visual content of your photos and videos.
- Configurable Runs: Dry run mode is available so you can safely test the renaming AI without altering files.
- Filtering & Limits: Filter by videos or photos, and apply custom processing limits.
- Native Aesthetic: Adapts to your terminal background while sprinkling neon pink and yellow vibes on top.
- Go (1.21+ recommended)
- FFmpeg: Required to process and extract frames from video files. Ensure
ffmpegis naturally available in your system's PATH. - Ollama: Required to run the local AI vision model. You must start Ollama and pull the
llava:v1.6model.
Ensure Ollama has the correct model pulled:
ollama pull llava:v1.6Clone the repository and build:
git clone https://github.com/your-repo/media-fairy.git
cd media-fairy
go build .Simply run the compiled binary or use go run inside the project directory:
go run .- Select Directory: Use your
Up/Downarrows to navigate your file system. PressEnterto open a folder. Hitctrl+sto lock in the directory you want to scan. - Configuration Options: You will then be prompted to configure your choices for processing.
- Process Only: All, Videos, or Photos.
- Sort First: Which file type to process first.
- Process Max Items: Limit the amount of files analyzed. Drop
0for unlimited. - Dry Run: Select
Yesto preview changes without modifying disk logic.
- Execution: Media Fairy will fire up the LLM, scan the directory, and perform the magic. An audible ping will let you know when each file finishes!
Media Fairy relies heavily on the excellent libraries from Charmbracelet:
- Bubble Tea: The fun, functional and stateful way to build terminal apps.
- Bubbles: General purpose TUI components (File Picker, Spinner).
- Lip Gloss: Style definitions for expressive terminal layouts.
- Huh?: A simple, powerful library for building terminal forms and prompts.
- Harmonica: A spring animation library used to manage buttery smooth layout transitions.