Skip to content

Commit 5dbd5ac

Browse files
committed
feat(cli): add interactive install command
Related to #153 Co-authored-by: Taegeon Alan Go <[email protected]> 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent 9085217 commit 5dbd5ac

File tree

7 files changed

+1071
-2
lines changed

7 files changed

+1071
-2
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,32 @@ If you don't want all this, as mentioned, you can just pick and choose specific
168168

169169
### For Humans
170170

171-
Let the LLM Agent handle the grunt work. Paste this into a fresh opencode session:
171+
**Option 1: CLI Installer (Recommended)**
172+
173+
The easiest way to install. Interactive prompts guide you through setup:
174+
175+
```bash
176+
bunx oh-my-opencode install
177+
```
178+
179+
Or use non-interactive mode for automation:
180+
181+
```bash
182+
bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes
183+
```
184+
185+
**CLI Options:**
186+
| Option | Values | Description |
187+
|--------|--------|-------------|
188+
| `--claude` | `no`, `yes`, `max20` | Claude Pro/Max subscription |
189+
| `--chatgpt` | `no`, `yes` | ChatGPT Plus/Pro subscription |
190+
| `--gemini` | `no`, `yes` | Google Gemini integration |
191+
| `--no-tui` | - | Non-interactive mode (requires all options) |
192+
| `--skip-auth` | - | Skip authentication setup hints |
193+
194+
**Option 2: Let an LLM Agent do it**
195+
196+
Paste this into a fresh opencode session:
172197
```
173198
Install and configure by following the instructions here https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/README.md
174199
```

bun.lock

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
"dependencies": {
88
"@ast-grep/cli": "^0.40.0",
99
"@ast-grep/napi": "^0.40.0",
10+
"@clack/prompts": "^0.11.0",
1011
"@code-yeongyu/comment-checker": "^0.6.0",
1112
"@openauthjs/openauth": "^0.4.3",
1213
"@opencode-ai/plugin": "^1.0.162",
14+
"commander": "^14.0.2",
1315
"hono": "^4.10.4",
16+
"picocolors": "^1.1.1",
1417
"picomatch": "^4.0.2",
1518
"xdg-basedir": "^5.1.0",
1619
"zod": "^4.1.8",
@@ -64,6 +67,10 @@
6467

6568
"@ast-grep/napi-win32-x64-msvc": ["@ast-grep/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-Hk2IwfPqMFGZt5SRxsoWmGLxBXxprow4LRp1eG6V8EEiJCNHxZ9ZiEaIc5bNvMDBjHVSnqZAXT22dROhrcSKQg=="],
6669

70+
"@clack/core": ["@clack/[email protected]", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-p3y0FIOwaYRUPRcMO7+dlmLh8PSRcrjuTndsiA0WAFbWES0mLZlrjVoBRZ9DzkPFJZG6KGkJmoEAY0ZcVWTkow=="],
71+
72+
"@clack/prompts": ["@clack/[email protected]", "", { "dependencies": { "@clack/core": "0.5.0", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw=="],
73+
6774
"@code-yeongyu/comment-checker": ["@code-yeongyu/[email protected]", "", { "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ], "bin": { "comment-checker": "bin/comment-checker" } }, "sha512-VtDPrhbUJcb5BIS18VMcY/N/xSLbMr6dpU9MO1NYQyEDhI4pSIx07K4gOlCutG/nHVCjO+HEarn8rttODP+5UA=="],
6875

6976
"@openauthjs/openauth": ["@openauthjs/[email protected]", "", { "dependencies": { "@standard-schema/spec": "1.0.0-beta.3", "aws4fetch": "1.0.20", "jose": "5.9.6" }, "peerDependencies": { "arctic": "^2.2.2", "hono": "^4.0.0" } }, "sha512-RlnjqvHzqcbFVymEwhlUEuac4utA5h4nhSK/i2szZuQmxTIqbGUxZ+nM+avM+VV4Ing+/ZaNLKILoXS3yrkOOw=="],
@@ -94,14 +101,20 @@
94101

95102
"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-z3Xwlg7j2l9JY27x5Qn3Wlyos8YAp0kKRlrePAOjgjMGS5IG6E7Jnlx736vH9UVI4wUICwwhC9anYL++XeOgTQ=="],
96103

104+
"commander": ["[email protected]", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="],
105+
97106
"detect-libc": ["[email protected]", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
98107

99108
"hono": ["[email protected]", "", {}, "sha512-DDT0A0r6wzhe8zCGoYOmMeuGu3dyTAE40HHjwUsWFTEy5WxK1x2WDSsBPlEXgPbRIFY6miDualuUDbasPogIww=="],
100109

101110
"jose": ["[email protected]", "", {}, "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ=="],
102111

112+
"picocolors": ["[email protected]", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
113+
103114
"picomatch": ["[email protected]", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="],
104115

116+
"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
117+
105118
"typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
106119

107120
"undici-types": ["[email protected]", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"type": "module",
8+
"bin": {
9+
"oh-my-opencode": "./dist/cli/index.js"
10+
},
811
"files": [
912
"dist"
1013
],
@@ -20,7 +23,7 @@
2023
"./schema.json": "./dist/oh-my-opencode.schema.json"
2124
},
2225
"scripts": {
23-
"build": "bun build src/index.ts src/google-auth.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun run build:schema",
26+
"build": "bun build src/index.ts src/google-auth.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm && bun run build:schema",
2427
"build:schema": "bun run script/build-schema.ts",
2528
"clean": "rm -rf dist",
2629
"prepublishOnly": "bun run clean && bun run build",
@@ -49,10 +52,13 @@
4952
"dependencies": {
5053
"@ast-grep/cli": "^0.40.0",
5154
"@ast-grep/napi": "^0.40.0",
55+
"@clack/prompts": "^0.11.0",
5256
"@code-yeongyu/comment-checker": "^0.6.0",
5357
"@openauthjs/openauth": "^0.4.3",
5458
"@opencode-ai/plugin": "^1.0.162",
59+
"commander": "^14.0.2",
5560
"hono": "^4.10.4",
61+
"picocolors": "^1.1.1",
5662
"picomatch": "^4.0.2",
5763
"xdg-basedir": "^5.1.0",
5864
"zod": "^4.1.8"

0 commit comments

Comments
 (0)