Repository navigation
refactor(installer): CLI-only installer + doc cleanup #95
Changes from 4 commits
7bf0aff
676a445
88b194c
c231cd5
db20343
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| prd: true | ||
| id: PRD-20260327-install-docs-cleanup | ||
| status: COMPLETE | ||
| mode: interactive | ||
| effort_level: Extended | ||
| created: 2026-03-27 | ||
| updated: 2026-03-27 | ||
| iteration: 0 | ||
| maxIterations: 128 | ||
| loopStatus: null | ||
| last_phase: VERIFY | ||
| failing_criteria: [] | ||
| verification_summary: "13/13" | ||
| parent: null | ||
| children: [] | ||
| --- | ||
|
|
||
| # pai-opencode install + docs cleanup (v3) | ||
|
|
||
| Delete retired install artifacts (wizard + GUI), make CLI installer canonical, and update all docs accordingly. | ||
|
|
||
| ## STATUS | ||
|
|
||
| | What | State | | ||
| |---|---| | ||
| | Progress | 13/13 criteria passing | | ||
| | Phase | COMPLETE | | ||
| | Next action | None | | ||
| | Blocked by | Nothing | | ||
|
|
||
| ## CONTEXT | ||
|
|
||
| ### Problem Space | ||
| The repo currently documents multiple install paths (wizard vs PAI-Install) and includes GUI components that are not desired. The goal is a single CLI-only install flow and docs that match reality. | ||
|
|
||
| ### Key Files | ||
| - `PAI-Install/install.sh` - Installer bootstrap entrypoint | ||
| - `PAI-Install/cli/quick-install.ts` - Headless installer implementation | ||
| - `README.md` - Project overview + quick start | ||
| - `INSTALL.md` - Canonical installation guide | ||
| - `docs/` - Supporting documentation | ||
|
|
||
| ### Constraints | ||
| - Remove GUI installer (Electron/web/public). | ||
| - Remove `.opencode/PAIOpenCodeWizard.ts` wizard. | ||
| - Documentation must not reference removed entrypoints. | ||
|
|
||
| ## PLAN | ||
|
|
||
| - Make `PAI-Install/install.sh` CLI-only (no GUI path). | ||
| - Delete GUI directories and broken GUI entrypoint (`PAI-Install/main.ts`). | ||
| - Delete wizard (`.opencode/PAIOpenCodeWizard.ts`). | ||
| - Update `README.md`, `INSTALL.md`, and `docs/` to reference `PAI-Install/install.sh --cli`. | ||
| - Verify via grep checks + running installer help paths. | ||
|
|
||
| ## IDEAL STATE CRITERIA (Verification Criteria) | ||
|
|
||
| - [x] ISC-C1: GUI installer directories are removed from PAI-Install | Verify: CLI: test ! -d PAI-Install/electron | ||
| - [x] ISC-C2: Web/GUI assets are removed from PAI-Install | Verify: CLI: test ! -d PAI-Install/web | ||
| - [x] ISC-C3: PAI-Install entrypoint no longer references electron | Verify: Grep: "electron" has 0 matches in PAI-Install/install.sh | ||
| - [x] ISC-C4: Wizard file is removed from .opencode | Verify: CLI: test ! -f .opencode/PAIOpenCodeWizard.ts | ||
| - [x] ISC-C5: README quick start uses PAI-Install/install.sh CLI flow | Verify: Read: README.md install commands updated | ||
| - [x] ISC-C6: INSTALL.md uses only PAI-Install/install.sh CLI flow | Verify: Read: INSTALL.md contains no wizard invocation | ||
| - [x] ISC-C7: docs/ contain no references to removed wizard path | Verify: Grep: PAIOpenCodeWizard has 0 matches in docs/ | ||
| - [x] ISC-C8: docs/ contain no instructions to run removed GUI mode | Verify: Grep: "--mode gui" has 0 matches in docs/ | ||
| - [x] ISC-C12: Root docs exclude wizard/GUI installer instructions | Verify: Grep: patterns have 0 matches in *.md excluding .prd/ | ||
| - [x] ISC-C9: PAI-Install/README.md matches actual directory structure | Verify: Read: PAI-Install/README.md list is accurate | ||
| - [x] ISC-C10: CLI installer help runs without throwing | Verify: CLI: bun PAI-Install/cli/quick-install.ts --help | ||
| - [x] ISC-C11: install.sh CLI mode works and forwards args | Verify: CLI: bash PAI-Install/install.sh --cli --help | ||
| - [x] ISC-A1: Docs never recommend bun run .opencode/PAIOpenCodeWizard.ts | Verify: Grep: pattern has 0 matches | ||
|
|
||
| ## LOG | ||
|
|
||
| ### Iteration 0 — 2026-03-27 | ||
| - Phase reached: VERIFY | ||
| - Criteria progress: 13/13 | ||
| - Work done: CLI-only installer enforced, GUI/wizard artifacts deleted, docs updated repo-wide |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,31 +148,31 @@ Porting 14 upstream commits spanning Algorithm v1.3.0 through v1.8.0: | |
|
|
||
| --- | ||
|
|
||
| ## v2.0.1 — Wizard Build Process Fix (2026-02-20) | ||
| ## v2.0.1 — Legacy Installer Build Process Fix (2026-02-20) | ||
|
|
||
| ### Fixed | ||
|
|
||
| #### Critical: Wizard Build-from-Source Completely Broken | ||
| - **Symptom:** `git clone` succeeds but wizard reports "Failed to clone repository" and aborts | ||
| #### Critical: Legacy Installer Build-from-Source Completely Broken | ||
| - **Symptom:** `git clone` succeeds but legacy installer reports "Failed to clone repository" and aborts | ||
| - **Root cause:** `execCommand()` with `stdio: 'inherit'` returns `null` from `execSync()`. Calling `.trim()` on `null` throws TypeError, caught as failure. **Every non-silent command falsely reports failure.** | ||
| - **Fix:** Null-safe guard: `output.trim()` → `(output ?? '').trim()` | ||
|
|
||
| #### Go Prerequisite Removed (No Longer Needed) | ||
| - **Context:** OpenCode was historically a Go project (BubbleTea TUI). It has been completely rewritten to Bun/TypeScript. The build now uses `Bun.build({ compile: true })` to produce native binaries — no Go toolchain needed. | ||
| - **Fix:** Removed Go prerequisite check from wizard and all documentation | ||
| - **Fix:** Removed Go prerequisite check from the legacy installer and all documentation | ||
| - **Fix:** Strengthened Bun version check from 1.3+ to 1.3.9+ (matches OpenCode monorepo `packageManager` field) | ||
|
|
||
| #### Binary Detection After Build | ||
| - **Symptom:** After successful build, wizard couldn't find the binary | ||
| - **Symptom:** After successful build, legacy installer couldn't find the binary | ||
| - **Root cause:** Generic filename search didn't match `Bun.build()` output structure (`dist/opencode-{os}-{arch}/bin/opencode`) | ||
| - **Fix:** Deterministic platform-based binary lookup using `process.platform` + `process.arch` with baseline fallback | ||
|
|
||
| ### Changed | ||
| - **Wizard messaging** updated to reflect Bun-based build (not Go) | ||
| - **Legacy installer messaging** updated to reflect Bun-based build (not Go) | ||
| - **INSTALL.md** — Prerequisites: removed Go, added Bun 1.3.9+ note. Manual install: complete rewrite with `bun run ./packages/opencode/script/build.ts --single`. WSL section: removed `golang-go` package. | ||
| - **README.md** — Quick Start: added prerequisites line, updated wizard step description | ||
| - **docs/MIGRATION.md** — Replaced `go install` with wizard command, replaced `$(go env GOPATH)/bin` with `~/.local/bin` in PATH troubleshooting | ||
| - **EXPLORATION-SUMMARY.md** — Updated wizard flow description | ||
| - **README.md** — Quick Start: added prerequisites line, updated installer step description | ||
| - **docs/MIGRATION.md** — Replaced `go install` with installer command, replaced `$(go env GOPATH)/bin` with `~/.local/bin` in PATH troubleshooting | ||
| - **EXPLORATION-SUMMARY.md (since removed)** — Updated wizard flow description | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -328,7 +328,7 @@ agents: | |
| - **3 presets** ready to use | ||
|
|
||
| ### Migration Guide | ||
| 1. Re-run the wizard: `bun run .opencode/PAIOpenCodeWizard.ts` | ||
| 1. Re-run the installer: `bash PAI-Install/install.sh --help` | ||
| 2. Or switch profile manually: `bun run .opencode/tools/switch-provider.ts zen-paid` | ||
| 3. Custom agent models → Edit `opencode.json` agent section directly | ||
|
|
||
|
|
@@ -541,7 +541,7 @@ This release brings full PAI 2.5 Algorithm compatibility and adds 5 new handlers | |
| | `agent-capture.ts` | Captures agent outputs | | ||
|
|
||
| #### Installation | ||
| - `PAIOpenCodeWizard.ts` - Interactive setup wizard | ||
| - Legacy interactive installer (removed; CLI installer is canonical) | ||
| - 8 AI providers supported (Anthropic, OpenAI, Google, Groq, AWS Bedrock, Azure, ZEN, Ollama) | ||
| - TELOS personalization framework | ||
|
|
||
|
|
@@ -582,7 +582,7 @@ This release brings full PAI 2.5 Algorithm compatibility and adds 5 new handlers | |
| | Verify Completion Gate | No | No | No | No | No | **Yes** | Yes | | ||
| | Effort-Scaled Gates | No | No | No | No | No | **Yes** | Yes | | ||
| | **DB Health Tooling** | No | No | No | No | No | No | **Yes** | | ||
| | **Electron GUI Installer** | No | No | No | No | No | No | **Yes** | | ||
| | **Installer (CLI-only)** | No | No | No | No | No | No | **Yes** | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistency: line 74 contradicts this CLI-only installer entry. Line 585 correctly shows "Installer (CLI-only)" as a v3.0.0 feature, but line 74 (in the v3.0.0 "Changed" section) still reads:
This suggests the installer gained Electron GUI, which contradicts the PR's goal of removing GUI. Consider updating line 74 to: -- Installer: CLI-only → CLI + Electron GUI
+- Installer: Electron GUI removed, CLI-only is canonicalOr remove the installer line from the v3.0.0 "Changed" section entirely if GUI was never released. 🤖 Prompt for AI Agents |
||
| | **v2→v3 Migration** | No | No | No | No | No | No | **Yes** | | ||
| | **Security Hardening** | No | No | No | No | No | No | **Full** | | ||
|
|
||
|
|
@@ -596,7 +596,7 @@ This release brings full PAI 2.5 Algorithm compatibility and adds 5 new handlers | |
| - Skills structure: flat → hierarchical (Category/Skill) | ||
| - Config: single-file → dual-file (opencode.json + settings.json) | ||
| - Paths: `.claude/` → `.opencode/` | ||
| - New Electron GUI installer | ||
| - New CLI-only installer | ||
|
|
||
| **Recommended upgrade process:** | ||
|
|
||
|
|
@@ -615,9 +615,9 @@ This release brings full PAI 2.5 Algorithm compatibility and adds 5 new handlers | |
| bun Tools/migration-v2-to-v3.ts | ||
| ``` | ||
|
|
||
| 4. **Alternative: Fresh install with the new GUI:** | ||
| 4. **Alternative: Fresh install (recommended for a clean setup):** | ||
| ```bash | ||
| bash PAI-Install/install.sh | ||
| bash PAI-Install/install.sh --help | ||
| ``` | ||
|
Comment on lines
+618
to
621
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove leading whitespace from command lines in code blocks. The commands at lines 620 and 631 have leading whitespace that could cause issues when copy-pasting: 4. **Alternative: Fresh install (recommended for a clean setup):**
```bash
- bash PAI-Install/install.sh
+ bash PAI-Install/install.sh
```- bash PAI-Install/install.sh --update
+ bash PAI-Install/install.sh --updateAlso applies to: 631-631 🤖 Prompt for AI Agents |
||
|
|
||
| **See [UPGRADE.md](/UPGRADE.md) for detailed step-by-step instructions.** | ||
|
|
@@ -628,10 +628,10 @@ This release brings full PAI 2.5 Algorithm compatibility and adds 5 new handlers | |
| git fetch origin | ||
| git checkout main | ||
| git pull origin main | ||
| bun run .opencode/PAIOpenCodeWizard.ts | ||
| bash PAI-Install/install.sh --help | ||
| ``` | ||
|
|
||
| Re-running the wizard is recommended — it generates the new profile format with dynamic tier routing. | ||
| Re-running the installer is recommended — it generates the new profile format with dynamic tier routing. | ||
|
|
||
| **Manual alternative:** `bun run .opencode/tools/switch-provider.ts zen-paid` | ||
|
|
||
|
|
@@ -655,4 +655,4 @@ See `.opencode/voice-server/README.md` for full documentation. | |
| **Links:** | ||
| - [PAI v3.0 Upstream](https://github.com/danielmiessler/Personal_AI_Infrastructure) | ||
| - [OpenCode](https://github.com/anomalyco/opencode) | ||
| - [Upstream Sync Spec](docs/specs/UPSTREAM-SYNC-v1.8.0-SPEC.md) | ||
| - [Upstream Sync Spec](docs/specs/UPSTREAM-SYNC-v1.8.0-SPEC.md) | ||
Uh oh!
There was an error while loading. Please reload this page.