feat/configurable paths#12
Conversation
Add --skills-dir and --vault-dir flags so paths are no longer locked to the two hardcoded --agent presets. --agent now provides base defaults that explicit path flags override (additive, backward-compatible). Harden the destructive migration (shutil.move/rmtree) per CLI guidelines: - --dry-run previews the plan without moving or writing anything - confirmation prompt before migrating, with --force/--yes to skip and a non-interactive guard that refuses without --force - path validation: reject identical skills/vault paths or a vault nested inside the skills dir - respect --no-color, NO_COLOR, TERM=dumb, and non-TTY for color output - proper exit codes (0 success, 1 failure, 130 on Ctrl-C) Legacy 'python setup.py install' (Install.bat/vbs) still works via parse_known_args. Document the new flags and a custom-path example in the README.
Dry-run previously reported only per-category counts. The skill -> category mapping was already computed in build_migration_plan() but never printed, so skills falling into _uncategorized vanished into a number. Add print_migration_detail(), called from the dry-run branch, which groups the plan by category and lists each skill folder under its destination. The _uncategorized bucket is forced last and highlighted so unmatched skills are easy to spot and fix before the destructive move. The interactive confirm path keeps the compact count summary to avoid spamming the prompt at scale.
Ported from PR blacksiders#7 by @redlotusaustin. shutil.rmtree on a symlink follows it into the target and destroys its contents; use unlink() instead. Also pass the explicit dest path to shutil.move rather than the parent category dir to remove ambiguity.
|
Hey @redlotusaustin — I only just noticed #7 after opening this one, and I wanted to acknowledge that you got there first. Apologies for the overlap. Your PR had two solid fixes I hadn't included — the symlink-safe deletion and the explicit Since this PR is a superset of yours — same custom path flags, plus I'd suggest the maintainer close #7 in favor of this one. Either way, thanks for the groundwork. 🙏 |
Summary
Adds
--skills-dirand--vault-dirflags so users can pointsetup.pyat any paths instead of being locked to the--agentpresets. The existing--agentflag remains as a shorthand; explicit path flags override it.Also ships
--dry-run,--force, and--no-colorflags, and a significant internal refactor that separates the read-only planning phase from the destructive move phase.New flags:
--skills-dir PATH--vault-dir PATH-n/--dry-run-f/-y/--force--no-colorChanges
setup.py—migrate_skills()split intobuild_migration_plan()(read-only scan),print_migration_summary(),print_migration_detail()(per-skill breakdown, shown in--dry-run), andexecute_migration().setup_directories()replaced byvalidate_directories()(no side effects).main()now returns proper exit codes. Non-interactive sessions refuse to migrate without--force.README.md— Documents the new flags with examples.Test plan
python setup.py --dry-runprints plan and exits without moving anythingpython setup.py --skills-dir ~/custom/skills --vault-dir ~/custom/vault --dry-runrespects both overridespython setup.py --forceskips confirmation and migrates--forceexits with an error--no-colorproduces plain text output--agent claudepreset still works as before