Skip to content

Commit 50c16b8

Browse files
PerfectPancodex
andcommitted
feat: add installer distribution docs
Generated with Codex Co-Authored-By: Codex <noreply@openai.com>
1 parent 99316d1 commit 50c16b8

21 files changed

Lines changed: 5427 additions & 1386 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
/.openclaw-version
55
.omx/
66
.playwright-cli/
7+
site/public/ocvm/
78
*.log
89
.DS_Store

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
- Replaced GitHub raw installer guidance with a static installer path that can be mirrored to OSS/CDN.
6+
- Added website documentation routes for installation, commands, configuration, and release sources.
7+
- Added GitHub and documentation navigation to the landing page.
58
- Updated landing page and crate metadata for `https://ocvm.vercel.app`.
69
- Clarified the site Install section around the pinned `v0.1.1` release.
710
- Added a GitHub Actions site build gate for the Vercel app in `site/`.

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,26 @@ Rollback does not delete unrelated installed versions.
198198

199199
## Install
200200

201-
After a GitHub Release exists:
201+
After a GitHub Release exists, publish `install.sh` to a stable HTTPS path. The
202+
current site publishes the installer as a static asset, and the same layout can
203+
be mirrored to OSS or placed behind a CDN:
202204

203205
```bash
204-
curl -fsSL https://raw.githubusercontent.com/PerfectPan/ocvm/v0.1.1/install.sh | sh
206+
curl -fsSL https://ocvm.vercel.app/ocvm/install.sh | sh
205207
```
206208

209+
For repeatable automation, pin the binary release with `OCVM_VERSION` while
210+
using the same installer script:
211+
212+
```bash
213+
curl -fsSL https://ocvm.vercel.app/ocvm/install.sh | OCVM_VERSION=v0.1.1 sh
214+
```
215+
216+
Maintainers set `OCVM_INSTALLER_BASE_URL` to the published OSS/CDN prefix during
217+
release preparation when mirroring the same layout outside Vercel. Future
218+
releases only need to update the stable installer script when the script itself
219+
changes or when its default pinned release changes.
220+
207221
## Docker E2E
208222

