Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❇️ Media Fairy ✨🧚

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.

features

  • Interactive File Selection: Navigate your local directory via a beautiful TUI.
  • Local AI Analysis: Utilizes Ollama running locally (specifically the llava:v1.6 model) 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.

installation

Prerequisites

  1. Go (1.21+ recommended)
  2. FFmpeg: Required to process and extract frames from video files. Ensure ffmpeg is naturally available in your system's PATH.
  3. Ollama: Required to run the local AI vision model. You must start Ollama and pull the llava:v1.6 model.

Setup

Ensure Ollama has the correct model pulled:

ollama pull llava:v1.6

Clone the repository and build:

git clone https://github.com/your-repo/media-fairy.git
cd media-fairy
go build .

usage

Simply run the compiled binary or use go run inside the project directory:

go run .
  1. Select Directory: Use your Up/Down arrows to navigate your file system. Press Enter to open a folder. Hit ctrl+s to lock in the directory you want to scan.
  2. 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 0 for unlimited.
    • Dry Run: Select Yes to preview changes without modifying disk logic.
  3. 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!

third-party libraries

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.

About

a charming CLI tool designed to intelligently rename your media files (photos and videos) using the power of local AI.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages