This page is a design/reference spec. Release truth lives in the runtime capability manifest and shipped product docs.
Install Script Design
Owner: PhantomPM Platform Team
Last Updated: 2026-02-13
Status: Beta
Current Implementation State
Installer implementation exists in repository:
scripts/install.shscripts/install.ps1
Production endpoint wiring (phantom.pm/install) and release hosting are not deployed yet.
Target State
Two scripts:
- POSIX shell installer (
installendpoint) - PowerShell installer (
install.ps1endpoint)
POSIX Flow
- strict shell mode and failure trap
- detect OS and architecture
- fetch release manifest
- resolve platform asset URL and expected checksum
- download asset to temp directory
- verify checksum
- unpack and install binary
- ensure PATH availability
- install shell completions where supported
- run
phantom doctor
PowerShell Flow
Equivalent behavior with Windows conventions:
- install path under user profile
- PATH update using user environment variables
- hash validation using
Get-FileHash
Error Handling Model
Each stage emits:
- stage name
- failure reason
- recommended remediation command
Fatal classes:
- unsupported platform
- manifest fetch failure
- checksum mismatch
- insufficient permissions for target install path
Logging
- default concise output
- optional verbose mode via env var
- no sensitive values printed
Security Notes
- script must not execute untrusted downloaded code before hash validation
- script must pin manifest schema version and reject unknown mandatory fields
Acceptance Criteria
- scripted install flow reproducible in CI containers/VMs
- failure classes map to user-facing troubleshooting entries