Skip to content

Commit f579d14

Browse files
committed
Add cross-platform ORW support
1 parent 58dc4f6 commit f579d14

7 files changed

Lines changed: 207 additions & 80 deletions

File tree

.alfonso/release-notes/v0.1.0.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# @cortexkit/orw v0.1.0
22

3-
Initial public release of ORW, a local Bun-powered OpenCode release integration watcher.
3+
Initial public release of ORW, a local Bun-powered OpenCode release integration watcher for macOS, Linux, and Windows.
44

55
## Highlights
66

77
- Initialize a per-project watcher config with `bunx @cortexkit/orw init`.
88
- Watch upstream OpenCode releases and build integrated local artifacts.
99
- Merge selected local branches, GitHub branch URLs, and upstream PR URLs in order.
10-
- Build and verify the OpenCode CLI and Electron desktop app before install.
10+
- Build and verify the native OpenCode CLI on macOS, Linux, and Windows.
11+
- Optionally package the Electron desktop app for the host platform. macOS can auto-install the `.app`; Linux and Windows desktop packages are verified and left for manual install.
1112
- Install immediately or defer until OpenCode exits.
1213

1314
## Safety

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Full user-facing release notes live in GitHub Releases. This file is a lightweig
66

77
## 0.1.x
88

9-
- **0.1.0** — Initial public release of `@cortexkit/orw`: Bun-powered OpenCode release integration watcher with local branch, GitHub branch URL, and GitHub PR URL support.
9+
- **0.1.0** — Initial public release of `@cortexkit/orw`: Bun-powered OpenCode release integration watcher with macOS/Linux/Windows CLI support plus local branch, GitHub branch URL, and GitHub PR URL integration sources.

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# @cortexkit/orw
22

3-
OpenCode Release Watch (`orw`) is a local macOS automation tool for rebuilding OpenCode releases with your selected integration refs.
3+
OpenCode Release Watch (`orw`) is a local automation tool for rebuilding OpenCode releases with your selected integration refs.
44

5-
It watches `anomalyco/opencode` releases, creates a disposable clone, fetches your configured local branches / GitHub branch URLs / upstream PR URLs, asks `opencode run` to merge them onto the release tag, builds the CLI and desktop app, then offers to install the verified artifacts.
5+
It watches `anomalyco/opencode` releases, creates a disposable clone, fetches your configured local branches / GitHub branch URLs / upstream PR URLs, asks `opencode run` to merge them onto the release tag, builds the native CLI, optionally packages the Electron desktop app, then records the verified artifacts.
66

77
## Requirements
88

