cawide 0.4.6 → 0.5.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/README.md +35 -48
- package/bin/cawide.js +15 -29
- package/package.json +16 -20
package/README.md
CHANGED
|
@@ -1,63 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# cawide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Run your terminal and AI coding agents on your computer, drive them from your iPhone.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
# Run directly via npx
|
|
11
|
-
npx cawide start
|
|
12
|
-
|
|
13
|
-
# Or install globally
|
|
7
|
+
```bash
|
|
14
8
|
npm install -g cawide
|
|
15
|
-
cawide start
|
|
16
9
|
```
|
|
17
10
|
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
| Command | Description |
|
|
21
|
-
|---------|-------------|
|
|
22
|
-
| `cawide start` | Start the daemon in your project directory and display the pairing QR code. |
|
|
23
|
-
| `cawide qr` | Show the pairing QR code for the active workspace. |
|
|
24
|
-
| `cawide status` | Inspect connected sessions, active terminals, and relay status. |
|
|
25
|
-
| `cawide setup [agent]` | Configure hooks and skills for AI agents (Claude, Codex, OpenCode). |
|
|
26
|
-
| `cawide logs` | View daemon logs. |
|
|
27
|
-
| `cawide stop` | Stop the background daemon. |
|
|
11
|
+
## Quick Start
|
|
28
12
|
|
|
29
|
-
|
|
13
|
+
Start Cawide for your project workspace:
|
|
30
14
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **Ed25519** cryptographic challenge-response authentication.
|
|
35
|
-
- **End-to-end encrypted** transport — your code never passes through third-party servers unencrypted.
|
|
36
|
-
|
|
37
|
-
## Supported platforms
|
|
15
|
+
```bash
|
|
16
|
+
cawide serve --workdir ~/your-project
|
|
17
|
+
```
|
|
38
18
|
|
|
39
|
-
|
|
40
|
-
of this package (the same approach used by esbuild and `@biomejs/biome`) — no
|
|
41
|
-
extra download step at runtime.
|
|
19
|
+
Then scan the QR code with the Cawide iOS app to connect.
|
|
42
20
|
|
|
43
|
-
|
|
44
|
-
|----------|---------|
|
|
45
|
-
| macOS (Apple Silicon) | [`cawide-darwin-arm64`](https://www.npmjs.com/package/cawide-darwin-arm64) |
|
|
46
|
-
| macOS (Intel) | [`cawide-darwin-x64`](https://www.npmjs.com/package/cawide-darwin-x64) |
|
|
47
|
-
| Linux (x86_64) | [`cawide-linux-x64`](https://www.npmjs.com/package/cawide-linux-x64) |
|
|
48
|
-
| Linux (ARM64) | [`cawide-linux-arm64`](https://www.npmjs.com/package/cawide-linux-arm64) |
|
|
49
|
-
| Windows (x86_64) | [`cawide-win32-x64`](https://www.npmjs.com/package/cawide-win32-x64) |
|
|
50
|
-
| Windows (ARM64) | [`cawide-win32-arm64`](https://www.npmjs.com/package/cawide-win32-arm64) |
|
|
21
|
+
## Commands
|
|
51
22
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
### Pairing
|
|
24
|
+
Print a pairing QR code and link for an already running daemon:
|
|
25
|
+
```bash
|
|
26
|
+
cawide pair
|
|
27
|
+
```
|
|
55
28
|
|
|
56
|
-
|
|
29
|
+
### Agent Integration Setup
|
|
30
|
+
Install hooks or configurations for your favorite coding agents:
|
|
31
|
+
```bash
|
|
32
|
+
cawide setup claude|codex|omp|opencode
|
|
33
|
+
```
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
35
|
+
### Connected Devices
|
|
36
|
+
List authorized mobile devices:
|
|
37
|
+
```bash
|
|
38
|
+
cawide devices
|
|
39
|
+
```
|
|
60
40
|
|
|
61
|
-
|
|
41
|
+
Revoke access for a specific device:
|
|
42
|
+
```bash
|
|
43
|
+
cawide revoke <device>
|
|
44
|
+
```
|
|
62
45
|
|
|
63
|
-
|
|
46
|
+
### Stop Daemon
|
|
47
|
+
Stop the running Cawide daemon:
|
|
48
|
+
```bash
|
|
49
|
+
cawide stop
|
|
50
|
+
```
|
package/bin/cawide.js
CHANGED
|
@@ -1,49 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const fs = require("node:fs");
|
|
4
|
+
const os = require("node:os");
|
|
4
5
|
const path = require("node:path");
|
|
5
6
|
const childProcess = require("node:child_process");
|
|
6
7
|
|
|
7
|
-
// Maps `${process.platform}-${process.arch}` to the platform-specific npm
|
|
8
|
-
// package that ships the prebuilt binary for it (see
|
|
9
|
-
// scripts/build-platforms.js and the six `cawide-<platform>`
|
|
10
|
-
// optionalDependencies in package.json).
|
|
11
8
|
const PLATFORM_PACKAGES = {
|
|
12
9
|
"darwin-arm64": "cawide-darwin-arm64",
|
|
13
10
|
"darwin-x64": "cawide-darwin-x64",
|
|
14
11
|
"linux-x64": "cawide-linux-x64",
|
|
15
12
|
"linux-arm64": "cawide-linux-arm64",
|
|
16
|
-
"win32-x64": "cawide-win32-x64",
|
|
17
|
-
"win32-arm64": "cawide-win32-arm64",
|
|
18
13
|
};
|
|
14
|
+
|
|
19
15
|
const SIGNAL_EXIT_CODES = { SIGINT: 130, SIGTERM: 143 };
|
|
20
16
|
|
|
21
17
|
function executableName() {
|
|
22
|
-
return
|
|
18
|
+
return "cawide";
|
|
23
19
|
}
|
|
24
20
|
|
|
25
21
|
function platformKey() {
|
|
26
22
|
return `${process.platform}-${process.arch}`;
|
|
27
23
|
}
|
|
28
24
|
|
|
29
|
-
function localBinary() {
|
|
30
|
-
const repositoryRoot = path.resolve(__dirname, "../../..");
|
|
31
|
-
if (!fs.existsSync(path.join(repositoryRoot, "Cargo.toml"))) return null;
|
|
32
|
-
|
|
33
|
-
for (const profile of ["release", "debug"]) {
|
|
34
|
-
const candidate = path.join(repositoryRoot, "target", profile, executableName());
|
|
35
|
-
if (fs.existsSync(candidate)) return candidate;
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
25
|
function platformPackageName() {
|
|
41
26
|
const packageName = PLATFORM_PACKAGES[platformKey()];
|
|
42
27
|
if (!packageName) {
|
|
43
28
|
throw new Error(
|
|
44
|
-
|
|
45
|
-
PLATFORM_PACKAGES
|
|
46
|
-
).join(", ")}.`
|
|
29
|
+
`${platformKey()} is not supported yet (supported: macOS and Linux on x64/arm64).`
|
|
47
30
|
);
|
|
48
31
|
}
|
|
49
32
|
return packageName;
|
|
@@ -58,10 +41,7 @@ function resolvePlatformBinary() {
|
|
|
58
41
|
} catch (error) {
|
|
59
42
|
if (error.code === "MODULE_NOT_FOUND") {
|
|
60
43
|
throw new Error(
|
|
61
|
-
`Cawide could not find the "${packageName}" platform package for ${platformKey()}.\
|
|
62
|
-
"This usually happens when the package was installed with --no-optional/--omit=optional, " +
|
|
63
|
-
"npm skipped optional dependencies, or the platform is unsupported.\n" +
|
|
64
|
-
"Try reinstalling without skipping optional dependencies: npm install -g cawide"
|
|
44
|
+
`Cawide could not find the "${packageName}" platform package for ${platformKey()}.\nThis usually happens when the package was installed with --no-optional/--omit=optional, npm skipped optional dependencies, or the platform is unsupported.\nTry reinstalling without skipping optional dependencies: npm install -g cawide`
|
|
65
45
|
);
|
|
66
46
|
}
|
|
67
47
|
throw error;
|
|
@@ -70,8 +50,7 @@ function resolvePlatformBinary() {
|
|
|
70
50
|
const binaryPath = path.join(path.dirname(packageJsonPath), "bin", executableName());
|
|
71
51
|
if (!fs.existsSync(binaryPath)) {
|
|
72
52
|
throw new Error(
|
|
73
|
-
`The "${packageName}" platform package is installed but is missing its binary at ${binaryPath}. `
|
|
74
|
-
"Try reinstalling: npm install -g cawide"
|
|
53
|
+
`The "${packageName}" platform package is installed but is missing its binary at ${binaryPath}. Try reinstalling: npm install -g cawide`
|
|
75
54
|
);
|
|
76
55
|
}
|
|
77
56
|
return binaryPath;
|
|
@@ -80,12 +59,19 @@ function resolvePlatformBinary() {
|
|
|
80
59
|
function run(binaryPath) {
|
|
81
60
|
const result = childProcess.spawnSync(binaryPath, process.argv.slice(2), { stdio: "inherit" });
|
|
82
61
|
if (result.error) throw result.error;
|
|
83
|
-
if (result.signal
|
|
62
|
+
if (result.signal) {
|
|
63
|
+
const signalCode =
|
|
64
|
+
SIGNAL_EXIT_CODES[result.signal] ||
|
|
65
|
+
(os.constants?.signals?.[result.signal]
|
|
66
|
+
? 128 + os.constants.signals[result.signal]
|
|
67
|
+
: 1);
|
|
68
|
+
process.exit(signalCode);
|
|
69
|
+
}
|
|
84
70
|
process.exit(result.status ?? 0);
|
|
85
71
|
}
|
|
86
72
|
|
|
87
73
|
function main() {
|
|
88
|
-
run(
|
|
74
|
+
run(resolvePlatformBinary());
|
|
89
75
|
}
|
|
90
76
|
|
|
91
77
|
try {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cawide",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"homepage": "https://cawide
|
|
6
|
-
"
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Run your terminal and AI coding agents on your computer, drive them from your iPhone.",
|
|
5
|
+
"homepage": "https://github.com/Hermillon/cawide",
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
8
8
|
"cawide": "bin/cawide.js"
|
|
9
9
|
},
|
|
@@ -12,24 +12,20 @@
|
|
|
12
12
|
"README.md"
|
|
13
13
|
],
|
|
14
14
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
15
|
+
"node": ">=18"
|
|
16
16
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
17
|
+
"os": [
|
|
18
|
+
"darwin",
|
|
19
|
+
"linux"
|
|
20
|
+
],
|
|
21
|
+
"cpu": [
|
|
22
|
+
"x64",
|
|
23
|
+
"arm64"
|
|
24
24
|
],
|
|
25
|
-
"author": "Cawide Team",
|
|
26
|
-
"license": "MIT",
|
|
27
25
|
"optionalDependencies": {
|
|
28
|
-
"cawide-darwin-arm64": "0.
|
|
29
|
-
"cawide-darwin-x64": "0.
|
|
30
|
-
"cawide-linux-x64": "0.
|
|
31
|
-
"cawide-linux-arm64": "0.
|
|
32
|
-
"cawide-win32-x64": "0.4.6",
|
|
33
|
-
"cawide-win32-arm64": "0.4.6"
|
|
26
|
+
"cawide-darwin-arm64": "0.5.0",
|
|
27
|
+
"cawide-darwin-x64": "0.5.0",
|
|
28
|
+
"cawide-linux-x64": "0.5.0",
|
|
29
|
+
"cawide-linux-arm64": "0.5.0"
|
|
34
30
|
}
|
|
35
31
|
}
|