CLI Installer, Package Managers, Updates, and Signing
This guide owns the native OpenAlice CLI installer, package-manager channels (npm, Bun, Homebrew, AUR), the shared update-lifecycle planner and coordinator, and release artifact signing (macOS ad-hoc CLI signing and Windows SignPath onboarding). Local runtime behavior belongs to alice-project; Electron packaging to managed-workspace-runtime.
1. Direct CLI Installer (install & install.ps1)
curl -fsSL https://openalice.ai/install | bash # stable
curl -fsSL https://openalice.ai/install | bash -s -- --channel beta
curl -fsSL https://openalice.ai/install | bash -s -- --channel dev
Windows uses https://download.openalice.ai/install.ps1 (PowerShell 5.1,
system tar.exe, no elevation, cli/current.txt pointer resolved by bin/*.cmd
shims).
Artifact and layout contract
- Six native archives (
openalice-cli-<version>-<darwin|linux|win32>-<arm64|x64>.tar.gz) with<archive>.sha256sidecars, built with the exact.bun-versioncompiler. contentIdentitydigests the complete payload manifest (bin/openalice,share/openalice/UI/defaults/templates/adapters, file modes, symlink targets;release.jsonexcluded). macOS executables receive an ad-hoccodesign(scripts/sign-cli-macos.mjs) before hashes andrelease.jsonare generated;scripts/verify-cli-release.mjsverifies the final archive.- Default install root
~/.openalice(independent of any AliceProjectOPENALICE_HOME):~/.openalice/ ├── bin/{openalice,alice,alice-workspace,alice-uta,traderhub} ├── cli/{current -> releases/<active>, activation.json, releases/<id>/, provenance/, staging/} └── data/ workspaces/ provider-keys.json sealing.key # preserved across install/uninstall - Releases declare
dependencyPolicy: "system"(no bundled Node, Bun, Git, Bash, or Agent Runtimes).openalice setupchecks/guides system Git/Bash installation with separate explicit consent (--yeson the installer never approves installing system packages).
Atomic install, activation, rollback, and uninstall
- Acquire
.cli-install.lock→ stage archive on the same filesystem → verify SHA-256 → validaterelease.jsonand--version→ move to immutablecli/releases/<id>/→ write schema-3 provenance → record pending activation incli/activation.jsonand atomically swapcli/current→ retain newest 3 POSIX releases (never pruning the rollback target). - First successful Guardian + Alice HTTP readiness confirms
cli/activation.json; a failed first start atomically rollscli/currentback to the previous retained release without touching user data. openalice rollback [--plan|--yes|--to <release>]is local and download-free.openalice uninstall [--plan|--yes]removescli/, the five launchers, and its PATH block while preserving all user data and AliceProjects.
2. Package-Manager Channels (npm, Bun, Homebrew, AUR)
npm install -g openalice --allow-scripts=openalice
bun add -g --trust openalice
brew install traderalice/tap/openalice
paru -S openalice-bin
All channels consume the exact accepted six-platform release archives without rebuilding:
- npm / Bun (stable-only): Meta package
openaliceplus six platform packages (openalice-{darwin,linux,windows}-{arm64,x64}). All six platform packages must publish before the meta package via GitHub OIDC Trusted Publishing (OPENALICE_PUBLISH_NPM=trueinrelease.yml, no static npm token). - Homebrew (stable-only):
TraderAlice/homebrew-tapruns its own scheduled/ manualSync stable formulaworkflow verifying public GitHub/CDN digests; keep push-basedOPENALICE_PUBLISH_HOMEBREWdisabled in this repo. - AUR (stable-only):
openalice-bin(OPENALICE_PUBLISH_AUR=truewithAUR_SSH_PRIVATE_KEYand pinnedAUR_KNOWN_HOSTS). - Ownership rule: The package manager that installed
openaliceowns all future updates and uninstalls.openalice update,uninstall, and Doctor read schema-3 provenance, print the owning manager's command, and refuse to overwrite manager-owned files. Replacing a package while Guardian is running reportspending activationuntilopenalice down && openalice up.
3. Shared Update Lifecycle (packages/update-lifecycle)
packages/update-lifecycle provides the pure planner, SemVer/channel comparator,
DiscoveryStore single-flight cache, and /node atomic journals consumed by
the backend, CLI, Desktop, and Web UI (useUpdateLifecycle).
- Update authority: Derived from provenance + runtime profile—source
checkouts use Git, packaged Electron uses
electron-updater, direct CLI usesopenalice update(installer.versionedUrl+installer.sha256), and package-manager installs defer to their manager. Service-managed, dev, pinned, and custom contexts never fetch public update manifests from the Web UI. - Three Settings Overview objects: App, Backend, and Alice Project (which coordinates default Workspace template upgrades, AQ/AP source tag merges, Alice Harness Skill bundles, and installed Broker Packs).
- Coordinated execution (
UpdateCoordinator&UpdateControlService):approveUpdatefreezes the exact target version and review digest before running any effect.FileUpdateJournalrecords in-flight stages under the Guardian lock and reconciles lost outcomes against owner receipts on restart without blindly replaying mutations or auto-resolving Workspace file conflicts. - Remote SSH updates:
planRuntimeUpdate/transitionRuntimeOperationrecord stage receipts in<remote-targets.json>.updates/on the controlling client and validate remote schema-3 provenance before mutating a remote host.
4. Windows Code Signing (SignPath Onboarding)
signpath/windows-installer.xmland.github/workflows/signpath-test-windows.ymlown the SignPath Foundation self-signed test lane for the Windows NSIS installer (OpenAlice.Setup.<version>.exe).- The test workflow builds and smoke-tests the unsigned installer, submits it
under
SIGNPATH_TEST_POLICY_SLUG=test-signing(whenSIGNPATH_TEST_ENABLED=true), temporarily trusts the pinnedSIGNPATH_TEST_CERTIFICATE_THUMBPRINTinLocalMachine\Rooton the disposable runner to verifyValidAuthenticode status, and removes trust infinally. It never publishes a release or updater feed. - Production Windows releases remain unsigned until the production SignPath
certificate is issued and integrated into
.github/workflows/release-desktop-platform.ymlahead of blockmap andelectron:verify-update-assetsgeneration.
5. Verification
bash -n install
pnpm exec vitest run tests/e2e/cli-installer/install.spec.mjs \
tests/integration/cli-release-artifacts/cli-release-fixture.spec.mjs \
tests/integration/cli-release-artifacts/build-cli-package-channels.spec.mjs \
scripts/pack-cli-npm-packages.spec.mjs \
scripts/release-workflow.spec.ts \
packages/cli/src/package-manager.spec.mjs
pnpm test:system:installer