Skip to content

Commit 4fc3512

Browse files
authored
Merge pull request #1 from oscabriel/opencode-prereq-and-dep-bumps
Add opencode install check and bump dependencies
2 parents 7e84fc0 + 821fd5c commit 4fc3512

14 files changed

Lines changed: 521 additions & 398 deletions

File tree

apps/cli/package.json

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
11
{
2-
"name": "offworld",
3-
"version": "0.3.0",
4-
"description": "Offworld CLI - Repository reference generation for AI coding agents",
5-
"keywords": [
6-
"ai",
7-
"ai-agents",
8-
"amp",
9-
"anthropic",
10-
"claude",
11-
"claude-code",
12-
"cli",
13-
"codex",
14-
"coding-agent",
15-
"context",
16-
"cursor",
17-
"dependencies",
18-
"developer-tools",
19-
"documentation",
20-
"git",
21-
"llm",
22-
"monorepo",
23-
"offworld",
24-
"opencode",
25-
"reference",
26-
"repository",
27-
"skill",
28-
"typescript"
29-
],
30-
"homepage": "https://offworld.sh",
31-
"bugs": {
32-
"url": "https://github.com/oscabriel/offworld/issues"
33-
},
34-
"license": "MIT",
35-
"author": "Oscar Gabriel",
36-
"repository": {
37-
"type": "git",
38-
"url": "https://github.com/oscabriel/offworld.git",
39-
"directory": "apps/cli"
40-
},
41-
"bin": {
42-
"offworld": "./dist/cli.mjs",
43-
"ow": "./dist/cli.mjs"
44-
},
45-
"files": [
46-
"dist",
47-
"LICENSE",
48-
"README.md"
49-
],
50-
"type": "module",
51-
"exports": {
52-
".": {
53-
"types": "./dist/index.d.mts",
54-
"import": "./dist/index.mjs"
55-
}
56-
},
57-
"publishConfig": {
58-
"access": "public"
59-
},
60-
"scripts": {
61-
"build": "tsdown && chmod +x ./dist/cli.mjs",
62-
"dev": "tsdown --watch",
63-
"ow:dev": "bun run src/cli.ts",
64-
"typecheck": "tsc --noEmit",
65-
"test": "vitest run",
66-
"test:watch": "vitest",
67-
"prepublishOnly": "npm run build",
68-
"check": "oxlint && oxfmt --write"
69-
},
70-
"dependencies": {
71-
"@clack/prompts": "^0.11.0",
72-
"@offworld/sdk": "workspace:*",
73-
"@offworld/types": "workspace:*",
74-
"@opencode-ai/sdk": "^1.1.36",
75-
"@orpc/server": "^1.13.4",
76-
"convex": "catalog:",
77-
"open": "^11.0.0",
78-
"picocolors": "^1.1.1",
79-
"trpc-cli": "^0.12.2",
80-
"zod": "catalog:"
81-
},
82-
"devDependencies": {
83-
"@types/node": "catalog:",
84-
"tsdown": "catalog:",
85-
"typescript": "catalog:",
86-
"vitest": "catalog:"
87-
},
88-
"engines": {
89-
"node": ">=18"
90-
}
2+
"name": "offworld",
3+
"version": "0.3.0",
4+
"description": "Offworld CLI - Repository reference generation for AI coding agents",
5+
"keywords": [
6+
"ai",
7+
"ai-agents",
8+
"amp",
9+
"anthropic",
10+
"claude",
11+
"claude-code",
12+
"cli",
13+
"codex",
14+
"coding-agent",
15+
"context",
16+
"cursor",
17+
"dependencies",
18+
"developer-tools",
19+
"documentation",
20+
"git",
21+
"llm",
22+
"monorepo",
23+
"offworld",
24+
"opencode",
25+
"reference",
26+
"repository",
27+
"skill",
28+
"typescript"
29+
],
30+
"homepage": "https://offworld.sh",
31+
"bugs": {
32+
"url": "https://github.com/oscabriel/offworld/issues"
33+
},
34+
"license": "MIT",
35+
"author": "Oscar Gabriel",
36+
"repository": {
37+
"type": "git",
38+
"url": "https://github.com/oscabriel/offworld.git",
39+
"directory": "apps/cli"
40+
},
41+
"bin": {
42+
"offworld": "./dist/cli.mjs",
43+
"ow": "./dist/cli.mjs"
44+
},
45+
"files": [
46+
"dist",
47+
"LICENSE",
48+
"README.md"
49+
],
50+
"type": "module",
51+
"exports": {
52+
".": {
53+
"types": "./dist/index.d.mts",
54+
"import": "./dist/index.mjs"
55+
}
56+
},
57+
"publishConfig": {
58+
"access": "public"
59+
},
60+
"scripts": {
61+
"build": "tsdown && chmod +x ./dist/cli.mjs",
62+
"dev": "tsdown --watch",
63+
"ow:dev": "bun run src/cli.ts",
64+
"typecheck": "tsc --noEmit",
65+
"test": "vitest run",
66+
"test:watch": "vitest",
67+
"prepublishOnly": "npm run build",
68+
"check": "oxlint && oxfmt --write"
69+
},
70+
"dependencies": {
71+
"@clack/prompts": "^1.0.0",
72+
"@offworld/sdk": "workspace:*",
73+
"@offworld/types": "workspace:*",
74+
"@opencode-ai/sdk": "^1.1.51",
75+
"@orpc/server": "^1.13.4",
76+
"convex": "catalog:",
77+
"open": "^11.0.0",
78+
"picocolors": "^1.1.1",
79+
"trpc-cli": "^0.12.2",
80+
"zod": "catalog:"
81+
},
82+
"devDependencies": {
83+
"@types/node": "catalog:",
84+
"tsdown": "catalog:",
85+
"typescript": "catalog:",
86+
"vitest": "catalog:"
87+
},
88+
"engines": {
89+
"node": ">=18"
90+
}
9191
}

