$ show lgarron/folderify
folderify is a macOS CLI tool that generates pixel-perfect native-style folder icons from a mask image (typically a PNG with a black design on transparent background). It produces .iconset directories and .icns files covering all standard icon sizes (16x16 through 512x512@2x) by compositing the mask with bundled folder template graphics via ImageMagick. The tool automatically adapts to the current macOS version (Big Sur or Tahoe style) and color scheme (light/dark), supports optional badges (alias, locked), and can assign the icon directly to a folder using AppleScript, fileicon, or Rez. The codebase is well-structured Rust with clean CLI argument parsing via clap, careful error handling, and comprehensive behavioral tests using Bun. It relies on external dependencies including ImageMagick, iconutil, and various macOS command-line utilities.
The LLM identified 2 files worth highlighting for reuse:
Provides a generic `run_command` function that spawns an external process with optional stdin and captures stdout/stderr, with typed error handling (CommandInvalid / CommandFailed). This abstraction isolates all subprocess calls and can be reused in any Rust project that needs to execute external tools with robust error reporting.
Builds command-line arguments for ImageMagick operations (resize, trim, composite, blur, etc.) through a fluent `CommandArgs` struct. Centralizes the ImageMagick interface in one module, making it eas to update or swap out image processing backends. The pattern of wrapping a complex CLI tool with a typed builder is reusable for other projects.