@dhruv2mars/offdex 0.0.5 → 0.0.7
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 +6 -3
- package/bin/offdex.js +51 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,10 @@ Supported targets:
|
|
|
25
25
|
Common usage:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
offdex
|
|
29
|
-
offdex
|
|
30
|
-
offdex --
|
|
28
|
+
offdex
|
|
29
|
+
offdex help
|
|
30
|
+
offdex start --host 0.0.0.0 --port 42420
|
|
31
|
+
offdex start --control-plane-url https://control.offdex.app
|
|
32
|
+
offdex status
|
|
33
|
+
offdex stop
|
|
31
34
|
```
|
package/bin/offdex.js
CHANGED
|
@@ -13,33 +13,74 @@ import {
|
|
|
13
13
|
} from "./offdex-lib.js";
|
|
14
14
|
|
|
15
15
|
const args = process.argv.slice(2);
|
|
16
|
-
const
|
|
16
|
+
const ONBOARDING_TEXT = `Offdex
|
|
17
|
+
Codex mobile app.
|
|
18
|
+
|
|
19
|
+
Use Codex from your phone while the real Codex session keeps running on this Mac.
|
|
20
|
+
|
|
21
|
+
Get started:
|
|
22
|
+
1. Run: offdex start
|
|
23
|
+
2. Open Offdex on your phone.
|
|
24
|
+
3. Scan the QR from this terminal.
|
|
25
|
+
4. Send a prompt and watch Codex reply live.
|
|
26
|
+
|
|
27
|
+
Core commands:
|
|
28
|
+
offdex help Commands, docs, GitHub, feedback.
|
|
29
|
+
offdex start Start the bridge and show the QR.
|
|
30
|
+
offdex status Show bridge, Codex, and client status.
|
|
31
|
+
offdex stop Stop the local bridge.
|
|
32
|
+
|
|
33
|
+
Docs: https://offdexapp.vercel.app
|
|
34
|
+
`;
|
|
35
|
+
const HELP_TEXT = `Offdex help
|
|
36
|
+
Codex mobile app.
|
|
37
|
+
|
|
38
|
+
Commands:
|
|
39
|
+
offdex
|
|
40
|
+
Open the Offdex home screen.
|
|
17
41
|
|
|
18
|
-
Usage:
|
|
19
|
-
offdex bridge [options]
|
|
20
42
|
offdex help
|
|
43
|
+
Show commands, docs, and support links.
|
|
44
|
+
|
|
45
|
+
offdex start [options]
|
|
46
|
+
Start the bridge and show the pairing QR.
|
|
21
47
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
48
|
+
offdex status [options]
|
|
49
|
+
Show bridge, Codex, client, and remote status.
|
|
50
|
+
|
|
51
|
+
offdex stop [options]
|
|
52
|
+
Stop the local bridge started by Offdex.
|
|
53
|
+
|
|
54
|
+
Start options:
|
|
55
|
+
--host <host> Default: 0.0.0.0
|
|
56
|
+
--port <port> Default: 42420
|
|
57
|
+
--mode <codex|demo> Default: codex
|
|
58
|
+
--control-plane-url <url> Enable managed remote pairing.
|
|
28
59
|
|
|
29
60
|
Environment fallbacks:
|
|
30
61
|
OFFDEX_BRIDGE_HOST
|
|
31
62
|
OFFDEX_BRIDGE_PORT
|
|
32
63
|
OFFDEX_BRIDGE_MODE
|
|
33
64
|
OFFDEX_CONTROL_PLANE_URL
|
|
65
|
+
|
|
66
|
+
Links:
|
|
67
|
+
Docs: https://offdexapp.vercel.app
|
|
68
|
+
GitHub: https://github.com/Dhruv2mars/offdex
|
|
69
|
+
Feedback: https://github.com/Dhruv2mars/offdex/issues
|
|
34
70
|
`;
|
|
35
71
|
const installedBin = resolveInstalledBin(process.env, process.platform);
|
|
36
72
|
const packageVersion = readPackageVersion();
|
|
37
73
|
const currentInstalledVersion = installedVersion(process.env);
|
|
38
74
|
const workspaceBridgeCli = resolveWorkspaceBridgeCli();
|
|
39
75
|
|
|
76
|
+
if (!existsSync(installedBin) && args.length === 0) {
|
|
77
|
+
console.log(ONBOARDING_TEXT);
|
|
78
|
+
process.exit(0);
|
|
79
|
+
}
|
|
80
|
+
|
|
40
81
|
if (
|
|
41
82
|
!existsSync(installedBin) &&
|
|
42
|
-
(args
|
|
83
|
+
(args[0] === "help" || args[0] === "--help" || args[0] === "-h")
|
|
43
84
|
) {
|
|
44
85
|
console.log(HELP_TEXT);
|
|
45
86
|
process.exit(0);
|