209223
Run real npm OpenClaw install validation in Docker instead of on the host:
@@ -212,9 +226,11 @@ Run real npm OpenClaw install validation in Docker instead of on the host:
212226
./scripts/e2e-docker.sh
213227
```
214228

215-
## Landing Page
229+
## Website and Docs
216230

217-
The TanStack Start landing page is deployed at https://ocvm.vercel.app. Source lives in `site/` and is configured for Vercel deployments from that directory:
231+
The TanStack Start landing page and documentation site are deployed at
232+
https://ocvm.vercel.app. Source lives in `site/` and is configured for Vercel
233+
deployments from that directory:
218234

219235
```bash
220236
npm ci --prefix site
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Installer Distribution and Documentation Design
2+
3+
## Goal
4+
5+
Resolve GitHub issues #19 and #20 by making the installer distribution path resilient outside GitHub raw content and by giving new users a coherent landing and documentation experience.
6+
7+
## Installer Distribution
8+
9+
Common installer hosting should use one public object-storage path:
10+
11+
```text
12+
https://<oss-or-cdn-domain>/ocvm/install.sh
13+
```
14+
15+
The stable `install.sh` path is the recommended copy-paste command for most users. Repeatable automation should pin the binary release with `OCVM_VERSION=v0.1.1` while reusing the same script. This avoids uploading a new installer script for every release unless the script logic or default pinned release changes. The repository should not hard-code an unverified vendor bucket domain. Instead, docs and site copy should expose `OCVM_INSTALLER_BASE_URL` as the release-time value that maintainers set to their OSS or CDN prefix.
16+
17+
The install script itself continues to resolve binaries from GitHub Releases unless `OCVM_REPO`, `GITHUB_API_URL`, or future release-source variables override that behavior. Issue #19 is specifically about avoiding GitHub raw content for downloading the script, not about changing release asset storage in this pass.
18+
19+
## Documentation Site
20+
21+
The existing `site/` app remains the single web project. It should add a `/docs` area that shares navigation, visual language, and install commands with the landing page. The docs area should be content-first and lightweight: installation, command reference, configuration, and release source pages are enough for the current CLI surface.
22+
23+
Fumadocs is the target documentation framework. Because the current app is TanStack Start on Vite, integration should follow Fumadocs' Vite/TanStack path where practical. If package constraints make full Fumadocs UI integration risky in this pass, the repository should still adopt a docs route/content boundary that can be migrated cleanly to Fumadocs components later.
24+
25+
## GitHub Stars
26+
27+
The landing page should show GitHub star visibility without making rendering depend on a live GitHub API request. The first implementation can use a static repository stat value with a direct GitHub link and accessible label. A future enhancement can hydrate the value from GitHub with caching once a server data-loading convention is chosen.
28+
29+
## Validation
30+
31+
Run the Rust checks because this remains a publishable CLI repository. Run the site build because the web app changes user-facing behavior. Run a publish-safety scan before pushing. If dependency installation or networked package fetches fail, record the exact blocker and verify all offline-capable checks.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Installer Distribution and Documentation Implementation Plan
2+
3+
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4+
5+
**Goal:** Resolve GitHub issues #19 and #20 by replacing GitHub raw installer guidance with an OSS/CDN-ready distribution convention and adding a coherent documentation experience to the existing site.
6+
7+
**Architecture:** Keep the Rust CLI at the repository root and the web experience in `site/`. Treat installer distribution as release documentation plus a reusable URL contract, and treat docs as a first-class route group in the existing TanStack Start app so landing and docs share copy, navigation, and styles.
8+
9+
**Tech Stack:** Rust CLI, POSIX shell installer, TanStack Start, React, TypeScript, Vite, CSS, Fumadocs-compatible documentation structure.
10+
11+
---
12+
13+
### Task 1: Document the Installer Distribution Contract
14+
15+
**Files:**
16+
- Modify: `README.md`
17+
- Modify: `docs/release.md`
18+
- Modify: `CHANGELOG.md`
19+
20+
**Steps:**
21+
22+
1. Add an OSS/CDN installer URL convention with one stable script path:
23+
- `https://<oss-or-cdn-domain>/ocvm/install.sh`
24+
2. Document repeatable automation as `curl .../install.sh | OCVM_VERSION=v0.1.1 sh`.
25+
3. Keep GitHub raw as a maintainer fallback, not the primary user-facing install path.
26+
4. Document `OCVM_INSTALLER_BASE_URL` as the release-time prefix maintainers publish to object storage.
27+
4. Update changelog with user-facing installer guidance changes.
28+
5. Verify with `rg -n "raw.githubusercontent.com|OCVM_INSTALLER_BASE_URL|oss-or-cdn" README.md docs site install.sh CHANGELOG.md`.
29+
30+
### Task 2: Add Shared Site Content for Install and Docs Navigation
31+
32+
**Files:**
33+
- Create: `site/src/content.ts`
34+
- Modify: `site/src/routes/index.tsx`
35+
36+
**Steps:**
37+
38+
1. Extract current release, installer base URL, install command, repo URL, release URL, docs URL, and star label into `site/src/content.ts`.
39+
2. Use the shared install command on the landing page.
40+
3. Add a GitHub star link in the top navigation with a static accessible label.
41+
4. Point Docs navigation to `/docs` instead of a GitHub blob URL.
42+
5. Verify TypeScript imports by running `npm run build --prefix site`.
43+
44+
### Task 3: Add Documentation Routes
45+
46+
**Files:**
47+
- Create: `site/src/routes/docs.tsx`
48+
- Create: `site/src/routes/docs.installation.tsx`
49+
- Create: `site/src/routes/docs.commands.tsx`
50+
- Create: `site/src/routes/docs.configuration.tsx`
51+
- Create: `site/src/routes/docs.release-sources.tsx`
52+
53+
**Steps:**
54+
55+
1. Build `/docs` as an overview page with links to the four documentation pages.
56+
2. Add install docs covering the OSS/CDN convention and local bin setup.
57+
3. Add command docs matching the README command surface.
58+
4. Add configuration docs for `OCVM_HOME`, `OCVM_NPM_PACKAGE`, `OCVM_SOURCE`, and release manifest URL.
59+
5. Add release-source docs for npm and manifest source behavior.
60+
6. Keep docs content concise and current.
61+
7. Verify route generation/build with `npm run build --prefix site`.
62+
63+
### Task 4: Unify Landing and Docs Styling
64+
65+
**Files:**
66+
- Modify: `site/src/styles.css`
67+
68+
**Steps:**
69+
70+
1. Add shared top navigation styles that work for both landing and docs pages.
71+
2. Add docs layout styles with readable width, sidebar-like page index, and code blocks.
72+
3. Keep card radius at 8px or less and avoid nested cards.
73+
4. Check responsive rules for mobile and desktop.
74+
5. Verify visually with a local site server and browser screenshots when feasible.
75+
76+
### Task 5: Verify Repository Gates
77+
78+
**Commands:**
79+
80+
```bash
81+
cargo fmt --check
82+
cargo clippy --all-targets -- -D warnings
83+
cargo test
84+
npm run build --prefix site
85+
cargo build --release
86+
cargo package --allow-dirty
87+
rg --hidden --no-ignore -n "private-token|secret|internal-domain.example|HOME_PATH_PLACEHOLDER" . --glob '!target/**' --glob '!.git/**' --glob '!.omx/**' --glob '!AGENTS.md' --glob '!CONTRIBUTING.md' --glob '!SECURITY.md'
88+
```
89+
90+
If network or package-cache constraints block the site build, record the exact command and failure output, then run all checks that do not require new network access.
91+
92+
### Task 6: Publish the Branch
93+
94+
**Steps:**
95+
96+
1. Inspect `git status --short --branch`.
97+
2. Review changed files for generated output, secrets, and machine paths.
98+
3. Commit with a concise conventional commit message ending with:
99+
100+
```text
101+
Generated with Codex
102+
103+
Co-Authored-By: Codex <noreply@openai.com>
104+
```
105+
106+
4. Push the branch.
107+
5. Create or reuse a GitHub Pull Request.
108+
6. Include validation commands and remaining risks in the PR summary.

