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>
This commit is contained in:
34
Cargo.lock
generated
34
Cargo.lock
generated
@@ -284,6 +284,23 @@ version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
||||
|
||||
[[package]]
|
||||
name = "empeve"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"colored",
|
||||
"crossterm",
|
||||
"dirs",
|
||||
"git2",
|
||||
"indicatif",
|
||||
"ratatui",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"toml",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encode_unicode"
|
||||
version = "1.0.0"
|
||||
@@ -704,23 +721,6 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mpv-mgr"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"colored",
|
||||
"crossterm",
|
||||
"dirs",
|
||||
"git2",
|
||||
"indicatif",
|
||||
"ratatui",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"toml",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "number_prefix"
|
||||
version = "0.4.0"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "mpv-mgr"
|
||||
name = "empeve"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Package manager for mpv scripts"
|
||||
description = "Plugin manager for mpv"
|
||||
authors = ["vikingowl"]
|
||||
license = "MIT"
|
||||
repository = "https://somegit.dev/vikingowl/mpv-mgr"
|
||||
repository = "https://somegit.dev/vikingowl/empeve"
|
||||
keywords = ["mpv", "scripts", "package-manager", "cli"]
|
||||
categories = ["command-line-utilities", "multimedia"]
|
||||
|
||||
@@ -33,5 +33,5 @@ version = "0.28"
|
||||
optional = true
|
||||
|
||||
[[bin]]
|
||||
name = "mpv-mgr"
|
||||
name = "empeve"
|
||||
path = "src/main.rs"
|
||||
|
||||
74
README.md
74
README.md
@@ -1,9 +1,9 @@
|
||||
# mpv-mgr
|
||||
# empeve - plugin manager for mpv
|
||||
|
||||
[](LICENSE)
|
||||
[](https://www.rust-lang.org/)
|
||||
|
||||
A package manager for [mpv](https://mpv.io/) scripts. Manage your mpv scripts declaratively with simple commands - add repos, install, update, and keep everything in sync.
|
||||
A plugin manager for [mpv](https://mpv.io/) scripts. Manage your mpv scripts declaratively with simple commands - add repos, install, update, and keep everything in sync.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -21,8 +21,8 @@ A package manager for [mpv](https://mpv.io/) scripts. Manage your mpv scripts de
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://somegit.dev/vikingowl/mpv-mgr.git
|
||||
cd mpv-mgr
|
||||
git clone https://somegit.dev/vikingowl/empeve.git
|
||||
cd empeve
|
||||
|
||||
# Build and install
|
||||
cargo install --path .
|
||||
@@ -37,19 +37,19 @@ cargo install --path .
|
||||
|
||||
```bash
|
||||
# First run - detects mpv configs and prompts for setup
|
||||
mpv-mgr status
|
||||
empeve status
|
||||
|
||||
# Browse popular scripts and add interactively
|
||||
mpv-mgr browse -i
|
||||
empeve browse -i
|
||||
|
||||
# Or add a specific repo
|
||||
mpv-mgr add tomasklaen/uosc
|
||||
empeve add tomasklaen/uosc
|
||||
|
||||
# Install all configured repos
|
||||
mpv-mgr install
|
||||
empeve install
|
||||
|
||||
# Update all repos to latest
|
||||
mpv-mgr update
|
||||
empeve update
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -58,80 +58,80 @@ mpv-mgr update
|
||||
|
||||
```bash
|
||||
# Add from GitHub (user/repo shorthand)
|
||||
mpv-mgr add tomasklaen/uosc
|
||||
empeve add tomasklaen/uosc
|
||||
|
||||
# Add with specific branch/tag
|
||||
mpv-mgr add tomasklaen/uosc --rev v5.0.0
|
||||
empeve add tomasklaen/uosc --rev v5.0.0
|
||||
|
||||
# Add only specific scripts from a multi-script repo
|
||||
mpv-mgr add po5/mpv_sponsorblock --scripts sponsorblock.lua
|
||||
empeve add po5/mpv_sponsorblock --scripts sponsorblock.lua
|
||||
```
|
||||
|
||||
### Installing & Updating
|
||||
|
||||
```bash
|
||||
# Install all configured repos
|
||||
mpv-mgr install
|
||||
empeve install
|
||||
|
||||
# Force reinstall
|
||||
mpv-mgr install --force
|
||||
empeve install --force
|
||||
|
||||
# Install specific repo only
|
||||
mpv-mgr install uosc
|
||||
empeve install uosc
|
||||
|
||||
# Update all repos
|
||||
mpv-mgr update
|
||||
empeve update
|
||||
|
||||
# Update specific repo
|
||||
mpv-mgr update uosc
|
||||
empeve update uosc
|
||||
```
|
||||
|
||||
### Managing Scripts
|
||||
|
||||
```bash
|
||||
# Show status of all repos and targets
|
||||
mpv-mgr status
|
||||
empeve status
|
||||
|
||||
# List installed scripts
|
||||
mpv-mgr list
|
||||
empeve list
|
||||
|
||||
# List with details
|
||||
mpv-mgr list --detailed
|
||||
empeve list --detailed
|
||||
|
||||
# Remove a repo from config
|
||||
mpv-mgr remove tomasklaen/uosc
|
||||
empeve remove tomasklaen/uosc
|
||||
|
||||
# Remove and uninstall scripts
|
||||
mpv-mgr remove tomasklaen/uosc --purge
|
||||
empeve remove tomasklaen/uosc --purge
|
||||
|
||||
# Clean orphaned scripts and repos
|
||||
mpv-mgr clean
|
||||
empeve clean
|
||||
```
|
||||
|
||||
### Browsing Popular Scripts
|
||||
|
||||
```bash
|
||||
# Browse all curated scripts
|
||||
mpv-mgr browse
|
||||
empeve browse
|
||||
|
||||
# Filter by category
|
||||
mpv-mgr browse ui
|
||||
mpv-mgr browse playback
|
||||
mpv-mgr browse subtitles
|
||||
empeve browse ui
|
||||
empeve browse playback
|
||||
empeve browse subtitles
|
||||
|
||||
# Interactive mode - select and add repos
|
||||
mpv-mgr browse -i
|
||||
empeve browse -i
|
||||
```
|
||||
|
||||
### Multi-Target Support
|
||||
|
||||
mpv-mgr can manage multiple mpv configurations simultaneously:
|
||||
empeve can manage multiple mpv configurations simultaneously:
|
||||
|
||||
```bash
|
||||
# Filter operations to specific target
|
||||
mpv-mgr --target mpv install
|
||||
mpv-mgr --target jellyfin-mpv-shim list
|
||||
mpv-mgr -t mpv status
|
||||
empeve --target mpv install
|
||||
empeve --target jellyfin-mpv-shim list
|
||||
empeve -t mpv status
|
||||
```
|
||||
|
||||
Supported targets (auto-detected on first run):
|
||||
@@ -142,7 +142,7 @@ Supported targets (auto-detected on first run):
|
||||
|
||||
## Configuration
|
||||
|
||||
Config file location: `~/.config/mpv-mgr/config.toml`
|
||||
Config file location: `~/.config/empeve/config.toml`
|
||||
|
||||
```toml
|
||||
[settings]
|
||||
@@ -207,21 +207,21 @@ scripts = ["playlistmanager.lua"] # Only this script
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Repos are cloned** to `~/.config/mpv-mgr/repos/`
|
||||
1. **Repos are cloned** to `~/.config/empeve/repos/`
|
||||
2. **Scripts are symlinked** to your mpv scripts directory
|
||||
3. **Assets** (fonts, shaders, script-opts) are also symlinked
|
||||
4. **Updates** pull latest changes, symlinks stay valid
|
||||
|
||||
```
|
||||
~/.config/mpv-mgr/
|
||||
~/.config/empeve/
|
||||
├── config.toml
|
||||
└── repos/
|
||||
├── tomasklaen_uosc/
|
||||
└── po5_mpv_sponsorblock/
|
||||
|
||||
~/.config/mpv/scripts/
|
||||
├── uosc -> ~/.config/mpv-mgr/repos/tomasklaen_uosc/src/uosc/
|
||||
└── sponsorblock.lua -> ~/.config/mpv-mgr/repos/po5_mpv_sponsorblock/sponsorblock.lua
|
||||
├── uosc -> ~/.config/empeve/repos/tomasklaen_uosc/src/uosc/
|
||||
└── sponsorblock.lua -> ~/.config/empeve/repos/po5_mpv_sponsorblock/sponsorblock.lua
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
@@ -4,11 +4,11 @@ use std::path::PathBuf;
|
||||
use crate::commands::Commands;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "mpv-mgr")]
|
||||
#[command(author, version, about = "Package manager for mpv scripts")]
|
||||
#[command(name = "empeve")]
|
||||
#[command(author, version, about = "Plugin manager for mpv")]
|
||||
#[command(propagate_version = true)]
|
||||
pub struct Cli {
|
||||
/// Path to config file (default: ~/.config/mpv-mgr/config.toml)
|
||||
/// Path to config file (default: ~/.config/empeve/config.toml)
|
||||
#[arg(short, long, global = true)]
|
||||
pub config: Option<PathBuf>,
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ pub fn execute(repo: &str, rev: Option<String>, scripts: Option<Vec<String>>) ->
|
||||
);
|
||||
println!(
|
||||
"Run {} to install scripts from this repository.",
|
||||
"mpv-mgr install".yellow()
|
||||
"empeve install".yellow()
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -97,8 +97,8 @@ pub fn execute(category_filter: Option<String>, interactive: bool) -> Result<()>
|
||||
if !interactive {
|
||||
// Non-interactive mode: just show the list with hint
|
||||
println!("{}", "Tip:".bold());
|
||||
println!(" {} - Interactive selection mode", "mpv-mgr browse -i".cyan());
|
||||
println!(" {} - Add a specific repo", "mpv-mgr add <repo>".cyan());
|
||||
println!(" {} - Interactive selection mode", "empeve browse -i".cyan());
|
||||
println!(" {} - Add a specific repo", "empeve add <repo>".cyan());
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ pub fn execute(category_filter: Option<String>, interactive: bool) -> Result<()>
|
||||
);
|
||||
println!(
|
||||
"Run {} to install scripts",
|
||||
"mpv-mgr install".cyan()
|
||||
"empeve install".cyan()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ pub fn execute() -> Result<()> {
|
||||
|
||||
if importable.is_empty() {
|
||||
println!("{}", "No importable scripts found.".green());
|
||||
println!("All scripts are either managed by mpv-mgr or are local files.");
|
||||
println!("All scripts are either managed by empeve or are local files.");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ pub fn execute() -> Result<()> {
|
||||
}
|
||||
|
||||
print!(
|
||||
"\nImport {} repository(ies) to mpv-mgr config? [Y/n] ",
|
||||
"\nImport {} repository(ies) to empeve config? [Y/n] ",
|
||||
repos_to_import.len()
|
||||
);
|
||||
io::stdout().flush()?;
|
||||
@@ -149,7 +149,7 @@ pub fn execute() -> Result<()> {
|
||||
println!(
|
||||
"{} Run {} to clone the repositories.",
|
||||
"Done!".green().bold(),
|
||||
"mpv-mgr install".cyan()
|
||||
"empeve install".cyan()
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -18,7 +18,7 @@ pub fn execute(force: bool, repos_filter: Option<Vec<String>>, target_filter: Op
|
||||
println!("{}", "No repositories configured.".yellow());
|
||||
println!(
|
||||
"Add a repository with: {}",
|
||||
"mpv-mgr add <user/repo>".cyan()
|
||||
"empeve add <user/repo>".cyan()
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
@@ -44,7 +44,7 @@ pub fn execute(force: bool, repos_filter: Option<Vec<String>>, target_filter: Op
|
||||
println!("{}", "No targets configured.".yellow());
|
||||
println!(
|
||||
"Run {} to set up targets, or delete {} to reconfigure.",
|
||||
"mpv-mgr".cyan(),
|
||||
"empeve".cyan(),
|
||||
paths.config_file.display().to_string().dimmed()
|
||||
);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ pub fn execute(force: bool, repos_filter: Option<Vec<String>>, target_filter: Op
|
||||
println!(
|
||||
"{} Remove failed repos with: {}",
|
||||
"Tip:".bold(),
|
||||
"mpv-mgr remove <repo>".cyan()
|
||||
"empeve remove <repo>".cyan()
|
||||
);
|
||||
println!("{}", "─".repeat(50).dimmed());
|
||||
println!();
|
||||
@@ -233,7 +233,7 @@ pub fn execute(force: bool, repos_filter: Option<Vec<String>>, target_filter: Op
|
||||
}
|
||||
|
||||
/// Format clone errors with helpful hints
|
||||
fn format_clone_error(error: &crate::error::MpvMgrError) -> String {
|
||||
fn format_clone_error(error: &crate::error::EmpveError) -> String {
|
||||
let error_str = error.to_string();
|
||||
|
||||
if error_str.contains("authentication required") || error_str.contains("Auth") {
|
||||
|
||||
@@ -131,7 +131,7 @@ pub fn execute(detailed: bool, target_filter: Option<Vec<String>>) -> Result<()>
|
||||
);
|
||||
} else {
|
||||
println!(
|
||||
"{} {} total ({} managed by mpv-mgr, {} external)",
|
||||
"{} {} total ({} managed by empeve, {} external)",
|
||||
"Summary:".bold(),
|
||||
total_scripts.to_string().cyan(),
|
||||
total_managed.to_string().green(),
|
||||
@@ -144,7 +144,7 @@ pub fn execute(detailed: bool, target_filter: Option<Vec<String>>) -> Result<()>
|
||||
println!(
|
||||
"{} Run {} to import existing scripts.",
|
||||
"Tip:".yellow(),
|
||||
"mpv-mgr import".cyan()
|
||||
"empeve import".cyan()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn execute(repo: &str, purge: bool) -> Result<()> {
|
||||
if !purge {
|
||||
println!(
|
||||
"Run {} to clean up orphaned scripts and repos.",
|
||||
"mpv-mgr clean".yellow()
|
||||
"empeve clean".yellow()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ pub fn execute() -> Result<()> {
|
||||
println!("{}", "No repositories configured.".yellow());
|
||||
println!(
|
||||
"Add a repository with: {}",
|
||||
"mpv-mgr add <user/repo>".cyan()
|
||||
"empeve add <user/repo>".cyan()
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use crate::error::{MpvMgrError, Result};
|
||||
use crate::error::{EmpveError, Result};
|
||||
|
||||
/// Target mpv configuration (e.g., mpv, jellyfin-mpv-shim)
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||
@@ -220,7 +220,7 @@ impl Config {
|
||||
pub fn add_repo(&mut self, entry: RepoEntry) -> Result<()> {
|
||||
// Check if repo already exists
|
||||
if self.repos.iter().any(|r| r.repo == entry.repo) {
|
||||
return Err(MpvMgrError::RepoExists(entry.repo));
|
||||
return Err(EmpveError::RepoExists(entry.repo));
|
||||
}
|
||||
|
||||
self.repos.push(entry);
|
||||
@@ -233,7 +233,7 @@ impl Config {
|
||||
.repos
|
||||
.iter()
|
||||
.position(|r| r.repo == identifier)
|
||||
.ok_or_else(|| MpvMgrError::RepoNotFound(identifier.into()))?;
|
||||
.ok_or_else(|| EmpveError::RepoNotFound(identifier.into()))?;
|
||||
|
||||
Ok(self.repos.remove(position))
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum MpvMgrError {
|
||||
pub enum EmpveError {
|
||||
#[error("Config error: {0}")]
|
||||
Config(String),
|
||||
|
||||
@@ -30,4 +30,4 @@ pub enum MpvMgrError {
|
||||
InvalidRepo(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, MpvMgrError>;
|
||||
pub type Result<T> = std::result::Result<T, EmpveError>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use clap::Parser;
|
||||
use colored::Colorize;
|
||||
use mpv_mgr::{cli::Cli, commands, config::Config, error::Result, paths::{detect_mpv_configs, Paths}};
|
||||
use empeve::{cli::Cli, commands, config::Config, error::Result, paths::{detect_mpv_configs, Paths}};
|
||||
use std::io::{self, Write};
|
||||
|
||||
fn main() {
|
||||
@@ -76,7 +76,7 @@ fn check_first_run(command: &commands::Commands) -> Result<()> {
|
||||
|
||||
if detected.is_empty() {
|
||||
// No mpv configs found - create default config
|
||||
println!("{}", "Welcome to mpv-mgr!".green().bold());
|
||||
println!("{}", "Welcome to empeve!".green().bold());
|
||||
println!();
|
||||
println!("{}", "No mpv configuration folders detected.".yellow());
|
||||
println!("Creating default configuration...");
|
||||
@@ -152,7 +152,7 @@ fn check_first_run(command: &commands::Commands) -> Result<()> {
|
||||
println!(
|
||||
"{} Configuration saved. Run {} to browse and add scripts.",
|
||||
"Done!".green().bold(),
|
||||
"mpv-mgr browse -i".cyan()
|
||||
"empeve browse -i".cyan()
|
||||
);
|
||||
println!();
|
||||
|
||||
|
||||
14
src/paths.rs
14
src/paths.rs
@@ -1,18 +1,18 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::config::TargetConfig;
|
||||
use crate::error::{MpvMgrError, Result};
|
||||
use crate::error::{EmpveError, Result};
|
||||
|
||||
/// Manages all paths used by mpv-mgr following XDG conventions
|
||||
/// Manages all paths used by empeve following XDG conventions
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Paths {
|
||||
/// Base config directory (~/.config/mpv-mgr)
|
||||
/// Base config directory (~/.config/empeve)
|
||||
pub config_dir: PathBuf,
|
||||
|
||||
/// Config file path (~/.config/mpv-mgr/config.toml)
|
||||
/// Config file path (~/.config/empeve/config.toml)
|
||||
pub config_file: PathBuf,
|
||||
|
||||
/// Directory for cloned repos (~/.config/mpv-mgr/repos)
|
||||
/// Directory for cloned repos (~/.config/empeve/repos)
|
||||
pub repos_dir: PathBuf,
|
||||
|
||||
/// mpv scripts directory (~/.config/mpv/scripts)
|
||||
@@ -32,9 +32,9 @@ impl Paths {
|
||||
/// Create a new Paths instance using XDG conventions
|
||||
pub fn new() -> Result<Self> {
|
||||
let config_base = dirs::config_dir()
|
||||
.ok_or_else(|| MpvMgrError::Config("Could not determine config directory".into()))?;
|
||||
.ok_or_else(|| EmpveError::Config("Could not determine config directory".into()))?;
|
||||
|
||||
let config_dir = config_base.join("mpv-mgr");
|
||||
let config_dir = config_base.join("empeve");
|
||||
let mpv_dir = config_base.join("mpv");
|
||||
|
||||
Ok(Self {
|
||||
|
||||
@@ -35,7 +35,7 @@ pub struct ScriptInstaller {
|
||||
/// Target directory for shaders (~/.config/mpv/shaders)
|
||||
mpv_shaders_dir: PathBuf,
|
||||
|
||||
/// Source repos directory (~/.config/mpv-mgr/repos)
|
||||
/// Source repos directory (~/.config/empeve/repos)
|
||||
repos_dir: PathBuf,
|
||||
|
||||
/// Whether to use symlinks (true) or copy (false)
|
||||
@@ -150,7 +150,7 @@ impl ScriptInstaller {
|
||||
}
|
||||
|
||||
// Check if directory is writable
|
||||
let test_file = dest_dir.join(".mpv-mgr-test");
|
||||
let test_file = dest_dir.join(".empeve-test");
|
||||
if std::fs::write(&test_file, "").is_err() {
|
||||
return None;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ impl ScriptInstaller {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Find all installed scripts that are managed by mpv-mgr
|
||||
/// Find all installed scripts that are managed by empeve
|
||||
pub fn find_installed(&self) -> Result<Vec<InstalledScript>> {
|
||||
let mut installed = Vec::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user