open-computer-use-mcp 0.1.52 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,7 @@ This package bundles native runtimes for these supported platforms and lets the
14
14
  Global command aliases:
15
15
 
16
16
  - `open-computer-use`
17
+ - `ocu`
17
18
  - `open-computer-use-mcp`
18
19
  - `open-codex-computer-use-mcp`
19
20
 
@@ -46,8 +47,10 @@ Package page: https://www.npmjs.com/package/open-computer-use-mcp
46
47
 
47
48
  ```bash
48
49
  open-computer-use --version
50
+ ocu --version
49
51
  open-computer-use --help
50
52
  open-computer-use mcp
53
+ ocu mcp
51
54
  open-computer-use call list_apps
52
55
 
53
56
  # macOS permission check and onboarding
@@ -64,7 +67,7 @@ open-computer-use install-codex-plugin
64
67
 
65
68
  ## Notes
66
69
 
67
- - Version: `0.1.52`
70
+ - Version: `0.1.54`
68
71
  - Supported npm platforms: `darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`, `win32-arm64`, `win32-x64`
69
72
  - macOS still requires `Accessibility` and `Screen Recording` permissions.
70
73
  - Linux requires a signed-in desktop session with AT-SPI2 / D-Bus accessibility available for real app control.
package/bin/ocu ADDED
@@ -0,0 +1,209 @@
1
+ #!/usr/bin/env node
2
+ const { spawn } = require("node:child_process");
3
+ const fs = require("node:fs");
4
+ const path = require("node:path");
5
+
6
+ const platformPackages = {
7
+ "darwin-arm64": {
8
+ "executablePath": [
9
+ "dist",
10
+ "Open Computer Use.app",
11
+ "Contents",
12
+ "MacOS",
13
+ "OpenComputerUse"
14
+ ]
15
+ },
16
+ "darwin-x64": {
17
+ "executablePath": [
18
+ "dist",
19
+ "Open Computer Use.app",
20
+ "Contents",
21
+ "MacOS",
22
+ "OpenComputerUse"
23
+ ]
24
+ },
25
+ "linux-arm64": {
26
+ "executablePath": [
27
+ "dist",
28
+ "linux",
29
+ "arm64",
30
+ "open-computer-use"
31
+ ]
32
+ },
33
+ "linux-x64": {
34
+ "executablePath": [
35
+ "dist",
36
+ "linux",
37
+ "amd64",
38
+ "open-computer-use"
39
+ ]
40
+ },
41
+ "win32-arm64": {
42
+ "executablePath": [
43
+ "dist",
44
+ "windows",
45
+ "arm64",
46
+ "open-computer-use.exe"
47
+ ]
48
+ },
49
+ "win32-x64": {
50
+ "executablePath": [
51
+ "dist",
52
+ "windows",
53
+ "amd64",
54
+ "open-computer-use.exe"
55
+ ]
56
+ }
57
+ };
58
+ const packageRoot = path.resolve(__dirname, "..");
59
+ const args = process.argv.slice(2);
60
+ const command = args[0] || "";
61
+ const installCommands = new Map([
62
+ ["install-claude-mcp", "install-claude-mcp.sh"],
63
+ ["install-clauce-mcp", "install-claude-mcp.sh"],
64
+ ["install-gemini-mcp", "install-gemini-mcp.sh"],
65
+ ["install-codex-mcp", "install-codex-mcp.sh"],
66
+ ["install-opencode-mcp", "install-opencode-mcp.sh"],
67
+ ["install-codex-plugin", "install-codex-plugin.sh"],
68
+ ]);
69
+
70
+ function printLauncherHelp() {
71
+ console.log(`Open Computer Use
72
+
73
+ Usage:
74
+ open-computer-use [command] [options]
75
+ ocu [command] [options]
76
+ open-computer-use
77
+
78
+ Commands:
79
+ mcp Start the stdio MCP server.
80
+ doctor Print permission status and launch onboarding if needed on macOS.
81
+ list-apps Print running or recently used apps.
82
+ snapshot <app> Print the current accessibility snapshot for an app.
83
+ call <tool> Call one tool, or run a JSON array of tool calls.
84
+ turn-ended Notify the running MCP process that the host turn ended.
85
+ install-claude-mcp Install the MCP server into ~/.claude.json for this project.
86
+ install-gemini-mcp Install the MCP server into Gemini CLI config.
87
+ install-codex-mcp Install the MCP server into ~/.codex/config.toml.
88
+ install-opencode-mcp Install the MCP server into ~/.config/opencode.
89
+ install-codex-plugin Install this npm package into the local Codex plugin cache.
90
+ help [command] Show general or command-specific help.
91
+ version Print the CLI version.
92
+
93
+ Global options:
94
+ -h, --help Show help.
95
+ -v, --version Show version.
96
+
97
+ Notes:
98
+ This npm package bundles native runtimes for supported platforms and selects the current os-arch at launch.
99
+ Use 'open-computer-use help <command>' for command-specific help.`);
100
+ }
101
+
102
+ function printInstallHelp(scriptName, usage) {
103
+ console.log(`Usage:
104
+ ${usage}
105
+
106
+ This helper updates a local MCP or plugin config to run:
107
+ open-computer-use mcp
108
+
109
+ Script:
110
+ ${scriptName}`);
111
+ }
112
+
113
+ function fail(message) {
114
+ console.error(message);
115
+ process.exit(1);
116
+ }
117
+
118
+ function spawnAndExit(executable, executableArgs) {
119
+ const child = spawn(executable, executableArgs, {
120
+ stdio: "inherit",
121
+ windowsHide: false,
122
+ });
123
+
124
+ child.on("error", (error) => {
125
+ fail(`Failed to start ${executable}: ${error.message}`);
126
+ });
127
+
128
+ for (const signal of ["SIGINT", "SIGTERM"]) {
129
+ process.on(signal, () => {
130
+ child.kill(signal);
131
+ });
132
+ }
133
+
134
+ child.on("exit", (code, signal) => {
135
+ if (signal) {
136
+ process.exit(1);
137
+ }
138
+ process.exit(code ?? 0);
139
+ });
140
+ }
141
+
142
+ function runInstallCommand(scriptName, scriptArgs) {
143
+ if (process.platform === "win32") {
144
+ fail(`${command} currently requires a POSIX shell. Configure your MCP client with command "open-computer-use" and args ["mcp"] on Windows.`);
145
+ }
146
+
147
+ const scriptPath = path.join(packageRoot, "scripts", scriptName);
148
+ if (!fs.existsSync(scriptPath)) {
149
+ fail(`Missing installer helper at ${scriptPath}.`);
150
+ }
151
+
152
+ spawnAndExit(scriptPath, scriptArgs);
153
+ }
154
+
155
+ function resolveNativeExecutable() {
156
+ const platformKey = `${process.platform}-${process.arch}`;
157
+ const target = platformPackages[platformKey];
158
+ if (!target) {
159
+ const supported = Object.keys(platformPackages).sort().join(", ");
160
+ fail(`Unsupported platform ${platformKey}. Supported platforms: ${supported}.`);
161
+ }
162
+
163
+ const executablePath = path.join(packageRoot, ...target.executablePath);
164
+ if (!fs.existsSync(executablePath)) {
165
+ fail(`Missing bundled native runtime for ${platformKey} at ${executablePath}.
166
+
167
+ Reinstall with:
168
+ npm install -g open-computer-use`);
169
+ }
170
+
171
+ return executablePath;
172
+ }
173
+
174
+ if (command === "-h" || command === "--help" || (command === "help" && args.length <= 1)) {
175
+ printLauncherHelp();
176
+ process.exit(0);
177
+ }
178
+
179
+ if (command === "help" && args[1] === "install-codex-plugin") {
180
+ printInstallHelp("install-codex-plugin.sh", "open-computer-use install-codex-plugin");
181
+ process.exit(0);
182
+ }
183
+
184
+ if (command === "help" && args[1] === "install-codex-mcp") {
185
+ printInstallHelp("install-codex-mcp.sh", "open-computer-use install-codex-mcp");
186
+ process.exit(0);
187
+ }
188
+
189
+ if (command === "help" && args[1] === "install-gemini-mcp") {
190
+ printInstallHelp("install-gemini-mcp.sh", "open-computer-use install-gemini-mcp [--scope project|user]");
191
+ process.exit(0);
192
+ }
193
+
194
+ if (command === "help" && args[1] === "install-opencode-mcp") {
195
+ printInstallHelp("install-opencode-mcp.sh", "open-computer-use install-opencode-mcp");
196
+ process.exit(0);
197
+ }
198
+
199
+ if (command === "help" && (args[1] === "install-claude-mcp" || args[1] === "install-clauce-mcp")) {
200
+ printInstallHelp("install-claude-mcp.sh", "open-computer-use install-claude-mcp");
201
+ process.exit(0);
202
+ }
203
+
204
+ if (installCommands.has(command)) {
205
+ const scriptName = installCommands.get(command);
206
+ runInstallCommand(scriptName, args.slice(1));
207
+ } else {
208
+ spawnAndExit(resolveNativeExecutable(), args);
209
+ }
@@ -72,6 +72,7 @@ function printLauncherHelp() {
72
72
 
73
73
  Usage:
74
74
  open-computer-use [command] [options]
75
+ ocu [command] [options]
75
76
  open-computer-use
76
77
 
77
78
  Commands:
@@ -72,6 +72,7 @@ function printLauncherHelp() {
72
72
 
73
73
  Usage:
74
74
  open-computer-use [command] [options]
75
+ ocu [command] [options]
75
76
  open-computer-use
76
77
 
77
78
  Commands:
@@ -72,6 +72,7 @@ function printLauncherHelp() {
72
72
 
73
73
  Usage:
74
74
  open-computer-use [command] [options]
75
+ ocu [command] [options]
75
76
  open-computer-use
76
77
 
77
78
  Commands:
@@ -21,7 +21,7 @@
21
21
  <key>CFBundlePackageType</key>
22
22
  <string>APPL</string>
23
23
  <key>CFBundleShortVersionString</key>
24
- <string>0.1.52</string>
24
+ <string>0.1.54</string>
25
25
  <key>CFBundleVersion</key>
26
26
  <string>1</string>
27
27
  <key>LSMinimumSystemVersion</key>
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-computer-use-mcp",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "description": "Cross-platform Computer Use MCP server launcher. After install, configure open-computer-use mcp.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/iFurySt/open-codex-computer-use",
@@ -26,6 +26,7 @@
26
26
  },
27
27
  "bin": {
28
28
  "open-computer-use": "bin/open-computer-use",
29
+ "ocu": "bin/ocu",
29
30
  "open-computer-use-mcp": "bin/open-computer-use-mcp",
30
31
  "open-codex-computer-use-mcp": "bin/open-codex-computer-use-mcp"
31
32
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-computer-use",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "description": "Open-source cross-platform Computer Use MCP server packaged as a Codex plugin.",
5
5
  "author": {
6
6
  "name": "Leo",
@@ -11,13 +11,13 @@ const mcpConfig = {
11
11
  };
12
12
  const lines = [
13
13
  "",
14
- "Installed open-computer-use-mcp@0.1.52.",
14
+ "Installed open-computer-use-mcp@0.1.54.",
15
15
  "Package: https://www.npmjs.com/package/open-computer-use-mcp",
16
- "Commands: open-computer-use, open-computer-use-mcp, open-codex-computer-use-mcp",
16
+ "Commands: open-computer-use, ocu, open-computer-use-mcp, open-codex-computer-use-mcp",
17
17
  "Native runtime will be selected from bundled artifacts for " + process.platform + "-" + process.arch + ".",
18
18
  "",
19
19
  "Next:",
20
- "1. Run open-computer-use --version",
20
+ "1. Run open-computer-use --version or ocu --version",
21
21
  "2. Add the MCP config below to your host client",
22
22
  "3. On macOS, run open-computer-use doctor and grant Accessibility / Screen Recording if prompted",
23
23
  "",