feat: unify mosaic CLI — single binary, no PATH conflict #351
Reference in New Issue
Block a user
Delete Branch "feat/unify-mosaic-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two different binaries both named
mosaic:~/.config/mosaic/bin/mosaic(bash framework launcher)~/.npm-global/bin/mosaic(npm CLI)Whichever appears first on PATH shadows the other. Users had to carefully order PATH entries.
Solution
One
mosaicbinary — the npm CLI (@mosaic/cli) is the single entrypoint.Runtime commands (
claude,codex,opencode,pi,yolo) and framework management commands (init,doctor,sync,seq,bootstrap,coord,upgrade) delegate to the renamedmosaic-launchbash script viaexecFileSyncat its absolute path (~/.config/mosaic/bin/mosaic-launch).Users only need
~/.npm-global/binon PATH.Changes
packages/mosaic/framework/bin/mosaic→mosaic-launchpackages/cli/src/cli.tstools/install.shmosaicbinary, simplified summarypackages/mosaic/framework/install.shsourcesto preserved paths (fixes rsync noise about agent-skills)packages/mosaic/framework/tools/orchestrator/session-run.shmosaic-launchAfter this change
All from a single
mosaicbinary.- Rename framework bash launcher: mosaic → mosaic-launch - npm CLI (@mosaic/cli) is now the single 'mosaic' binary on PATH - Add launcher delegation: mosaic {claude,codex,opencode,pi,yolo} delegates to mosaic-launch via execFileSync with inherited stdio - Add delegated management commands: init, doctor, sync, seq, bootstrap, coord, upgrade - install.sh: remove framework bin PATH requirement, clean up old mosaic binary on upgrade, simplified summary output - framework install.sh: preserve sources/ dir (fixes rsync noise about agent-skills) - session-run.sh: update references to mosaic-launch Users now only need ~/.npm-global/bin on PATH. The npm CLI finds mosaic-launch at its absolute path (~/.config/mosaic/bin/mosaic-launch).0a76afb7f2to2b99908de42b99908de4to15830e2f2a