9-
- macOS
9+
- macOS, Linux, or Windows
1010
- [Bun](https://bun.sh/)
1111
- `git`
1212
- `opencode` on `PATH`
@@ -42,7 +42,7 @@ bunx @cortexkit/orw check --force
4242

4343
## Config
4444

45-
`init` writes `orw.config.json` in the current directory:
45+
`init` writes `orw.config.json` in the current directory. On macOS it looks like:
4646

4747
```json
4848
{
@@ -54,7 +54,7 @@ bunx @cortexkit/orw check --force
5454
"base_branch": "dev",
5555
"branches": [],
5656
"poll_minutes": 30,
57-
"agent": "Alfonso - CTO",
57+
"agent": "build",
5858
"model": "openai/gpt-5.5-fast",
5959
"opencode_bin": "opencode",
6060
"desktop_target": "/Applications/OpenCode.app",
@@ -96,6 +96,7 @@ Relative paths in config are resolved from the directory containing `orw.config.
9696
- `work_repo`: disposable OpenCode clone used for each integration attempt
9797
- `runtime_dir`: lock files, logs, and last-success state
9898
- `prompt_path`: optional custom prompt template; if omitted, the packaged default prompt is used
99+
- `install_desktop`: defaults to `true` on macOS and `false` on Linux/Windows when generated by `init`
99100

100101
## Commands
101102

@@ -119,6 +120,8 @@ bunx @cortexkit/orw --config /path/to/orw.config.json preview
119120

120121
## launchd
121122

123+
`launchd` integration is macOS-only. On Linux or Windows, run `bunx @cortexkit/orw check` from your scheduler of choice.
124+
122125
Install a launchd job for periodic checks:
123126

124127
```bash
@@ -135,10 +138,10 @@ bunx @cortexkit/orw launchd uninstall
135138

136139
## Install behavior
137140

138-
- CLI install runs OpenCode's upstream `install` script with `--binary <local build> --no-modify-path`.
139-
- Desktop install copies the packaged Electron `.app` bundle to `desktop_target`.
141+
- CLI install copies the verified native binary to `~/.opencode/bin/opencode` (`opencode.exe` on Windows).
142+
- On macOS, desktop install copies the packaged Electron `.app` bundle to `desktop_target`, removes quarantine xattrs, ad-hoc codesigns it, and opens it.
143+
- On Linux and Windows, desktop packaging can be enabled with `install_desktop: true`; ORW verifies and records the resulting package, but desktop auto-install is manual for now.
140144
- Install is blocked while OpenCode is running. If that happens, run `bunx @cortexkit/orw install-when-closed`, then quit OpenCode.
141-
- The desktop app has quarantine xattrs removed and is ad-hoc codesigned after copying.
142145

143146
## Safety
144147

config.example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"opencode_bin": "opencode",
1313
"desktop_target": "/Applications/OpenCode.app",
1414
"install_cli": true,
15-
"install_desktop": true,
15+
"install_desktop": false,
1616
"notify_timeout": 120
1717
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"automation",
99
"bun",
1010
"cli",
11-
"macos"
11+
"macos",
12+
"linux",
13+
"windows"
1214
],
1315
"author": "Cortexkit",
1416
"license": "MIT",

prompt.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Requirements:
1212
- Name the branch {{branch}}.
1313
- Merge these refs in order: {{merges}}.
1414
- If there are merge conflicts, resolve them completely.
15-
- Build the host CLI and the Electron desktop app.
15+
- Build the host CLI.
16+
- {{desktop_requirement}}
1617
- The CLI must be compiled with stable release identity: OPENCODE_CHANNEL={{channel}} and OPENCODE_VERSION={{version}}.
1718

1819
Exact tasks:
@@ -22,11 +23,8 @@ Exact tasks:
2223
4. Build the host CLI in `packages/opencode` with `OPENCODE_CHANNEL={{channel}} OPENCODE_VERSION={{version}} bun run build -- --single`.
2324
5. Ensure the built CLI binary exists at `{{cli}}`.
2425
6. Run `{{cli}} --version` and verify the output is exactly `{{version}}`.
25-
7. Prepare the production Electron desktop package in `packages/desktop` with `OPENCODE_CHANNEL=prod OPENCODE_VERSION={{version}} bun ./scripts/prepare.ts`.
26-
8. Build the production Electron desktop assets in `packages/desktop` with `OPENCODE_CHANNEL=prod OPENCODE_VERSION={{version}} bun run build`.
27-
9. Package the production Electron desktop app in `packages/desktop` with `OPENCODE_CHANNEL=prod OPENCODE_VERSION={{version}} bun run package:mac`.
28-
10. Confirm the desktop app bundle exists at `{{app}}`.
29-
11. Return a concise summary with the final branch name and artifact paths.
26+
{{desktop_tasks}}
27+
Return a concise summary with the final branch name and artifact paths.
3028

3129
Context:
3230
- Upstream repo: {{release_repo}}
@@ -35,4 +33,4 @@ Context:
3533
- Integration refs:
3634
- {{sources}}
3735

38-
If anything fails, fix it and continue until the branch is integrated and both builds succeed.
36+
If anything fails, fix it and continue until the branch is integrated and the configured build succeeds.

0 commit comments

Comments
 (0)