feat: unify install.sh — single installer for framework + npm CLI
- tools/install.sh now installs both components: 1. Framework (bash launcher, guides, runtime configs) → ~/.config/mosaic/ 2. @mosaic/cli (TUI, gateway client, wizard) → ~/.npm-global/ - Downloads framework from monorepo archive (no bootstrap repo dependency) - Supports --framework, --cli, --check, --ref flags - Delete remote-install.sh and remote-install.ps1 (redundant redirectors) - Update all stale mosaic/bootstrap references → mosaic/mosaic-stack - Update README.md with monorepo install instructions Deprecates: mosaic/bootstrap repo
This commit is contained in:
@@ -80,7 +80,7 @@ USAGE
|
||||
check_mosaic_home() {
|
||||
if [[ ! -d "$MOSAIC_HOME" ]]; then
|
||||
echo "[mosaic] ERROR: ~/.config/mosaic not found." >&2
|
||||
echo "[mosaic] Install with: curl -sL https://git.mosaicstack.dev/mosaic/bootstrap/raw/branch/main/remote-install.sh | sh" >&2
|
||||
echo "[mosaic] Install with: bash <(curl -fsSL https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh)" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -88,7 +88,7 @@ check_mosaic_home() {
|
||||
check_agents_md() {
|
||||
if [[ ! -f "$MOSAIC_HOME/AGENTS.md" ]]; then
|
||||
echo "[mosaic] ERROR: ~/.config/mosaic/AGENTS.md not found." >&2
|
||||
echo "[mosaic] Re-run the installer: npm install -g @mosaic/mosaic" >&2
|
||||
echo "[mosaic] Re-run the installer: bash <(curl -fsSL https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh)" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ set -euo pipefail
|
||||
# mosaic-release-upgrade --ref v0.2.0 --overwrite --yes
|
||||
|
||||
MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
|
||||
REMOTE_SCRIPT_URL="${MOSAIC_REMOTE_INSTALL_URL:-https://git.mosaicstack.dev/mosaic/bootstrap/raw/branch/main/remote-install.sh}"
|
||||
REMOTE_SCRIPT_URL="${MOSAIC_REMOTE_INSTALL_URL:-https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh}"
|
||||
BOOTSTRAP_REF="${MOSAIC_BOOTSTRAP_REF:-main}"
|
||||
INSTALL_MODE="${MOSAIC_INSTALL_MODE:-keep}" # keep|overwrite
|
||||
YES=false
|
||||
|
||||
@@ -19,7 +19,7 @@ $MosaicHome = if ($env:MOSAIC_HOME) { $env:MOSAIC_HOME } else { Join-Path $env:U
|
||||
$RemoteInstallerUrl = if ($env:MOSAIC_REMOTE_INSTALL_URL) {
|
||||
$env:MOSAIC_REMOTE_INSTALL_URL
|
||||
} else {
|
||||
"https://git.mosaicstack.dev/mosaic/bootstrap/raw/branch/main/remote-install.ps1"
|
||||
"https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh"
|
||||
}
|
||||
|
||||
$installMode = if ($Overwrite) { "overwrite" } elseif ($Keep) { "keep" } elseif ($env:MOSAIC_INSTALL_MODE) { $env:MOSAIC_INSTALL_MODE } else { "keep" }
|
||||
|
||||
@@ -49,7 +49,7 @@ Options:
|
||||
function Assert-MosaicHome {
|
||||
if (-not (Test-Path $MosaicHome)) {
|
||||
Write-Host "[mosaic] ERROR: ~/.config/mosaic not found." -ForegroundColor Red
|
||||
Write-Host "[mosaic] Install with: irm https://git.mosaicstack.dev/mosaic/bootstrap/raw/branch/main/remote-install.ps1 | iex"
|
||||
Write-Host "[mosaic] Install with: bash <(curl -fsSL https://git.mosaicstack.dev/mosaic/mosaic-stack/raw/branch/main/tools/install.sh)"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user