openowl 0.3.1

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.
Files changed (4) hide show
  1. package/README.md +42 -0
  2. package/bin/owl +41 -0
  3. package/install.js +102 -0
  4. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # OpenOwl
2
+
3
+ AI desktop automation MCP server — give your AI eyes and hands.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g openowl
9
+ ```
10
+
11
+ Or use directly with npx:
12
+
13
+ ```bash
14
+ npx openowl
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ 1. Sign up at [openowl-portal.vercel.app/quick-setup](https://openowl-portal.vercel.app/quick-setup)
20
+ 2. Save your API key:
21
+ ```bash
22
+ mkdir -p ~/.openowl
23
+ echo "owl-xxxx-xxxx-xxxx" > ~/.openowl/api.key
24
+ ```
25
+ 3. Register with Claude Code:
26
+ ```bash
27
+ claude mcp add owl --transport stdio -s user -- owl
28
+ ```
29
+
30
+ ## What it does
31
+
32
+ OpenOwl gives AI assistants the ability to see your screen and interact with desktop applications — clicking, typing, scrolling, reading text, and more.
33
+
34
+ ## Requirements
35
+
36
+ - macOS (Apple Silicon or Intel)
37
+ - Grant Accessibility and Screen Recording permissions when prompted
38
+
39
+ ## Links
40
+
41
+ - [Quick Setup](https://openowl-portal.vercel.app/quick-setup)
42
+ - [GitHub](https://github.com/mihir-kanzariya/OpenOwl)
package/bin/owl ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const os = require("os");
5
+ const path = require("path");
6
+ const { spawn } = require("child_process");
7
+ const fs = require("fs");
8
+
9
+ const BINARIES = {
10
+ "darwin-arm64": "owl-darwin-arm64",
11
+ "darwin-x64": "owl-darwin-x86_64",
12
+ // "win32-x64": "owl-win32-x64.exe",
13
+ };
14
+
15
+ const platformKey = `${os.platform()}-${os.arch()}`;
16
+ const binaryName = BINARIES[platformKey];
17
+
18
+ if (!binaryName) {
19
+ console.error(`[OpenOwl] Unsupported platform: ${platformKey}`);
20
+ process.exit(1);
21
+ }
22
+
23
+ const installDir = path.join(__dirname, "..", ".owl");
24
+ const binaryPath = path.join(installDir, binaryName);
25
+
26
+ if (!fs.existsSync(binaryPath)) {
27
+ console.error("[OpenOwl] Binary not found. Run: npm rebuild openowl");
28
+ process.exit(1);
29
+ }
30
+
31
+ // Spawn with inherited stdio — critical for MCP stdio transport
32
+ const child = spawn(binaryPath, process.argv.slice(2), {
33
+ stdio: "inherit",
34
+ env: process.env,
35
+ });
36
+
37
+ child.on("exit", (code) => process.exit(code || 0));
38
+ child.on("error", (err) => {
39
+ console.error(`[OpenOwl] ${err.message}`);
40
+ process.exit(1);
41
+ });
package/install.js ADDED
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const os = require("os");
5
+ const fs = require("fs");
6
+ const path = require("path");
7
+ const https = require("https");
8
+ const http = require("http");
9
+ const { execSync } = require("child_process");
10
+
11
+ const VERSION = "0.3.1";
12
+ const BASE_URL =
13
+ "https://dedjlsvrwafhyznaazbm.supabase.co/storage/v1/object/public/releases";
14
+
15
+ const PLATFORMS = {
16
+ "darwin-arm64": {
17
+ url: `${BASE_URL}/v${VERSION}/owl-darwin-arm64.tar.gz`,
18
+ binary: "owl-darwin-arm64",
19
+ },
20
+ "darwin-x64": {
21
+ url: `${BASE_URL}/v${VERSION}/owl-darwin-x64.tar.gz`,
22
+ binary: "owl-darwin-x86_64",
23
+ },
24
+ // "win32-x64": {
25
+ // url: `${BASE_URL}/v${VERSION}/owl-win32-x64.zip`,
26
+ // binary: "owl-win32-x64.exe",
27
+ // },
28
+ };
29
+
30
+ function getPlatformKey() {
31
+ const platform = os.platform();
32
+ const arch = os.arch();
33
+ return `${platform}-${arch}`;
34
+ }
35
+
36
+ function download(url) {
37
+ return new Promise((resolve, reject) => {
38
+ const get = url.startsWith("https") ? https.get : http.get;
39
+ get(url, (res) => {
40
+ // Follow redirects
41
+ if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
42
+ return download(res.headers.location).then(resolve).catch(reject);
43
+ }
44
+ if (res.statusCode !== 200) {
45
+ return reject(new Error(`Download failed: HTTP ${res.statusCode}`));
46
+ }
47
+ const chunks = [];
48
+ res.on("data", (chunk) => chunks.push(chunk));
49
+ res.on("end", () => resolve(Buffer.concat(chunks)));
50
+ res.on("error", reject);
51
+ }).on("error", reject);
52
+ });
53
+ }
54
+
55
+ async function install() {
56
+ const platformKey = getPlatformKey();
57
+ const info = PLATFORMS[platformKey];
58
+
59
+ if (!info) {
60
+ console.error(`[OpenOwl] Unsupported platform: ${platformKey}`);
61
+ console.error(`[OpenOwl] Supported: ${Object.keys(PLATFORMS).join(", ")}`);
62
+ process.exit(1);
63
+ }
64
+
65
+ const binDir = path.join(__dirname, "bin");
66
+ const installDir = path.join(__dirname, ".owl");
67
+
68
+ // Skip if already installed
69
+ const binaryPath = path.join(installDir, info.binary);
70
+ if (fs.existsSync(binaryPath)) {
71
+ console.log("[OpenOwl] Already installed.");
72
+ return;
73
+ }
74
+
75
+ console.log(`[OpenOwl] Downloading for ${platformKey}...`);
76
+
77
+ try {
78
+ const tarball = await download(info.url);
79
+
80
+ // Write tarball to temp file
81
+ const tmpFile = path.join(os.tmpdir(), `owl-${VERSION}.tar.gz`);
82
+ fs.writeFileSync(tmpFile, tarball);
83
+
84
+ // Extract
85
+ fs.mkdirSync(installDir, { recursive: true });
86
+ execSync(`tar -xzf "${tmpFile}" -C "${installDir}"`, { stdio: "pipe" });
87
+ fs.unlinkSync(tmpFile);
88
+
89
+ // Make binary executable
90
+ if (fs.existsSync(binaryPath)) {
91
+ fs.chmodSync(binaryPath, 0o755);
92
+ }
93
+
94
+ console.log(`[OpenOwl] Installed successfully (${(tarball.length / 1024 / 1024).toFixed(1)} MB)`);
95
+ } catch (err) {
96
+ console.error(`[OpenOwl] Installation failed: ${err.message}`);
97
+ console.error("[OpenOwl] Try: brew install mihir-kanzariya/owl/owl");
98
+ process.exit(1);
99
+ }
100
+ }
101
+
102
+ install();
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "openowl",
3
+ "version": "0.3.1",
4
+ "description": "AI desktop automation MCP server — give your AI eyes and hands",
5
+ "homepage": "https://openowl-portal.vercel.app",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/mihir-kanzariya/OpenOwl"
9
+ },
10
+ "license": "SEE LICENSE IN LICENSE",
11
+ "bin": {
12
+ "owl": "bin/owl"
13
+ },
14
+ "scripts": {
15
+ "postinstall": "node install.js"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "automation",
20
+ "desktop",
21
+ "screen",
22
+ "claude",
23
+ "ai",
24
+ "accessibility",
25
+ "screenshot",
26
+ "openowl"
27
+ ],
28
+ "os": [
29
+ "darwin",
30
+ "win32"
31
+ ],
32
+ "engines": {
33
+ "node": ">=16"
34
+ },
35
+ "files": [
36
+ "install.js",
37
+ "bin/owl",
38
+ "bin/owl.cmd",
39
+ "README.md"
40
+ ]
41
+ }