A Golang-based CLI utility for efficient file organization and batch renaming with MIME-type classification and progress tracking.
Storg is a command-line utility built with Golang and the Cobra library, designed to streamline file management tasks. It enables users to bulk rename files in a directory using a numerical sequence with an optional prefix, and to organize files automatically into subdirectories based on their MIME types. The program supports both long and short command options, providing flexibility for experienced CLI users. Storg also includes real-time progress tracking, giving users visibility into ongoing operations during bulk tasks. The utility demonstrates a focus on performance, user experience, and reliability within the command-line environment.
Problem
I kept running into the same tedious task: a directory full of files with no meaningful names or structure — downloads, exports, screenshots all piled together. Manually sorting and renaming them was a time sink. I wanted a single command I could run from anywhere that just handled it.
Approach
Go was the natural choice — it compiles to a single binary, starts fast, and has excellent standard library support for filesystem operations. I used Cobra to structure the CLI so that adding new subcommands later wouldn't require restructuring the whole program. MIME-type detection from file content (not just extension) made the classification more reliable on files with missing or wrong extensions.
What I learned
Software Engineer/System Administrator • Building reliable systems & beautiful interfaces
© 2026 Lawal Habeebullahi. All rights reserved.