@dhruv2mars/offdex 0.0.5 → 0.0.6

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 CHANGED
@@ -25,7 +25,9 @@ Supported targets:
25
25
  Common usage:
26
26
 
27
27
  ```bash
28
- offdex bridge --host 0.0.0.0 --port 42420
29
- offdex bridge --control-plane-url https://control.offdex.app
28
+ offdex start --host 0.0.0.0 --port 42420
29
+ offdex start --control-plane-url https://control.offdex.app
30
+ offdex status
31
+ offdex stop
30
32
  offdex --help
31
33
  ```
package/bin/offdex.js CHANGED
@@ -13,11 +13,33 @@ import {
13
13
  } from "./offdex-lib.js";
14
14
 
15
15
  const args = process.argv.slice(2);
16
+ const ONBOARDING_TEXT = `Offdex
17
+ Codex from your phone.
18
+
19
+ Get started:
20
+ 1. Run offdex start
21
+ 2. Open Offdex on your phone
22
+ 3. Scan the QR from this terminal
23
+
24
+ Useful commands:
25
+ offdex start Start the Mac bridge
26
+ offdex status Check if Offdex is running
27
+ offdex stop Stop the local bridge
28
+ offdex --help Show all options
29
+ `;
16
30
  const HELP_TEXT = `Offdex CLI
17
31
 
18
32
  Usage:
19
- offdex bridge [options]
20
- offdex help
33
+ offdex
34
+ offdex start [options]
35
+ offdex status [options]
36
+ offdex stop [options]
37
+ offdex --help
38
+
39
+ Commands:
40
+ start Start the Mac bridge and show the pairing QR
41
+ status Check the local bridge
42
+ stop Stop the local bridge started by Offdex
21
43
 
22
44
  Options:
23
45
  --host <host> Bridge host. Default: 0.0.0.0
@@ -37,9 +59,14 @@ const packageVersion = readPackageVersion();
37
59
  const currentInstalledVersion = installedVersion(process.env);
38
60
  const workspaceBridgeCli = resolveWorkspaceBridgeCli();
39
61
 
62
+ if (!existsSync(installedBin) && args.length === 0) {
63
+ console.log(ONBOARDING_TEXT);
64
+ process.exit(0);
65
+ }
66
+
40
67
  if (
41
68
  !existsSync(installedBin) &&
42
- (args.length === 0 || args[0] === "help" || args[0] === "--help" || args[0] === "-h")
69
+ (args[0] === "help" || args[0] === "--help" || args[0] === "-h")
43
70
  ) {
44
71
  console.log(HELP_TEXT);
45
72
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhruv2mars/offdex",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Codex mobile bridge CLI for Offdex",
5
5
  "type": "module",
6
6
  "bin": {