Skip to content

Commit 654e474

Browse files
feat(headless): publish openwrk npm package (anomalyco#337)
1 parent 99ce696 commit 654e474

4 files changed

Lines changed: 49 additions & 18 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The goal: make “agentic work” feel like a product, not a terminal.
2929
- `curl -fsSL https://raw.githubusercontent.com/different-ai/openwork/dev/packages/owpenbot/install.sh | bash`
3030
- run `owpenbot setup`, then `owpenbot whatsapp login`, then `owpenbot start`
3131
- full setup: [packages/owpenbot/README.md](./packages/owpenbot/README.md)
32-
- **OpenWork Headless (CLI host)**: run OpenCode + OpenWork server without the desktop UI.
32+
- **Openwrk (CLI host)**: run OpenCode + OpenWork server without the desktop UI.
3333
- docs: [packages/headless/README.md](./packages/headless/README.md)
3434

3535

‎packages/headless/README.md‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
# OpenWork Headless
1+
# Openwrk
22

33
Headless host orchestrator for OpenCode + OpenWork server + Owpenbot. This is a CLI-first way to run host mode without the desktop UI.
44

55
## Quick start
66

77
```bash
8-
pnpm --filter @different-ai/openwork-headless dev -- \
8+
npm install -g openwrk
9+
openwrk start --workspace /path/to/workspace --approval auto
10+
```
11+
12+
Or from source:
13+
14+
```bash
15+
pnpm --filter openwrk dev -- \
916
start --workspace /path/to/workspace --approval auto
1017
```
1118

@@ -19,27 +26,27 @@ The command prints pairing details (OpenWork server URL + token, OpenCode URL +
1926
## Approvals (manual mode)
2027

2128
```bash
22-
openwork-headless approvals list \
29+
openwrk approvals list \
2330
--openwork-url http://<host>:8787 \
2431
--host-token <token>
2532

26-
openwork-headless approvals reply <id> --allow \
33+
openwrk approvals reply <id> --allow \
2734
--openwork-url http://<host>:8787 \
2835
--host-token <token>
2936
```
3037

3138
## Health checks
3239

3340
```bash
34-
openwork-headless status \
41+
openwrk status \
3542
--openwork-url http://<host>:8787 \
3643
--opencode-url http://<host>:4096
3744
```
3845

3946
## Smoke checks
4047

4148
```bash
42-
openwork-headless start --workspace /path/to/workspace --check --check-events
49+
openwrk start --workspace /path/to/workspace --check --check-events
4350
```
4451

4552
This starts the services, verifies health + SSE events, then exits cleanly.
@@ -49,7 +56,7 @@ This starts the services, verifies health + SSE events, then exits cleanly.
4956
Point to source CLIs for fast iteration:
5057

5158
```bash
52-
openwork-headless start \
59+
openwrk start \
5360
--workspace /path/to/workspace \
5461
--openwork-server-bin packages/server/src/cli.ts \
5562
--owpenbot-bin packages/owpenbot/src/cli.ts

‎packages/headless/package.json‎

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
11
{
2-
"name": "@different-ai/openwork-headless",
2+
"name": "openwrk",
33
"version": "0.1.0",
4-
"private": true,
4+
"description": "Headless OpenWork host orchestrator for OpenCode + OpenWork server + Owpenbot",
55
"type": "module",
66
"bin": {
7-
"openwork-headless": "dist/cli.js"
7+
"openwrk": "dist/cli.js"
88
},
99
"scripts": {
1010
"dev": "bun src/cli.ts",
1111
"build": "tsc -p tsconfig.json",
1212
"typecheck": "tsc -p tsconfig.json --noEmit"
1313
},
14+
"files": [
15+
"dist",
16+
"README.md"
17+
],
18+
"repository": {
19+
"type": "git",
20+
"url": "git+https://github.com/different-ai/openwork.git",
21+
"directory": "packages/headless"
22+
},
23+
"homepage": "https://github.com/different-ai/openwork/tree/dev/packages/headless",
24+
"bugs": {
25+
"url": "https://github.com/different-ai/openwork/issues"
26+
},
27+
"keywords": [
28+
"openwork",
29+
"opencode",
30+
"headless",
31+
"cli",
32+
"agent"
33+
],
34+
"license": "MIT",
35+
"publishConfig": {
36+
"access": "public"
37+
},
1438
"dependencies": {
1539
"@opencode-ai/sdk": "^1.1.31"
1640
},

‎packages/headless/src/cli.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,13 @@ async function waitForOpencodeHealthy(client: ReturnType<typeof createOpencodeCl
343343

344344
function printHelp(): void {
345345
const message = [
346-
"openwork-headless",
346+
"openwrk",
347347
"",
348348
"Usage:",
349-
" openwork-headless start [--workspace <path>] [options]",
350-
" openwork-headless approvals list --openwork-url <url> --host-token <token>",
351-
" openwork-headless approvals reply <id> --allow|--deny --openwork-url <url> --host-token <token>",
352-
" openwork-headless status [--openwork-url <url>] [--opencode-url <url>]",
349+
" openwrk start [--workspace <path>] [options]",
350+
" openwrk approvals list --openwork-url <url> --host-token <token>",
351+
" openwrk approvals reply <id> --allow|--deny --openwork-url <url> --host-token <token>",
352+
" openwrk status [--openwork-url <url>] [--opencode-url <url>]",
353353
"",
354354
"Commands:",
355355
" start Start OpenCode + OpenWork server + Owpenbot",
@@ -429,7 +429,7 @@ async function startOpencode(options: {
429429
stdio: ["ignore", "pipe", "pipe"],
430430
env: {
431431
...process.env,
432-
OPENCODE_CLIENT: "openwork-headless",
432+
OPENCODE_CLIENT: "openwrk",
433433
OPENWORK: "1",
434434
...(options.username ? { OPENCODE_SERVER_USERNAME: options.username } : {}),
435435
...(options.password ? { OPENCODE_SERVER_PASSWORD: options.password } : {}),
@@ -886,7 +886,7 @@ async function runStart(args: ParsedArgs) {
886886
if (outputJson) {
887887
console.log(JSON.stringify(payload, null, 2));
888888
} else {
889-
console.log("OpenWork Headless running");
889+
console.log("Openwrk running");
890890
console.log(`Workspace: ${payload.workspace}`);
891891
console.log(`OpenCode: ${payload.opencode.baseUrl}`);
892892
console.log(`OpenCode connect URL: ${payload.opencode.connectUrl}`);

0 commit comments

Comments
 (0)