$ show spicetify/cli
Spicetify CLI is a cross-platform tool for customizing the Spotify desktop client. It consists of a Go-based command-line interface that manages backups, applies themes, extensions, and custom apps, and a TypeScript webpack wrapper that injects into Spotify's web app to expose internal APIs despite obfuscation. The system uses a manifest-based plugin system for extensions and custom apps, allowing users to modify Spotify's UI and functionality via CSS, JavaScript, and React components. Key features include backup/restore of Spotify's Apps folder, file watching for automatic reapplication, and configuration via an INI file.
The LLM identified 4 files worth highlighting for reuse:
Dynamically inspects Spotify's webpack module cache to build a mapping of modules despite obfuscation, enabling stable access to internal APIs. This pattern is reusable for any webpack-based application to extract and expose functions/components without relying on brittle class names or hardcoded paths.
Loads extensions and custom apps from manifest.json files, manages their lifecycle, and facilitates communication via a centralized event bus. Demonstrates a reusable plugin architecture with declarative configuration, loose coupling, and runtime isolation that can be adapted to any host application.
Implements a recursive and non-recursive file watcher with debouncing to efficiently monitor file changes while minimizing event noise. Self-contained, dependency-light, and easily integrable into any Go project requiring filesystem monitoring with configurable callbacks and error handling.
Provides a robust backup and restore mechanism for application directories, featuring versioned backups, file extension filtering (.spa files), and safe restoration. This pattern is reusable for any tool that modifies files in a target application's directory and requires a reliable safety net with rollback capabilities.