This repository was archived by the owner on Jun 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
refactor(installer): CLI-only installer + doc cleanup #95
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7bf0aff
refactor(installer): remove GUI/wizard installer and update docs
Steffen025 676a445
docs: fix installer docs inconsistencies
Steffen025 88b194c
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] c231cd5
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] db20343
fix(docs): align changelog and installer CLI flags
Steffen025 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 update flow: `bash PAI-Install/install.sh --update` | ||
| 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** | | ||
| | **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 | ||
| ``` | ||
|
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 --update | ||
| ``` | ||
|
|
||
| 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` | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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:
Or remove the installer line from the v3.0.0 "Changed" section entirely if GUI was never released.
🤖 Prompt for AI Agents