@phnx-labs/computer-cli 0.1.0
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/CHANGELOG.md +8 -0
- package/LICENSE +105 -0
- package/README.md +33 -0
- package/bin/computer.cjs +36 -0
- package/package.json +44 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, Apache 2.0 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Phoenix Horizon, Inc.
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Computer CLI
|
|
2
|
+
|
|
3
|
+
Desktop automation through macOS Accessibility, Windows UI Automation and VNC.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install -g @phnx-labs/computer-cli
|
|
7
|
+
computer --help
|
|
8
|
+
computer apps
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The executable is `computer`. Agents CLI consumes it through `agents computer`, adding fleet device discovery and agent-session history.
|
|
12
|
+
|
|
13
|
+
On first use, macOS downloads and verifies the signed native helper. macOS still requires the user to grant Accessibility and Screen Recording access. Setup cannot grant those permissions automatically. An existing helper is reused; its application identity and policy files are preserved. `computer start` also installs a missing helper. Use `computer setup` to explicitly replace it.
|
|
14
|
+
|
|
15
|
+
Windows automation uses the native Windows driver in the interactive desktop session, reached through SSH. VNC provides screenshot and coordinate input for desktops without native Accessibility support. See [command reference](https://github.com/phnx-labs/computer-cli/blob/main/docs/computer.md) and [integration contract](https://github.com/phnx-labs/computer-cli/blob/main/docs/integration.md).
|
|
16
|
+
|
|
17
|
+
Source lives in the private `phnx-labs/computer-cli` repository. npm ships a small Node launcher and an optional compiled package for your platform: macOS arm64/x64, Linux arm64/x64, or Windows x64. Source files and source maps are excluded. Minification, bytecode and compilation make casual inspection harder; they do not prevent reverse engineering. Keep credentials out of binaries.
|
|
18
|
+
|
|
19
|
+
Native helpers retain their separate, immutable `computer-mac/v*` and `computer-win/v*` release channels. An ordinary CLI release does not rebuild them.
|
|
20
|
+
|
|
21
|
+
Development:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
bash scripts/install.sh
|
|
25
|
+
bash scripts/test.sh
|
|
26
|
+
bash scripts/build.sh
|
|
27
|
+
# Run dist/<platform>-<arch>/computer directly for development.
|
|
28
|
+
bash scripts/release.sh # print the release plan
|
|
29
|
+
bash scripts/release.sh --confirm # publish the reviewed commit
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run publishing through an existing npm credential bundle, for example `secrets exec npmjs.com -- bash scripts/release.sh --confirm`. Release requires a clean linked worktree at the reviewed remote main commit. It verifies packed file lists, checks immutable package integrity on retries, and checks a registry installation. Live desktop verification remains part of delivery.
|
|
33
|
+
|
package/bin/computer.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const { spawn } = require('node:child_process');
|
|
4
|
+
const name = '@phnx-labs/computer-cli-' + process.platform + '-' + process.arch;
|
|
5
|
+
let executable;
|
|
6
|
+
try {
|
|
7
|
+
executable = require.resolve(name + '/' + (process.platform === 'win32' ? 'computer.exe' : 'computer'));
|
|
8
|
+
} catch {
|
|
9
|
+
console.error('computer: missing ' + name + '. Reinstall @phnx-labs/computer-cli with optional dependencies enabled.');
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
const stdio = ['inherit', 'inherit', 'inherit'];
|
|
13
|
+
for (const key of ['COMPUTER_CONTEXT_FD', 'COMPUTER_EVENTS_FD']) {
|
|
14
|
+
if (process.env[key] === undefined) continue;
|
|
15
|
+
const fd = Number(process.env[key]);
|
|
16
|
+
if (!Number.isInteger(fd) || fd < 3 || fd > 16) {
|
|
17
|
+
console.error('computer: invalid ' + key);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
while (stdio.length <= fd) stdio.push('ignore');
|
|
21
|
+
stdio[fd] = fd;
|
|
22
|
+
}
|
|
23
|
+
const child = spawn(executable, process.argv.slice(2), { stdio, windowsHide: true });
|
|
24
|
+
child.on('error', error => { console.error('computer: ' + error.message); process.exitCode = 1; });
|
|
25
|
+
for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
|
|
26
|
+
process.on(signal, () => child.kill(signal));
|
|
27
|
+
}
|
|
28
|
+
child.on('exit', (code, signal) => {
|
|
29
|
+
if (signal && process.platform !== 'win32') {
|
|
30
|
+
process.removeAllListeners(signal);
|
|
31
|
+
process.kill(process.pid, signal);
|
|
32
|
+
} else {
|
|
33
|
+
process.exitCode = code === null ? 1 : code;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@phnx-labs/computer-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Native desktop automation over Accessibility, UI Automation and VNC",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"computer": "bin/computer.cjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/computer.cjs",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"CHANGELOG.md"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=22.5.0"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/phnx-labs/computer-cli.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "bash scripts/build.sh",
|
|
25
|
+
"test": "bash scripts/test.sh"
|
|
26
|
+
},
|
|
27
|
+
"optionalDependencies": {
|
|
28
|
+
"@phnx-labs/computer-cli-darwin-arm64": "0.1.0",
|
|
29
|
+
"@phnx-labs/computer-cli-darwin-x64": "0.1.0",
|
|
30
|
+
"@phnx-labs/computer-cli-linux-arm64": "0.1.0",
|
|
31
|
+
"@phnx-labs/computer-cli-linux-x64": "0.1.0",
|
|
32
|
+
"@phnx-labs/computer-cli-win32-x64": "0.1.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@inquirer/prompts": "8.5.2",
|
|
36
|
+
"@types/node": "26.1.0",
|
|
37
|
+
"@types/bun": "1.3.10",
|
|
38
|
+
"chalk": "5.6.2",
|
|
39
|
+
"commander": "15.0.0",
|
|
40
|
+
"typescript": "6.0.3",
|
|
41
|
+
"yaml": "2.9.0",
|
|
42
|
+
"bun": "1.4.1"
|
|
43
|
+
}
|
|
44
|
+
}
|