apps/cli/src/handlers/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ function collapseTilde(path: string): string {
6161
return path;
6262
}
6363

64-
function validatePath(value: string): string | undefined {
65-
if (!value.trim()) {
64+
function validatePath(value: string | undefined): string | Error | undefined {
65+
if (!value?.trim()) {
6666
return "Path cannot be empty";
6767
}
6868
return undefined;

apps/docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"check": "oxlint && oxfmt --write"
1313
},
1414
"dependencies": {
15-
"@astrojs/starlight": "^0.37.4",
15+
"@astrojs/starlight": "^0.37.6",
1616
"@fontsource/geist-mono": "^5.2.7",
1717
"@fontsource/sorts-mill-goudy": "^5.2.8",
18-
"astro": "^5.16.15",
18+
"astro": "^5.17.1",
1919
"sharp": "^0.34.5",
2020
"unist-util-visit": "^5.1.0",
2121
"zod": "catalog:"

apps/tui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"check": "oxlint && oxfmt --write"
99
},
1010
"dependencies": {
11-
"@opentui/core": "^0.1.75"
11+
"@opentui/core": "^0.1.77"
1212
},
1313
"devDependencies": {
14-
"@types/bun": "1.3.6"
14+
"@types/bun": "1.3.8"
1515
},
1616
"peerDependencies": {
1717
"typescript": "^5"

apps/web/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"@offworld/backend": "workspace:*",
2323
"@tailwindcss/vite": "^4.1.18",
2424
"@tanstack/react-query": "^5.90.20",
25-
"@tanstack/react-router": "^1.157.16",
26-
"@tanstack/react-router-ssr-query": "^1.157.16",
27-
"@tanstack/react-start": "^1.157.16",
25+
"@tanstack/react-router": "^1.158.0",
26+
"@tanstack/react-router-ssr-query": "^1.158.0",
27+
"@tanstack/react-start": "^1.158.0",
2828
"@workos/authkit-tanstack-react-start": "^0.5.0",
2929
"class-variance-authority": "^0.7.1",
3030
"clsx": "^2.1.1",
@@ -49,16 +49,16 @@
4949
"zod": "catalog:"
5050
},
5151
"devDependencies": {
52-
"@cloudflare/vite-plugin": "^1.22.0",
52+
"@cloudflare/vite-plugin": "^1.23.0",
5353
"@offworld/config": "workspace:*",
54-
"@playwright/test": "^1.58.0",
55-
"@tanstack/react-router-devtools": "^1.157.16",
56-
"@types/react": "19.2.10",
54+
"@playwright/test": "^1.58.1",
55+
"@tanstack/react-router-devtools": "^1.158.0",
56+
"@types/react": "19.2.11",
5757
"@types/react-dom": "19.2.3",
58-
"@vitejs/plugin-react": "^5.1.2",
58+
"@vitejs/plugin-react": "^5.1.3",
5959
"alchemy": "catalog:",
6060
"typescript": "catalog:",
6161
"vite": "^7.3.1",
62-
"wrangler": "^4.61.0"
62+
"wrangler": "^4.62.0"
6363
}
6464
}

apps/web/src/lib/cli-data.ts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,20 @@ Ask the user for:
201201
202202
Use their answers to fill flags in the commands below. Avoid running interactive CLI flows.
203203
204-
#### Step 1: Install the CLI
204+
#### Step 1: Check for opencode
205+
206+
opencode is required for local AI reference generation. Verify it's installed:
207+
208+
\`\`\`bash
209+
opencode --version
210+
\`\`\`
211+
212+
If not installed:
213+
\`\`\`bash
214+
curl -fsSL https://opencode.ai/install | bash
215+
\`\`\`
216+
217+
#### Step 2: Install the CLI
205218
206219
\`\`\`bash
207220
curl -fsSL https://offworld.sh/install | bash
@@ -212,7 +225,7 @@ Or use your preferred package manager:
212225
npm install -g offworld
213226
\`\`\`
214227
215-
#### Step 2: Initialize Offworld (non-interactive)
228+
#### Step 3: Initialize Offworld (non-interactive)
216229
217230
\`\`\`bash
218231
ow init --yes --agents "<agent-list>" --repo-root "<clone-dir>" --model "<provider/model>"
@@ -224,14 +237,14 @@ This will:
224237
- Configure which agents to sync reference files to
225238
- Set the default model for reference generation
226239
227-
#### Step 3: Verify the installation
240+
#### Step 4: Verify the installation
228241
229242
\`\`\`bash
230243
ow --version
231244
ow config show
232245
\`\`\`
233246
234-
#### Step 4: Initialize in the current project (non-interactive)
247+
#### Step 5: Initialize in the current project (non-interactive)
235248
236249
\`\`\`bash
237250
ow project init --yes --all --generate
@@ -253,7 +266,7 @@ Or exclude specific dependencies:
253266
ow project init --yes --all --skip "react,react-dom" --generate
254267
\`\`\`
255268
256-
#### Step 5: Verify setup
269+
#### Step 6: Verify setup
257270
258271
List the installed reference files:
259272
\`\`\`bash
@@ -274,6 +287,7 @@ export const toSubcommandId = (group: string) => `sub-${group}`;
274287
export function buildTocSections(): TocSection[] {
275288
return [
276289
{ id: "overview", label: "Overview" },
290+
{ id: "prerequisites", label: "Prerequisites" },
277291
{
278292
id: "installation",
279293
label: "Installation",

apps/web/src/routes/cli.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,29 @@ function CliPage() {
104104
</p>
105105
</section>
106106

107+
{/* Prerequisites */}
108+
<section id="prerequisites" className="pt-13">
109+
<h2 className="mb-5 font-serif text-3xl tracking-tight">Prerequisites</h2>
110+
<p className="text-muted-foreground mb-5 font-mono text-sm">
111+
Offworld uses{" "}
112+
<a
113+
href="https://opencode.ai"
114+
target="_blank"
115+
rel="noopener noreferrer"
116+
className="text-primary hover:underline"
117+
>
118+
opencode
119+
</a>{" "}
120+
as its AI runtime for local reference generation. Install it before installing
121+
Offworld.
122+
</p>
123+
<CodeBlock code="curl -fsSL https://opencode.ai/install | bash" />
124+
<p className="text-muted-foreground mt-3 font-mono text-sm">
125+
Verify the installation:
126+
</p>
127+
<CodeBlock code="opencode --version" />
128+
</section>
129+
107130
{/* Installation */}
108131
<section id="installation" className="pt-13">
109132
<h2 className="mb-5 font-serif text-3xl tracking-tight">Installation</h2>

0 commit comments

Comments
 (0)