spmx
Commands

spmx migrate

Scan folders for existing projects and move their SwiftPM caches into the global store.

spmx migrate [<path>] [--home] [--apply] [--dry-run] [--no-deduplicate]
             [--harvest-only] [--install-hooks] [--max-depth <n>]
             [--exclude <pattern> ...] [--verbose] [--quiet]

Finds Flutter, Xcode and SwiftPM projects and Git worktrees under a directory, harvests their packages into the store and, by default, replaces their clean SourcePackages or .build entries with copy-on-write clones.

Dry run by default

Without --apply, nothing changes: you get a preview of what was found and the estimated savings.

Arguments and options

NameDescription
<path>directory to scan. Defaults to the current directory
--home, --allscan your home directory
--apply, --execute, --no-dry-runapply the migration
--dry-runpreview only (default)
--deduplicate / --no-deduplicatereplace clean entries with clones after harvesting. On by default
--harvest-onlyharvest into the store without deduplicating projects
--install-hooksinstall repo-local post-checkout hooks in discovered Git repositories
--max-depth <n>maximum traversal depth. Default 6
--exclude <pattern>skip directory names, path substrings or globs. Repeatable
-v, --verboseprint details for every scanned path
-q, --quietsuppress normal output

Examples

spmx migrate ~/dev                      # preview
spmx migrate ~/dev --apply              # harvest and deduplicate
spmx migrate ~/dev --apply --harvest-only
spmx migrate --home --exclude node_modules --exclude Archive
Maintained by LuisRibeirooLast updated Edit this page on GitHub