docs/release.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,33 @@ The `Release` workflow builds platform binaries, packages archives, generates SH
2525

2626
## Install Script
2727

28-
Users can install a specific release with:
28+
Publish the installer to object storage or a CDN after the GitHub Release is
29+
created. Use one stable script path for onboarding and pin the binary release
30+
with `OCVM_VERSION` when automation needs repeatable installs:
2931

3032
```bash
31-
curl -fsSL https://raw.githubusercontent.com/PerfectPan/ocvm/v0.1.1/install.sh | sh
33+
export OCVM_INSTALLER_BASE_URL="https://ocvm.vercel.app/ocvm"
34+
35+
# Stable installer path for the current release.
36+
curl -fsSL "$OCVM_INSTALLER_BASE_URL/install.sh" | sh
37+
38+
# Repeatable install pinned to a specific binary release.
39+
curl -fsSL "$OCVM_INSTALLER_BASE_URL/install.sh" | OCVM_VERSION=v0.1.1 sh
3240
```
3341

3442
Override `OCVM_VERSION` to install a different release:
3543

3644
```bash
37-
curl -fsSL https://raw.githubusercontent.com/PerfectPan/ocvm/v0.1.1/install.sh | OCVM_VERSION=latest sh
45+
curl -fsSL "$OCVM_INSTALLER_BASE_URL/install.sh" | OCVM_VERSION=latest sh
46+
```
47+
48+
GitHub raw content can remain a maintainer fallback while testing release tags,
49+
but it should not be the primary user-facing install command.
50+
51+
For an OSS bucket, mirror the same files and replace the prefix:
52+
53+
```text
54+
ocvm/install.sh
3855
```
3956

4057
## Docker E2E

scripts/check-release-prep.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ expect_file_text() {
2424
}
2525
}
2626

27+
expect_files_equal() {
28+
left="$1"
29+
right="$2"
30+
cmp -s "$left" "$right" || {
31+
echo "expected $left and $right to match" >&2
32+
exit 1
33+
}
34+
}
35+
2736
expect_output "asset=ocvm-x86_64-unknown-linux-gnu.tar.gz" \
2837
env OCVM_INSTALL_DRY_RUN=1 OCVM_TEST_UNAME_S=Linux OCVM_TEST_UNAME_M=x86_64 ./install.sh
2938

@@ -36,11 +45,14 @@ expect_output "asset=ocvm-aarch64-apple-darwin.tar.gz" \
3645
expect_output "api_url=https://api.github.com/repos/PerfectPan/ocvm/releases/tags/v0.1.1" \
3746
env OCVM_INSTALL_DRY_RUN=1 OCVM_VERSION=v0.1.1 OCVM_TEST_UNAME_S=Darwin OCVM_TEST_UNAME_M=arm64 ./install.sh
3847

48+
./scripts/sync-site-installer.sh >/dev/null
49+
3950
expect_file_text .github/workflows/release.yml "target: x86_64-unknown-linux-gnu"
4051
expect_file_text .github/workflows/release.yml "target: x86_64-apple-darwin"
4152
expect_file_text .github/workflows/release.yml "target: aarch64-apple-darwin"
4253
expect_file_text .github/workflows/release.yml "target: x86_64-pc-windows-msvc"
4354
expect_file_text .github/workflows/release.yml 'shasum -a 256 "${name}.tar.gz" > "${name}.tar.gz.sha256"'
4455
expect_file_text .github/workflows/release.yml '"$hash $name.zip"'
56+
expect_files_equal install.sh site/public/ocvm/install.sh
4557

4658
echo "release prep checks passed"

scripts/sync-site-installer.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
5+
install_script="$root/install.sh"
6+
site_installer_dir="$root/site/public/ocvm"
7+
8+
mkdir -p "$site_installer_dir"
9+
cp "$install_script" "$site_installer_dir/install.sh"
10+
11+
echo "synced site installer asset"

0 commit comments

Comments
 (0)