Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-01 14:57)

Ruben Lütke25c76e021fed
diff --git a/install/install-verify.ps1 b/install/install-verify.ps1
index 506bf0a8ed..41a70790d4 100644
--- a/install/install-verify.ps1
+++ b/install/install-verify.ps1
@@ -198,17 +198,30 @@ function Get-PubkeyFingerprint([string]$PemText) {
return ([System.BitConverter]::ToString($hash) -replace '-', '').ToLower()
}
-$banner = @'
-
- ____ _ _ _
-| _ \ ___ _ __ ___ ___ _ __ __ _ | | | | __ _ _ ____ _(_)___
-| |_) / _ \ '__/ __|/ _ \| '_ \ / _` || |_| |/ _` | '__\ \ / / / __|
-| __/ __/ | \__ \ (_) | | | | (_| || _ | (_| | | \ V /| \__ \
-|_| \___|_| |___/\___/|_| |_|\__,_||_| |_|\__,_|_| \_/ |_|___/
-
- Verifying installer (Sigstore + offline ceremony + SLSA L3, Wave 3)
-'@
-Write-Host $banner -ForegroundColor Cyan
+# Render UTF-8 block glyphs + 24-bit brand gold. Banner art is machine-
+# generated (figlet ANSI Shadow) and lives inside the here-string, where
+# non-ASCII is syntactically inert; do not hand-edit -- that is how the
+# historical Harvis typo crept in. (Source stays ASCII outside the banner:
+# this file is served BOM-less and Windows PowerShell reads it as cp1252.)
+try { [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 } catch {}
+${_g} = "$([char]27)[38;2;231;196;110m"
+${_d} = "$([char]27)[38;2;140;140;140m"
+${_b} = "$([char]27)[1m"
+${_r} = "$([char]27)[0m"
+$banner = @"
+
+${_g} P E R S O N A L
+ ██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗
+ ██║██╔══██╗██╔══██╗██║ ██║██║██╔════╝
+ ██║███████║██████╔╝██║ ██║██║███████╗
+██ ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║
+╚█████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║███████║
+ ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚══════╝${_r}
+
+${_g} ●${_r} ${_b}Verifying installer · Windows${_r}
+${_d} Sigstore + offline ceremony + SLSA L3 + ML-DSA-65 (Wave 3)${_r}
+"@
+Write-Host $banner
# ------------------------------------------------------------------- tag
Write-Host ''
diff --git a/install/install-verify.sh b/install/install-verify.sh
index 99864ad180..1540484ced 100755
--- a/install/install-verify.sh
+++ b/install/install-verify.sh
@@ -256,8 +256,9 @@ if [ -t 1 ]; then
BOLD=$(printf '\033[1m'); CYAN=$(printf '\033[36m')
YELLOW=$(printf '\033[33m'); GREEN=$(printf '\033[32m')
RED=$(printf '\033[31m'); RESET=$(printf '\033[0m')
+ GOLD=$(printf '\033[38;2;231;196;110m'); DIM=$(printf '\033[38;2;140;140;140m')
else
- BOLD=""; CYAN=""; YELLOW=""; GREEN=""; RED=""; RESET=""
+ BOLD=""; CYAN=""; YELLOW=""; GREEN=""; RED=""; RESET=""; GOLD=""; DIM=""
fi
log() { printf '%s\n' "$*"; }
@@ -265,15 +266,20 @@ note() { printf '%s%s%s\n' "${YELLOW}" "$*" "${RESET}"; }
ok() { printf '%s%s%s\n' "${GREEN}" "$*" "${RESET}"; }
err() { printf '%s%s%s\n' "${RED}" "$*" "${RESET}" >&2; }
+# Banner art is machine-generated (figlet "ANSI Shadow"); do not hand-edit —
+# that is how the historical "Harvis" typo crept in.
cat <<EOF
-${CYAN} ____ _ _ _
-| _ \\ ___ _ __ ___ ___ _ __ __ _ | | | | __ _ _ ____ _(_)___
-| |_) / _ \\ '__/ __|/ _ \\| '_ \\ / _\` || |_| |/ _\` | '__\\ \\ / / / __|
-| __/ __/ | \\__ \\ (_) | | | | (_| || _ | (_| | | \\ V /| \\__ \\
-|_| \\___|_| |___/\\___/|_| |_|\\__,_||_| |_|\\__,_|_| \\_/ |_|___/${RESET}
+${GOLD} P E R S O N A L
+ ██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗
+ ██║██╔══██╗██╔══██╗██║ ██║██║██╔════╝
+ ██║███████║██████╔╝██║ ██║██║███████╗
+██ ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║
+╚█████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║███████║
+ ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚══════╝${RESET}
- ${BOLD}Verifying installer (Sigstore + offline ceremony + SLSA L3, Wave 3)${RESET}
+${GOLD} ●${RESET} ${BOLD}Verifying installer · macOS / Linux${RESET}
+${DIM} Sigstore + offline ceremony + SLSA L3 + ML-DSA-65 (Wave 3)${RESET}
EOF
diff --git a/install/install.ps1 b/install/install.ps1
index 063b09062a..0cb029e593 100644
--- a/install/install.ps1
+++ b/install/install.ps1
@@ -1,4 +1,4 @@
-# Personal Jarvis — Windows quick-install bootstrap (Stage 1)
+# Personal Jarvis - Windows quick-install bootstrap (Stage 1)
#
# Usage (from PowerShell):
# irm https://raw.githubusercontent.com/PersonalJarvis/PersonalJarvis/main/install/install.ps1 | iex
@@ -13,22 +13,65 @@
# All heavy logic lives in installer.py so it can be unit-tested and
# kept cross-platform. This file is meant to be read top-to-bottom in
# under 60 seconds before you paste it into a terminal.
+#
+# SOURCE-ENCODING RULE: this file is served BOM-less (a BOM breaks
+# `irm | iex`), and Windows PowerShell then reads it as cp1252. So the
+# source OUTSIDE the banner here-string stays pure ASCII: the glyphs (bullet,
+# check, cross) are built from code points at runtime, never pasted as
+# literals -- a literal check/dash would cp1252-decode into a smart quote and
+# break tokenizing. Console output is forced to UTF-8 so they still render.
$ErrorActionPreference = 'Stop'
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
-# ----------------------------------------------------------------- branding
-$banner = @'
+# ----------------------------------------------------------------- terminal
+# Render UTF-8 box/block glyphs and 24-bit color. Virtual-terminal (ANSI)
+# processing is on by default on Windows 10 1511+ / Windows Terminal /
+# modern PowerShell hosts.
+try { [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 } catch {}
+
+# 24-bit brand palette (Charcoal + Gold). Embedded as ANSI escapes so the
+# whole line is one gold sweep. NB: brace the var -- "$e[..." would parse as
+# an array index.
+$e = [char]27
+$Gold = "${e}[38;2;231;196;110m"
+$Green = "${e}[38;2;122;200;140m"
+$Dim = "${e}[38;2;140;140;140m"
+$Red = "${e}[38;2;224;122;110m"
+$Bold = "${e}[1m"
+$Rst = "${e}[0m"
+
+# Status glyphs from code points (keeps the source ASCII; see encoding rule).
+$Dot = [char]0x25CF # round bullet
+$Chk = [char]0x2713 # check mark
+$Crs = [char]0x2717 # cross mark
+
+# ----------------------------------------------------------------- helpers
+function Write-Banner([string]$Subtitle) {
+ # Banner glyphs are machine-generated (figlet ANSI Shadow) and live inside
+ # this here-string, where non-ASCII is syntactically inert. Do not
+ # hand-edit -- that is how the historical Harvis typo crept in.
+ $art = @"
+
+$Gold P E R S O N A L$Rst
+$Gold ██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗
+$Gold ██║██╔══██╗██╔══██╗██║ ██║██║██╔════╝
+$Gold ██║███████║██████╔╝██║ ██║██║███████╗
+$Gold██ ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║
+$Gold╚█████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║███████║
+$Gold ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚══════╝$Rst
+
+$Gold $Dot$Rst $Bold$Subtitle$Rst
+"@
+ Write-Host $art
+}
- ____ _ _ _
-| _ \ ___ _ __ ___ ___ _ __ __ _ | | | | __ _ _ ____ _(_)___
-| |_) / _ \ '__/ __|/ _ \| '_ \ / _` || |_| |/ _` | '__\ \ / / / __|
-| __/ __/ | \__ \ (_) | | | | (_| || _ | (_| | | \ V /| \__ \
-|_| \___|_| |___/\___/|_| |_|\__,_||_| |_|\__,_|_| \_/ |_|___/
+function Write-Step([string]$Text) { Write-Host ""; Write-Host "$Gold $Dot$Rst $Bold$Text$Rst" }
+function Write-Ok([string]$Text) { Write-Host "$Green $Chk$Rst $Dim$Text$Rst" }
+function Write-Note([string]$Text) { Write-Host "$Dim $Text$Rst" }
+function Write-Err([string]$Text) { Write-Host "$Red $Crs $Text$Rst" }
- Quick install (Windows)
-'@
-Write-Host $banner -ForegroundColor Cyan
+Write-Banner 'Quick install - Windows'
# ----------------------------------------------------------------- config
$RepoUrl = if ($env:JARVIS_INSTALL_REPO) { $env:JARVIS_INSTALL_REPO } else { 'https://github.com/PersonalJarvis/PersonalJarvis.git' }
@@ -62,57 +105,64 @@ function Test-PythonVersion {
}
# ----------------------------------------------------------------- preflight
-Write-Host ''
-Write-Host '[1/5] Checking prerequisites...' -ForegroundColor Yellow
+Write-Step 'Checking prerequisites'
# Python: try `python` first, then `py -3.11`, then `py -3`.
$pythonExe = $null
+$pythonVer = $null
foreach ($candidate in @('python', 'py')) {
- if (Test-PythonVersion $candidate) { $pythonExe = $candidate; break }
+ if (Test-PythonVersion $candidate) {
+ $pythonExe = $candidate
+ $info = Test-Tool $candidate
+ if ($info.Version -match '(Python\s+\d+\.\d+\.\d+)') { $pythonVer = $Matches[1] } else { $pythonVer = $candidate }
+ break
+ }
}
if (-not $pythonExe) {
- Write-Host ''
- Write-Host ' Python 3.11+ not found.' -ForegroundColor Red
- Write-Host ' Install it from https://www.python.org/downloads/ then re-run this command.' -ForegroundColor Red
- Write-Host ' (After install, open a NEW PowerShell window so PATH refreshes.)'
+ Write-Err 'Python 3.11+ not found.'
+ Write-Note 'Install it from https://www.python.org/downloads/ then re-run this command.'
+ Write-Note '(After install, open a NEW PowerShell window so PATH refreshes.)'
exit 1
}
-Write-Host " Python OK ($pythonExe)" -ForegroundColor Green
+Write-Ok "$pythonVer"
# Git
$gitCheck = Test-Tool 'git'
if (-not $gitCheck.Found) {
- Write-Host ''
- Write-Host ' git not found.' -ForegroundColor Red
- Write-Host ' Install from https://git-scm.com/download/win then re-run this command.' -ForegroundColor Red
+ Write-Err 'git not found.'
+ Write-Note 'Install from https://git-scm.com/download/win then re-run this command.'
exit 1
}
-Write-Host ' git OK' -ForegroundColor Green
+Write-Ok 'git'
# ----------------------------------------------------------------- clone / update
-Write-Host ''
-Write-Host "[2/5] Preparing repo at $InstallDir ..." -ForegroundColor Yellow
+Write-Step 'Fetching Personal Jarvis'
+Write-Note $InstallDir
if (Test-Path (Join-Path $InstallDir '.git')) {
- Write-Host ' existing checkout found — pulling latest...' -ForegroundColor Green
Push-Location $InstallDir
try {
- & git fetch --depth 1 origin $Branch
- & git checkout $Branch
- & git reset --hard "origin/$Branch"
+ # --quiet keeps the noisy "Receiving objects: NN%" churn out of the
+ # clean transcript; real errors still surface on stderr.
+ & git fetch --quiet --depth 1 origin $Branch
+ & git checkout --quiet $Branch
+ & git reset --quiet --hard "origin/$Branch"
} finally {
Pop-Location
}
+ Write-Ok 'updated existing checkout to latest'
} else {
if (Test-Path $InstallDir) {
- Write-Host " $InstallDir exists but is not a git repo. Aborting to avoid clobbering your files." -ForegroundColor Red
- Write-Host ' Remove or move that directory, then re-run.' -ForegroundColor Red
+ Write-Err "$InstallDir exists but is not a git repo."
+ Write-Note 'Aborting to avoid clobbering your files. Remove or move that directory, then re-run.'
exit 1
}
- & git clone --depth 1 --branch $Branch $RepoUrl $InstallDir
+ & git clone --quiet --depth 1 --branch $Branch $RepoUrl $InstallDir
+ if ($LASTEXITCODE -ne 0) { Write-Err 'git clone failed.'; exit 1 }
+ Write-Ok 'downloaded'
}
-# WAVE 5 — payload-commit pin (axis E, Wave-5 audit Finding 2).
+# WAVE 5 - payload-commit pin (axis E, Wave-5 audit Finding 2).
#
# install-verify.ps1 sets $env:JARVIS_PAYLOAD_COMMIT containing the
# signed payload commit SHA (Wave 1+2+4-authenticated). If set, bind the
@@ -122,72 +172,68 @@ if (Test-Path (Join-Path $InstallDir '.git')) {
if ($env:JARVIS_PAYLOAD_COMMIT) {
$PayloadCommit = $env:JARVIS_PAYLOAD_COMMIT
if ($PayloadCommit -notmatch '^[0-9a-f]{40}([0-9a-f]{24})?$') {
- Write-Host " JARVIS_PAYLOAD_COMMIT is not a well-formed git SHA: '$PayloadCommit' - refusing." -ForegroundColor Red
+ Write-Err "JARVIS_PAYLOAD_COMMIT is not a well-formed git SHA: '$PayloadCommit' - refusing."
exit 1
}
- Write-Host " pinning clone to signed commit $PayloadCommit..." -ForegroundColor Yellow
Push-Location $InstallDir
try {
# Shallow clones don't carry full history; deepen to retrieve the
# target SHA explicitly. github.com defaults allow fetching arbitrary
# SHAs on most repos; fall back to unshallow if direct-SHA fetch
# fails (e.g. tag pushed but workflow ref-name was the merge commit).
- & git fetch --depth 1 origin $PayloadCommit 2>$null
+ & git fetch --quiet --depth 1 origin $PayloadCommit 2>$null
if ($LASTEXITCODE -ne 0) {
- & git fetch --unshallow origin
- if ($LASTEXITCODE -ne 0) { & git fetch origin }
+ & git fetch --quiet --unshallow origin
+ if ($LASTEXITCODE -ne 0) { & git fetch --quiet origin }
}
- & git checkout --detach $PayloadCommit
+ & git checkout --quiet --detach $PayloadCommit
if ($LASTEXITCODE -ne 0) {
- Write-Host " failed to checkout payload-commit $PayloadCommit - refusing." -ForegroundColor Red
- Write-Host ' the cloned tree does not contain the signed commit; release may be inconsistent.' -ForegroundColor Red
+ Write-Err "failed to checkout payload-commit $PayloadCommit - refusing."
+ Write-Note 'the cloned tree does not contain the signed commit; release may be inconsistent.'
exit 1
}
# Defensive verify: HEAD must be exactly the signed SHA byte-for-byte.
$ActualHead = (& git rev-parse HEAD).Trim()
if ($ActualHead -ne $PayloadCommit) {
- Write-Host " HEAD drift detected: pinned=$PayloadCommit, actual=$ActualHead - refusing." -ForegroundColor Red
+ Write-Err "HEAD drift detected: pinned=$PayloadCommit, actual=$ActualHead - refusing."
exit 1
}
- Write-Host " clone pinned to $PayloadCommit" -ForegroundColor Green
+ Write-Ok "pinned to signed commit $($PayloadCommit.Substring(0,12))"
} finally {
Pop-Location
}
}
-Write-Host ' repo ready' -ForegroundColor Green
# ----------------------------------------------------------------- venv
-Write-Host ''
-Write-Host '[3/5] Creating Python virtual environment...' -ForegroundColor Yellow
+Write-Step 'Creating Python environment'
$VenvPath = Join-Path $InstallDir '.venv'
$VenvPython = Join-Path $VenvPath 'Scripts\python.exe'
if (-not (Test-Path $VenvPython)) {
& $pythonExe -m venv $VenvPath
- if ($LASTEXITCODE -ne 0) { Write-Host ' venv creation failed.' -ForegroundColor Red; exit 1 }
+ if ($LASTEXITCODE -ne 0) { Write-Err 'venv creation failed.'; exit 1 }
}
-Write-Host ' venv OK' -ForegroundColor Green
+Write-Ok 'virtual environment ready'
# ----------------------------------------------------------------- bootstrap deps
-Write-Host ''
-Write-Host '[4/5] Installing bootstrap dependencies (rich, packaging)...' -ForegroundColor Yellow
+Write-Step 'Installing bootstrap dependencies'
+Write-Note 'rich, packaging'
& $VenvPython -m pip install --quiet --upgrade pip
& $VenvPython -m pip install --quiet rich packaging
-if ($LASTEXITCODE -ne 0) { Write-Host ' bootstrap pip install failed.' -ForegroundColor Red; exit 1 }
-Write-Host ' bootstrap deps OK' -ForegroundColor Green
+if ($LASTEXITCODE -ne 0) { Write-Err 'bootstrap pip install failed.'; exit 1 }
+Write-Ok 'done'
# ----------------------------------------------------------------- hand off
-Write-Host ''
-Write-Host '[5/5] Handing off to the Python installer...' -ForegroundColor Yellow
-Write-Host ''
$InstallerPy = Join-Path $InstallDir 'install\installer.py'
if (-not (Test-Path $InstallerPy)) {
- Write-Host " $InstallerPy not found in the clone." -ForegroundColor Red
- Write-Host ' The repo seems incomplete. File a bug.' -ForegroundColor Red
+ Write-Err "$InstallerPy not found in the clone."
+ Write-Note 'The repo seems incomplete. File a bug.'
exit 1
}
+Write-Step 'Launching the guided installer'
+
Push-Location $InstallDir
try {
& $VenvPython $InstallerPy @ExtraArgs
diff --git a/install/install.sh b/install/install.sh
index 7809db5a8f..f23ff2ef16 100755
--- a/install/install.sh
+++ b/install/install.sh
@@ -20,29 +20,42 @@ REPO_URL="${JARVIS_INSTALL_REPO:-https://github.com/PersonalJarvis/PersonalJarvi
BRANCH="${JARVIS_INSTALL_REF:-main}"
INSTALL_DIR="${JARVIS_INSTALL_DIR:-$HOME/.personal-jarvis}"
-# ANSI colors (best-effort; safe to omit on dumb terminals)
+# 24-bit brand palette (Charcoal + Gold), best-effort. On a real terminal we
+# emit ANSI escapes so the banner sweeps gold and the ✓ ticks render; on a
+# dumb terminal / pipe we omit them entirely.
if [ -t 1 ]; then
- BOLD=$(printf '\033[1m'); CYAN=$(printf '\033[36m')
- YELLOW=$(printf '\033[33m'); GREEN=$(printf '\033[32m')
- RED=$(printf '\033[31m'); RESET=$(printf '\033[0m')
+ GOLD=$(printf '\033[38;2;231;196;110m')
+ GREEN=$(printf '\033[38;2;122;200;140m')
+ DIM=$(printf '\033[38;2;140;140;140m')
+ RED=$(printf '\033[38;2;224;122;110m')
+ BOLD=$(printf '\033[1m')
+ RST=$(printf '\033[0m')
else
- BOLD=""; CYAN=""; YELLOW=""; GREEN=""; RED=""; RESET=""
+ GOLD=""; GREEN=""; DIM=""; RED=""; BOLD=""; RST=""
fi
-cat <<EOF
+step() { printf '\n%s ●%s %s%s%s\n' "$GOLD" "$RST" "$BOLD" "$1" "$RST"; }
+ok() { printf '%s ✓%s %s%s%s\n' "$GREEN" "$RST" "$DIM" "$1" "$RST"; }
+note() { printf '%s %s%s\n' "$DIM" "$1" "$RST"; }
+err() { printf '%s ✗ %s%s\n' "$RED" "$1" "$RST"; }
-${CYAN} ____ _ _ _
-| _ \\ ___ _ __ ___ ___ _ __ __ _ | | | | __ _ _ ____ _(_)___
-| |_) / _ \\ '__/ __|/ _ \\| '_ \\ / _\` || |_| |/ _\` | '__\\ \\ / / / __|
-| __/ __/ | \\__ \\ (_) | | | | (_| || _ | (_| | | \\ V /| \\__ \\
-|_| \\___|_| |___/\\___/|_| |_|\\__,_||_| |_|\\__,_|_| \\_/ |_|___/${RESET}
+# Banner glyphs are machine-generated (figlet "ANSI Shadow"); do not hand-edit
+# — that is how the historical "Harvis" typo crept in.
+cat <<EOF
- ${BOLD}Quick install (macOS / Linux)${RESET}
+${GOLD} P E R S O N A L
+ ██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗
+ ██║██╔══██╗██╔══██╗██║ ██║██║██╔════╝
+ ██║███████║██████╔╝██║ ██║██║███████╗
+██ ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║
+╚█████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║███████║
+ ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚══════╝${RST}
+${GOLD} ●${RST} ${BOLD}Quick install · macOS / Linux${RST}
EOF
# -------------------------------------------------------------- preflight
-echo "${YELLOW}[1/5] Checking prerequisites...${RESET}"
+step 'Checking prerequisites'
find_python() {
for candidate in python3.13 python3.12 python3.11 python3 python; do
@@ -61,40 +74,41 @@ find_python() {
}
if ! PYTHON_EXE=$(find_python); then
- echo ""
- echo "${RED} Python 3.11+ not found.${RESET}"
- echo "${RED} Install it from:"
- echo " - macOS: https://www.python.org/downloads/ or 'brew install [email protected]'"
- echo " - Linux: use your distro package (apt install python3.12, dnf install python3.12, ...)"
- echo "${RESET}"
+ err 'Python 3.11+ not found.'
+ note 'Install it from:'
+ note ' - macOS: https://www.python.org/downloads/ or "brew install [email protected]"'
+ note ' - Linux: your distro package (apt install python3.12, dnf install python3.12, ...)'
exit 1
fi
-echo " Python OK (${GREEN}$PYTHON_EXE${RESET})"
+PY_VER=$("$PYTHON_EXE" -c 'import sys; print("Python %d.%d.%d" % sys.version_info[:3])' 2>/dev/null || echo "$PYTHON_EXE")
+ok "$PY_VER"
if ! command -v git >/dev/null 2>&1; then
- echo ""
- echo "${RED} git not found.${RESET}"
- echo " - macOS: install Xcode CLT ('xcode-select --install') or 'brew install git'"
- echo " - Linux: use your distro package (apt install git, ...)"
+ err 'git not found.'
+ note ' - macOS: install Xcode CLT ("xcode-select --install") or "brew install git"'
+ note ' - Linux: your distro package (apt install git, ...)'
exit 1
fi
-echo " ${GREEN}git OK${RESET}"
+ok 'git'
# -------------------------------------------------------------- clone / update
-echo ""
-echo "${YELLOW}[2/5] Preparing repo at $INSTALL_DIR ...${RESET}"
+step 'Fetching Personal Jarvis'
+note "$INSTALL_DIR"
if [ -d "$INSTALL_DIR/.git" ]; then
- echo " existing checkout found — pulling latest..."
- git -C "$INSTALL_DIR" fetch --depth 1 origin "$BRANCH"
- git -C "$INSTALL_DIR" checkout "$BRANCH"
- git -C "$INSTALL_DIR" reset --hard "origin/$BRANCH"
+ # --quiet keeps the noisy "Receiving objects: NN%" churn out of the clean
+ # transcript; real errors still surface on stderr.
+ git -C "$INSTALL_DIR" fetch --quiet --depth 1 origin "$BRANCH"
+ git -C "$INSTALL_DIR" checkout --quiet "$BRANCH"
+ git -C "$INSTALL_DIR" reset --quiet --hard "origin/$BRANCH"
+ ok 'updated existing checkout to latest'
elif [ -e "$INSTALL_DIR" ]; then
- echo "${RED} $INSTALL_DIR exists but is not a git repo. Aborting to avoid clobbering your files.${RESET}"
- echo "${RED} Remove or move that directory, then re-run.${RESET}"
+ err "$INSTALL_DIR exists but is not a git repo."
+ note 'Aborting to avoid clobbering your files. Remove or move that directory, then re-run.'
exit 1
else
- git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$INSTALL_DIR"
+ git clone --quiet --depth 1 --branch "$BRANCH" "$REPO_URL" "$INSTALL_DIR"
+ ok 'downloaded'
fi
# WAVE 5 — payload-commit pin (axis E, Wave-5 audit Finding 2).
@@ -106,35 +120,32 @@ fi
# (git SHA-1) or 64-char (git SHA-256 repos).
if [ -n "${JARVIS_PAYLOAD_COMMIT:-}" ]; then
if ! printf '%s' "$JARVIS_PAYLOAD_COMMIT" | grep -Eq '^[0-9a-f]{40}([0-9a-f]{24})?$'; then
- echo "${RED} JARVIS_PAYLOAD_COMMIT is not a well-formed git SHA: '$JARVIS_PAYLOAD_COMMIT' — refusing.${RESET}"
+ err "JARVIS_PAYLOAD_COMMIT is not a well-formed git SHA: '$JARVIS_PAYLOAD_COMMIT' — refusing."
exit 1
fi
- echo " pinning clone to signed commit ${JARVIS_PAYLOAD_COMMIT}..."
# Shallow clones don't carry the full history; deepen to retrieve the
# target SHA explicitly. `fetch <sha>` succeeds on most modern
# github.com hosts (allowReachableSHA1InWant + uploadpack.allowAnySHA1InWant
# are server defaults). Falls back to unshallow if direct-SHA fetch fails.
- if ! git -C "$INSTALL_DIR" fetch --depth 1 origin "$JARVIS_PAYLOAD_COMMIT" 2>/dev/null; then
- git -C "$INSTALL_DIR" fetch --unshallow origin || git -C "$INSTALL_DIR" fetch origin
+ if ! git -C "$INSTALL_DIR" fetch --quiet --depth 1 origin "$JARVIS_PAYLOAD_COMMIT" 2>/dev/null; then
+ git -C "$INSTALL_DIR" fetch --quiet --unshallow origin || git -C "$INSTALL_DIR" fetch --quiet origin
fi
- if ! git -C "$INSTALL_DIR" checkout --detach "$JARVIS_PAYLOAD_COMMIT"; then
- echo "${RED} failed to checkout payload-commit ${JARVIS_PAYLOAD_COMMIT} — refusing.${RESET}"
- echo "${RED} the cloned tree does not contain the signed commit; release may be inconsistent.${RESET}"
+ if ! git -C "$INSTALL_DIR" checkout --quiet --detach "$JARVIS_PAYLOAD_COMMIT"; then
+ err "failed to checkout payload-commit ${JARVIS_PAYLOAD_COMMIT} — refusing."
+ note 'the cloned tree does not contain the signed commit; release may be inconsistent.'
exit 1
fi
# Defensive verify: assert HEAD is exactly the signed SHA byte-for-byte.
ACTUAL_HEAD=$(git -C "$INSTALL_DIR" rev-parse HEAD)
if [ "$ACTUAL_HEAD" != "$JARVIS_PAYLOAD_COMMIT" ]; then
- echo "${RED} HEAD drift detected: pinned=${JARVIS_PAYLOAD_COMMIT}, actual=${ACTUAL_HEAD} — refusing.${RESET}"
+ err "HEAD drift detected: pinned=${JARVIS_PAYLOAD_COMMIT}, actual=${ACTUAL_HEAD} — refusing."
exit 1
fi
- echo " ${GREEN}clone pinned to ${JARVIS_PAYLOAD_COMMIT}${RESET}"
+ ok "pinned to signed commit ${JARVIS_PAYLOAD_COMMIT:0:12}…"
fi
-echo " ${GREEN}repo ready${RESET}"
# -------------------------------------------------------------- venv
-echo ""
-echo "${YELLOW}[3/5] Creating Python virtual environment...${RESET}"
+step 'Creating Python environment'
VENV_PATH="$INSTALL_DIR/.venv"
VENV_PYTHON="$VENV_PATH/bin/python"
@@ -142,26 +153,24 @@ VENV_PYTHON="$VENV_PATH/bin/python"
if [ ! -x "$VENV_PYTHON" ]; then
"$PYTHON_EXE" -m venv "$VENV_PATH"
fi
-echo " ${GREEN}venv OK${RESET}"
+ok 'virtual environment ready'
# -------------------------------------------------------------- bootstrap deps
-echo ""
-echo "${YELLOW}[4/5] Installing bootstrap dependencies (rich, packaging)...${RESET}"
+step 'Installing bootstrap dependencies'
+note 'rich, packaging'
"$VENV_PYTHON" -m pip install --quiet --upgrade pip
"$VENV_PYTHON" -m pip install --quiet rich packaging
-echo " ${GREEN}bootstrap deps OK${RESET}"
+ok 'done'
# -------------------------------------------------------------- hand off
-echo ""
-echo "${YELLOW}[5/5] Handing off to the Python installer...${RESET}"
-echo ""
-
INSTALLER_PY="$INSTALL_DIR/install/installer.py"
if [ ! -f "$INSTALLER_PY" ]; then
- echo "${RED} $INSTALLER_PY not found in the clone.${RESET}"
- echo "${RED} The repo seems incomplete. File a bug.${RESET}"
+ err "$INSTALLER_PY not found in the clone."
+ note 'The repo seems incomplete. File a bug.'
exit 1
fi
+step 'Launching the guided installer…'
+
cd "$INSTALL_DIR"
exec "$VENV_PYTHON" "$INSTALLER_PY" "$@"
diff --git a/install/installer.py b/install/installer.py
index c4b40d3cb1..fae2207ce8 100644
--- a/install/installer.py
+++ b/install/installer.py
@@ -47,13 +47,25 @@ try:
from rich.console import Console
from rich.panel import Panel
from rich.table import Table
+ from rich.theme import Theme
except ImportError: # pragma: no cover - Stage 1 installs rich; failure here is a bug
print("ERROR: rich is not installed. The Stage-1 bootstrap should have done this.")
print("Run 'pip install rich packaging' inside the .venv and re-invoke installer.py.")
sys.exit(1)
-console = Console()
+# Brand palette (Charcoal + Gold) — matches the Stage-1 shell banner so the
+# two stages read as one continuous install experience.
+THEME = Theme(
+ {
+ "brand": "#e7c46e",
+ "brand.bold": "bold #e7c46e",
+ "ok": "#7ac88c",
+ "muted": "#8c8c8c",
+ "bad": "#e07a6e",
+ }
+)
+console = Console(theme=THEME, highlight=False)
# ---------------------------------------------------------------- discovery
@@ -72,19 +84,52 @@ def venv_python() -> Path:
return repo_root() / ".venv" / "bin" / "python"
-# ---------------------------------------------------------------- helpers
+# ---------------------------------------------------------------- presentation
+def step(title: str) -> None:
+ """A top-level phase marker (gold ●), matching the Stage-1 shell."""
+ console.print()
+ console.print(f"[brand] ●[/] [brand.bold]{title}[/]")
+
+
+def ok(text: str) -> None:
+ console.print(f"[ok] ✓[/] [muted]{text}[/]")
+
+
+def note(text: str) -> None:
+ console.print(f"[muted] {text}[/]")
+
+
def run(cmd: list[str], *, cwd: Path | None = None, check: bool = True) -> int:
- """Run a subprocess and stream stdout/stderr live."""
- console.print(f" [dim]$ {' '.join(cmd)}[/dim]")
+ """Run an interactive/streaming subprocess (wizard, launch)."""
result = subprocess.run(cmd, cwd=cwd)
if check and result.returncode != 0:
- console.print(f" [red]command failed with exit code {result.returncode}[/red]")
+ console.print(f"[bad] command failed with exit code {result.returncode}[/]")
return result.returncode
-def header(title: str) -> None:
- console.print()
- console.print(Panel.fit(title, style="cyan"))
+def run_quiet(cmd: list[str], *, label: str, cwd: Path | None = None) -> int:
+ """Run a noisy, non-interactive command (pip) behind a clean spinner.
+
+ On a real terminal the raw output is hidden behind a gold spinner so the
+ transcript stays calm. On a headless/piped run (no TTY — a VPS, CI) we let
+ the output stream through so operators keep a readable log. Either way, a
+ failure prints a captured tail so the error is never swallowed.
+ """
+ if console.is_terminal:
+ with console.status(f"[brand]{label}…[/]", spinner="dots", spinner_style="brand"):
+ result = subprocess.run(
+ cmd, cwd=cwd, capture_output=True, text=True,
+ encoding="utf-8", errors="replace",
+ )
+ if result.returncode != 0:
+ console.print(f"[bad] ✗ {label} failed[/]")
+ tail = (result.stdout or "") + (result.stderr or "")
+ for line in tail.strip().splitlines()[-20:]:
+ console.print(f"[muted] {line}[/]")
+ return result.returncode
+ # Non-interactive: stream for the log.
+ note(f"{label}…")
+ return subprocess.run(cmd, cwd=cwd).returncode
def is_headless_linux() -> bool:
@@ -96,32 +141,35 @@ def is_headless_linux() -> bool:
# ---------------------------------------------------------------- steps
def step_preflight() -> None:
- header("Pre-flight")
+ step("Environment")
table = Table.grid(padding=(0, 2))
- table.add_row("Platform", f"{platform.system()} {platform.release()} ({platform.machine()})")
- table.add_row("Python", f"{sys.version.split()[0]} ({sys.executable})")
- table.add_row("Repo", str(repo_root()))
- table.add_row("Headless", "yes" if is_headless_linux() else "no")
+ table.add_column(style="muted")
+ table.add_column(style="brand")
+ table.add_row(" platform", f"{platform.system()} {platform.release()} ({platform.machine()})")
+ table.add_row(" python", f"{sys.version.split()[0]}")
+ table.add_row(" repo", str(repo_root()))
+ table.add_row(" headless", "yes" if is_headless_linux() else "no")
console.print(table)
if sys.version_info < (3, 11):
- console.print("[red]Python 3.11+ required.[/red]")
+ console.print("[bad] Python 3.11+ required.[/]")
sys.exit(1)
if not (repo_root() / "pyproject.toml").exists():
- console.print("[red]pyproject.toml not found — installer.py was invoked outside the repo.[/red]")
+ console.print("[bad] pyproject.toml not found — installer.py was invoked outside the repo.[/]")
sys.exit(1)
def step_pip_install(*, with_desktop: bool, with_voice_local: bool, dry_run: bool) -> None:
- header("Installing Personal Jarvis")
+ step("Installing Personal Jarvis")
pip = [str(venv_python()), "-m", "pip"]
- # ``requirements.txt`` is the Wave 6 hash-pinned lockfile generated from
- # ``requirements.in`` (top-level deps mirrored from
- # ``pyproject.toml [project].dependencies``) by ``pip-compile
- # --generate-hashes --resolver=backtracking``. Every package-pinning line
- # carries ``--hash=sha256:...`` so an attacker who compromises a PyPI
+ # ``requirements.txt`` is the Wave 6 hash-pinned, PLATFORM-UNIVERSAL lockfile
+ # generated from ``requirements.in`` (top-level deps mirrored from
+ # ``pyproject.toml [project].dependencies``) by ``uv pip compile --universal
+ # --generate-hashes``. It carries per-OS environment markers so ONE lockfile
+ # installs on Windows/macOS/Linux (each OS pulls only its wheels). Every
+ # package-pinning line carries ``--hash=sha256:...`` so an attacker who compromises a PyPI
# mirror cannot swap out a transitive dependency without invalidating
# the lockfile signature published in the GitHub Release. The desktop
# branch installs with ``--require-hashes`` so unhashed/mismatched
@@ -131,10 +179,10 @@ def step_pip_install(*, with_desktop: bool, with_voice_local: bool, dry_run: boo
# and ``pip install --require-hashes`` is the new contract going
# forward. See ``docs/supply-chain/threat-model.md`` §11.
if with_desktop:
- runtime_step = ("runtime dependencies (Wave 6 hash-pinned lockfile, --require-hashes)",
+ runtime_step = ("runtime dependencies (hash-pinned lockfile)",
pip + ["install", "--require-hashes", "-r", "requirements.txt"])
else:
- runtime_step = ("runtime dependencies (cloud-first base from pyproject.toml)",
+ runtime_step = ("runtime dependencies (cloud-first base)",
pip + ["install", "-e", "."])
plans: list[tuple[str, list[str]]] = [
@@ -147,38 +195,41 @@ def step_pip_install(*, with_desktop: bool, with_voice_local: bool, dry_run: boo
plans.append(("voice-local extras (faster-whisper, Silero, openWakeWord)",
pip + ["install", "-e", ".[voice-local]"]))
+ note("this can take a minute — grabbing dependencies")
+
if dry_run:
for label, cmd in plans:
- console.print(f" [yellow](dry-run)[/yellow] {label}: {' '.join(cmd)}")
+ console.print(f"[muted] (dry-run) {label}: {' '.join(cmd)}[/]")
return
for label, cmd in plans:
- console.print(f"[bold]· {label}[/bold]")
- rc = run(cmd, cwd=repo_root())
+ rc = run_quiet(cmd, label=label, cwd=repo_root())
if rc != 0:
# Desktop / voice-local extras are best-effort — never fatal.
if "extras" in label:
- console.print(f" [yellow]{label} failed — continuing without it.[/yellow]")
+ console.print(f"[bad] ✗ {label} failed — continuing without it.[/]")
continue
sys.exit(2)
+ ok(label)
def step_wizard(*, dry_run: bool) -> None:
- header("First-run wizard")
- console.print("Setting up API keys, microphone, hotkey, mascot...")
+ step("First-run wizard")
+ note("API keys, microphone, hotkey, mascot")
cmd = [str(venv_python()), "-m", "jarvis", "--wizard"]
if dry_run:
- console.print(f" [yellow](dry-run)[/yellow] {' '.join(cmd)}")
+ console.print(f"[muted] (dry-run) {' '.join(cmd)}[/]")
return
+ console.print()
rc = run(cmd, cwd=repo_root(), check=False)
if rc != 0:
- console.print("[yellow]Wizard exited non-zero. You can re-run it later with:[/yellow]")
- console.print(f" [dim]{shutil.which('jarvis') or 'jarvis'} --wizard[/dim]")
+ console.print("[bad] Wizard exited non-zero. You can re-run it later with:[/]")
+ console.print(f"[muted] {shutil.which('jarvis') or 'jarvis'} --wizard[/]")
sys.exit(3)
def step_launch(*, headless: bool, dry_run: bool) -> None:
- header("Launch")
+ step("Launch")
if headless or is_headless_linux():
cmd = [str(venv_python()), "-m", "jarvis.ui.web.launcher", "--headless"]
msg = "headless server on http://localhost:8765"
@@ -189,9 +240,9 @@ def step_launch(*, headless: bool, dry_run: bool) -> None:
cmd = [str(venv_python()), "-m", "jarvis.ui.web.launcher"]
msg = "Desktop App"
- console.print(f"Starting {msg}...")
+ note(f"starting {msg}")
if dry_run:
- console.print(f" [yellow](dry-run)[/yellow] {' '.join(cmd)}")
+ console.print(f"[muted] (dry-run) {' '.join(cmd)}[/]")
return
# We deliberately do not wait for the App — the installer returns control
@@ -199,27 +250,29 @@ def step_launch(*, headless: bool, dry_run: bool) -> None:
try:
subprocess.Popen(cmd, cwd=repo_root(), close_fds=True)
except OSError as exc:
- console.print(f"[red]Could not launch: {exc}[/red]")
+ console.print(f"[bad] Could not launch: {exc}[/]")
sys.exit(4)
def step_summary(*, no_launch: bool) -> None:
console.print()
console.print(Panel.fit(
- "[bold green]Personal Jarvis is installed.[/bold green]\n\n"
- f"Repo: {repo_root()}\n"
- f"Venv: {venv_python().parent.parent}\n\n"
- "[bold]Re-run anytime[/bold]\n"
- " • Windows: [cyan]run.bat[/cyan]\n"
- " • macOS/Linux: [cyan]python -m jarvis.ui.web.launcher[/cyan]\n"
- " • Re-run wizard: [cyan]python -m jarvis --wizard[/cyan]\n\n"
- "[bold]Update[/bold]\n"
+ "[ok]Personal Jarvis is installed.[/]\n\n"
+ f"[muted]Repo[/] {repo_root()}\n"
+ f"[muted]Venv[/] {venv_python().parent.parent}\n\n"
+ "[brand.bold]Re-run anytime[/]\n"
+ " • Windows: [brand]run.bat[/]\n"
+ " • macOS/Linux: [brand]python -m jarvis.ui.web.launcher[/]\n"
+ " • Re-run wizard: [brand]python -m jarvis --wizard[/]\n\n"
+ "[brand.bold]Update[/]\n"
" Re-invoke the same one-liner — it detects the existing checkout\n"
" and pulls latest main.",
- style="green",
+ border_style="brand",
+ title="[brand.bold]✓ Done[/]",
+ title_align="left",
))
if not no_launch:
- console.print("\n[dim]The Desktop App is launching in a separate window.[/dim]")
+ console.print("\n[muted]The Desktop App is launching in a separate window.[/]")
# ---------------------------------------------------------------- entry