Commit Graph

16 Commits

Author SHA1 Message Date
6be61df8a0 fix: address code quality issues, validation gaps, and add test coverage
Phase 1 - Code Quality:
- Rename script/script.rs to script/types.rs (module inception fix)
- Apply Clippy lint fixes (is_none_or, is_some_and, char patterns, etc.)
- Implement FromStr for CatalogFile and Category
- Add filtered_targets() and filtered_repos() helpers to Config

Phase 2 - Validation & Error Handling:
- Add validate_repo_identifier() for GitHub shorthand validation
- Fix first-run setup to fail gracefully if no targets configured
- Improve import to collect failures and only save on success
- Add AssetInstallResult for detailed install failure tracking
- Fix lockfile timestamp documentation (Unix epoch, not RFC 3339)
- Add comprehensive RevType heuristics documentation
- Add checkout warning when local modifications will be discarded

Phase 3 - Test Coverage:
- Add tempfile, assert_cmd, predicates dev dependencies
- Add security tests (symlink boundaries, copy mode)
- Add git operations tests (init, head_commit, RevType parsing)
- Add lockfile tests (roundtrip, lock/get operations)
- Add CLI integration tests (help, validation, duplicates)
- Add config validation tests for new helper methods

All 48 tests pass, clippy clean, release build verified.
2026-01-26 10:19:10 +01:00
6f714e58fa Implement comprehensive improvement roadmap (Phases 0-4)
Phase 0 - Quick fixes:
- Fix catalog entries() return type (removed extra indirection)
- Fix welcome string (mpv-mgr → empeve)
- Fix HEAD detachment on update (branch-aware fast-forward)
- Add fetch_rev with branch detection

Phase 1 - Git model ("rev means rev"):
- Add RevType enum (Commit/Tag/Branch/Default)
- Add UpdateResult enum for update outcomes
- Implement clone_with_rev for proper revision checkout
- Pinned repos (commits/tags) skip auto-update

Phase 2 - Discovery & install fidelity:
- Support init.lua and named entry points for multi-file scripts
- Better asset mapping with prefix matching for configs
- Proactive target directory creation

Phase 3 - UX and quality-of-life:
- Add --verbose flag to status command
- Add 'empeve doctor' diagnostic command
- Improve error messages with actionable hints

Phase 4 - Feature expansion:
- External TOML catalog system (extensible)
- Import --convert-local for local script management
- Lockfile support for reproducible installations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 03:44:37 +01:00
17b6bfb76d Rename project from mpv-mgr to empeve
Rebrand the entire project with a memorable phonetic name:
- Update package and binary name in Cargo.toml
- Change config directory from ~/.config/mpv-mgr to ~/.config/empeve
- Rename MpvMgrError to EmpveError
- Update all CLI help text and user-facing messages
- Update README title and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 02:19:08 +01:00
76fd3dda5d Fix repository URLs to point to somegit.dev
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:37:31 +01:00
00e021f135 Add comprehensive README with badges and documentation
- Project description and feature highlights
- Installation instructions (from source)
- Quick start guide and usage examples
- Full commands reference with options
- Multi-target support documentation
- Configuration file format and options
- How it works explanation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:35:26 +01:00
999da3b27c Add multi-target support to all commands and --target CLI flag
- Add global --target flag to filter operations by target name
- Update install, list, clean commands to iterate over targets
- Update remove command to uninstall from all targets on --purge
- Update status command to show targets section
- Fix target filter to use exact name matching (not substring)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:33:26 +01:00
b2b2f7b71e Add multi-target mpv config support (Phase 1)
Core infrastructure for managing multiple mpv config folders:

Config changes (config.rs):
- Add TargetConfig struct for target definitions
- Add targets field to Config (list of target configs)
- Add targets field to RepoEntry (optional, defaults to all)
- Add should_install_to() for per-repo target filtering
- Add enabled_targets(), find_target(), add_target() helpers

Path detection (paths.rs):
- Add DetectedTarget struct for discovered configs
- Add detect_mpv_configs() to find mpv, jellyfin-mpv-shim, celluloid, flatpak
- Check for existing scripts in each detected folder

First-run setup (main.rs):
- Detect all mpv config folders on first run
- Interactive selection of which targets to manage
- Save selected targets to config

Install command (install.rs):
- Install scripts to multiple targets
- Per-repo target filtering via targets field
- Show target labels when installing to multiple targets

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 01:18:57 +01:00
1aa806ed90 Add MIT license 2025-12-15 01:09:56 +01:00
ba64e4b602 Fix sponsorblock repo: po5/mpv_sponsorblock (not sponsorblock_minimal) 2025-12-15 00:59:50 +01:00
635035e917 Replace sponsorblock repo and improve error handling
- Replace po5/sponsorblock_minimal with mxve/sponsorblock-mpv
  (original required authentication)
- Add failed repos tracking in install command
- Show failure summary with helpful error hints:
  - Authentication errors
  - 404/not found errors
  - Timeout errors
  - SSL certificate errors
- Add tip for removing failed repos
- Improved summary output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:57:17 +01:00
8214e3225f Improve selection format hint in browse command 2025-12-15 00:50:07 +01:00
327846de03 Add interactive mode to browse command
- Add -i/--interactive flag for browse command
- Display numbered entries for easy selection
- Support multiple selection formats: "1 3 5", "1,3,5", "1-5"
- Show checkmarks for already-configured repos
- Add selected repos directly to config without separate command
- Non-interactive mode shows tip about -i flag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:43:32 +01:00
b4ae635464 Add browse command with curated popular mpv scripts catalog
- Add src/catalog.rs with 15+ popular mpv scripts organized by category
- Categories: UI/OSC, Playback, Subtitles, Media, Utility
- Add 'browse' command to display catalog with descriptions
- Support category filtering (e.g., 'mpv-mgr browse ui')
- Mark already-configured repos with checkmark indicator
- Include custom repo: somegit.dev/anonfunc/mpv-scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:38:31 +01:00
b8a2e5cc7b Update description to 'Package manager for mpv scripts'
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:31:45 +01:00
dca1511869 Add progress spinners for clone and update operations
- Add indicatif crate for terminal progress indicators
- Add animated spinners during git clone operations
- Add animated spinners during git fetch/update operations
- Extract shared UI utilities into src/ui.rs module
- Improve visual feedback with checkmarks and status indicators

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:30:37 +01:00
97743f26ad Initial commit: mpv-mgr vim-plug style package manager
A CLI tool for managing mpv scripts inspired by vim-plug:
- Declarative config (config.toml) listing git repos
- Commands: add, remove, install, update, clean, status, list, import
- Auto-discovers .lua/.js scripts in repositories
- Symlinks scripts to ~/.config/mpv/scripts/
- Handles script assets (script-opts, fonts, shaders)
- First-run detection with import prompt for existing scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 00:28:05 +01:00