feat: unify mosaic CLI — single binary, no PATH conflict
- 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).
This commit is contained in:
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TARGET_DIR="${MOSAIC_HOME:-$HOME/.config/mosaic}"
|
||||
INSTALL_MODE="${MOSAIC_INSTALL_MODE:-prompt}" # prompt|keep|overwrite
|
||||
PRESERVE_PATHS=("SOUL.md" "USER.md" "TOOLS.md" "memory")
|
||||
PRESERVE_PATHS=("SOUL.md" "USER.md" "TOOLS.md" "memory" "sources")
|
||||
|
||||
# Colors (disabled if not a terminal)
|
||||
if [[ -t 1 ]]; then
|
||||
@@ -21,7 +21,7 @@ step() { echo -e "\n${BOLD}$1${RESET}"; }
|
||||
|
||||
is_existing_install() {
|
||||
[[ -d "$TARGET_DIR" ]] || return 1
|
||||
[[ -f "$TARGET_DIR/bin/mosaic" || -f "$TARGET_DIR/AGENTS.md" || -f "$TARGET_DIR/SOUL.md" ]]
|
||||
[[ -f "$TARGET_DIR/bin/mosaic-launch" || -f "$TARGET_DIR/bin/mosaic" || -f "$TARGET_DIR/AGENTS.md" || -f "$TARGET_DIR/SOUL.md" ]]
|
||||
}
|
||||
|
||||
select_install_mode() {
|
||||
|
||||
Reference in New Issue
Block a user