cawide 0.4.7 → 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 +33 -12
- package/bin/cawide.js +5 -31
- package/package.json +21 -18
package/README.md
CHANGED
|
@@ -1,29 +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
|
-
|
|
6
|
-
|
|
7
|
-
## Install
|
|
5
|
+
## Installation
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
8
|
npm install -g cawide
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
Start Cawide for your project workspace:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
cawide serve --workdir ~/your-project
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Then scan the QR code with the Cawide iOS app to connect.
|
|
20
20
|
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
### Pairing
|
|
24
|
+
Print a pairing QR code and link for an already running daemon:
|
|
21
25
|
```bash
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
cawide pair
|
|
27
|
+
```
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
### Agent Integration Setup
|
|
30
|
+
Install hooks or configurations for your favorite coding agents:
|
|
31
|
+
```bash
|
|
32
|
+
cawide setup claude|codex|omp|opencode
|
|
27
33
|
```
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
### Connected Devices
|
|
36
|
+
List authorized mobile devices:
|
|
37
|
+
```bash
|
|
38
|
+
cawide devices
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Revoke access for a specific device:
|
|
42
|
+
```bash
|
|
43
|
+
cawide revoke <device>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Stop Daemon
|
|
47
|
+
Stop the running Cawide daemon:
|
|
48
|
+
```bash
|
|
49
|
+
cawide stop
|
|
50
|
+
```
|
package/bin/cawide.js
CHANGED
|
@@ -5,54 +5,28 @@ const os = require("node:os");
|
|
|
5
5
|
const path = require("node:path");
|
|
6
6
|
const childProcess = require("node:child_process");
|
|
7
7
|
|
|
8
|
-
// Maps `${process.platform}-${process.arch}` to the platform-specific npm
|
|
9
|
-
// package that ships the prebuilt binary for it (see
|
|
10
|
-
// scripts/package-npm.js and the six `cawide-<platform>`
|
|
11
|
-
// optionalDependencies in package.json).
|
|
12
8
|
const PLATFORM_PACKAGES = {
|
|
13
9
|
"darwin-arm64": "cawide-darwin-arm64",
|
|
14
10
|
"darwin-x64": "cawide-darwin-x64",
|
|
15
11
|
"linux-x64": "cawide-linux-x64",
|
|
16
12
|
"linux-arm64": "cawide-linux-arm64",
|
|
17
|
-
"win32-x64": "cawide-win32-x64",
|
|
18
|
-
"win32-arm64": "cawide-win32-x64",
|
|
19
13
|
};
|
|
14
|
+
|
|
20
15
|
const SIGNAL_EXIT_CODES = { SIGINT: 130, SIGTERM: 143 };
|
|
21
16
|
|
|
22
17
|
function executableName() {
|
|
23
|
-
return
|
|
18
|
+
return "cawide";
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
function platformKey() {
|
|
27
22
|
return `${process.platform}-${process.arch}`;
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
function localBinary() {
|
|
31
|
-
const repositoryRoot = path.resolve(__dirname, "../../..");
|
|
32
|
-
const cargoTomlPath = path.join(repositoryRoot, "Cargo.toml");
|
|
33
|
-
if (!fs.existsSync(cargoTomlPath)) return null;
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
const cargoToml = fs.readFileSync(cargoTomlPath, "utf8");
|
|
37
|
-
if (!cargoToml.includes("cawide")) return null;
|
|
38
|
-
} catch {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
for (const profile of ["release", "debug"]) {
|
|
43
|
-
const candidate = path.join(repositoryRoot, "target", profile, executableName());
|
|
44
|
-
if (fs.existsSync(candidate)) return candidate;
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
25
|
function platformPackageName() {
|
|
50
26
|
const packageName = PLATFORM_PACKAGES[platformKey()];
|
|
51
27
|
if (!packageName) {
|
|
52
28
|
throw new Error(
|
|
53
|
-
|
|
54
|
-
PLATFORM_PACKAGES
|
|
55
|
-
).join(", ")}.`
|
|
29
|
+
`${platformKey()} is not supported yet (supported: macOS and Linux on x64/arm64).`
|
|
56
30
|
);
|
|
57
31
|
}
|
|
58
32
|
return packageName;
|
|
@@ -88,7 +62,7 @@ function run(binaryPath) {
|
|
|
88
62
|
if (result.signal) {
|
|
89
63
|
const signalCode =
|
|
90
64
|
SIGNAL_EXIT_CODES[result.signal] ||
|
|
91
|
-
(
|
|
65
|
+
(os.constants?.signals?.[result.signal]
|
|
92
66
|
? 128 + os.constants.signals[result.signal]
|
|
93
67
|
: 1);
|
|
94
68
|
process.exit(signalCode);
|
|
@@ -97,7 +71,7 @@ function run(binaryPath) {
|
|
|
97
71
|
}
|
|
98
72
|
|
|
99
73
|
function main() {
|
|
100
|
-
run(
|
|
74
|
+
run(resolvePlatformBinary());
|
|
101
75
|
}
|
|
102
76
|
|
|
103
77
|
try {
|
package/package.json
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cawide",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"homepage": "https://
|
|
6
|
-
"
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/Hermillon/cawide.git"
|
|
10
|
-
},
|
|
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",
|
|
11
7
|
"bin": {
|
|
12
8
|
"cawide": "bin/cawide.js"
|
|
13
9
|
},
|
|
14
|
-
"files": [
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
15
14
|
"engines": {
|
|
16
|
-
"node": ">=
|
|
15
|
+
"node": ">=18"
|
|
17
16
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
"os": [
|
|
18
|
+
"darwin",
|
|
19
|
+
"linux"
|
|
20
|
+
],
|
|
21
|
+
"cpu": [
|
|
22
|
+
"x64",
|
|
23
|
+
"arm64"
|
|
24
|
+
],
|
|
21
25
|
"optionalDependencies": {
|
|
22
|
-
"cawide-darwin-arm64": "0.
|
|
23
|
-
"cawide-darwin-x64": "0.
|
|
24
|
-
"cawide-linux-x64": "0.
|
|
25
|
-
"cawide-linux-arm64": "0.
|
|
26
|
-
"cawide-win32-x64": "0.4.7"
|
|
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"
|
|
27
30
|
}
|
|
28
31
|
}
|