feat: TypeScript installation wizard with @clack/prompts TUI (#1)
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #1.
This commit is contained in:
10
install.sh
10
install.sh
@@ -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" "memory")
|
||||
PRESERVE_PATHS=("SOUL.md" "USER.md" "TOOLS.md" "memory")
|
||||
|
||||
# Colors (disabled if not a terminal)
|
||||
if [[ -t 1 ]]; then
|
||||
@@ -46,7 +46,7 @@ select_install_mode() {
|
||||
echo ""
|
||||
echo "Existing Mosaic install detected at: $TARGET_DIR"
|
||||
echo "Choose reinstall mode:"
|
||||
echo " 1) keep Keep local files (SOUL.md, memory/) while updating framework"
|
||||
echo " 1) keep Keep local files (SOUL.md, USER.md, TOOLS.md, memory/) while updating framework"
|
||||
echo " 2) overwrite Replace everything in $TARGET_DIR"
|
||||
echo " 3) cancel Abort install"
|
||||
printf "Selection [1/2/3] (default: 1): "
|
||||
@@ -131,7 +131,7 @@ mkdir -p "$TARGET_DIR"
|
||||
select_install_mode
|
||||
|
||||
if [[ "$INSTALL_MODE" == "keep" ]]; then
|
||||
ok "Install mode: keep local SOUL.md/memory while updating framework"
|
||||
ok "Install mode: keep local SOUL.md/USER.md/TOOLS.md/memory while updating framework"
|
||||
else
|
||||
ok "Install mode: overwrite existing files"
|
||||
fi
|
||||
@@ -226,7 +226,9 @@ if [[ "$PATH_CHANGED" == "true" ]]; then
|
||||
fi
|
||||
|
||||
if [[ ! -f "$TARGET_DIR/SOUL.md" ]]; then
|
||||
NEXT_STEPS+=("Run ${CYAN}mosaic init${RESET} to set up your agent identity (SOUL.md).")
|
||||
NEXT_STEPS+=("Run ${CYAN}mosaic init${RESET} to set up your agent identity (SOUL.md), user profile (USER.md), and tool config (TOOLS.md).")
|
||||
elif grep -q "not configured" "$TARGET_DIR/USER.md" 2>/dev/null; then
|
||||
NEXT_STEPS+=("Run ${CYAN}mosaic init${RESET} to personalize your user profile (USER.md) and tool config (TOOLS.md).")
|
||||
fi
|
||||
|
||||
if [[ ${#NEXT_STEPS[@]} -gt 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user