feat: ssr mackup scan|list|clean — on-demand cfg generation with confirmation

Instead of silently writing ~/.mackup/ssr-*.cfg on every sync, generation
is now an explicit opt-in command: ssr mackup scan

  ssr mackup scan   — dry-run: shows NEW/UPD/DEL changes, prompts before writing
  ssr mackup list   — list existing generated files
  ssr mackup clean  — remove all generated files (with confirmation)

ssr sync no longer calls generate_custom_cfg automatically.
Completions updated for zsh, bash, fish.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-12 13:39:17 +02:00
parent 3e54f0ca20
commit 36d4941c95
6 changed files with 235 additions and 9 deletions
+2 -1
View File
@@ -34,6 +34,7 @@ Commands:
config show|edit Print or edit the active config file.
completions Install or remove shell completions (zsh/bash/fish).
status Show last sync time, cloud target, and scheduled state.
mackup scan|list|clean Manage auto-generated Mackup app definitions.
version Print version.
Options:
@@ -62,7 +63,7 @@ done
cmd="$1"; shift
case "$cmd" in
install|sync|restore|update|schedule|config|completions|status)
install|sync|restore|update|schedule|config|completions|status|mackup)
target="$SSR_BIN_DIR/ssr-$cmd"
[[ -x "$target" ]] || ssr::die "Subcommand not executable: $target"
exec "$target" "$@"