laplus 0.1.1-rc.13 → 0.1.1-rc.14

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.
Files changed (3) hide show
  1. package/README.md +22 -3
  2. package/dist/bin.mjs +16 -3
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -46,9 +46,28 @@ npx laplus@latest service status
46
46
  npx laplus@latest service uninstall
47
47
  ```
48
48
 
49
- The flags you pass to `service install` are the ones the service runs with. The
50
- pairing URL then goes to `~/.laplus/logs/service.log` instead of your terminal,
51
- so `tail -f` that after a restart.
49
+ The flags you pass to `service install` are the ones the service runs with.
50
+
51
+ ## Pairing another device
52
+
53
+ A server started at boot has no terminal to print a pairing URL to, and any
54
+ server has only one startup credential. Mint a code whenever you need one:
55
+
56
+ ```sh
57
+ npx laplus@latest auth pairing create
58
+ npx laplus@latest auth pairing create --ttl 1h --label "ipad"
59
+ npx laplus@latest auth pairing list
60
+ npx laplus@latest auth pairing revoke <id>
61
+ ```
62
+
63
+ `create` prints the code, a URL, and **a QR code** — point a phone's camera at
64
+ it and there is nothing to type. Codes are single-use and last five minutes
65
+ unless `--ttl` says otherwise. Add `--base-url` when the address a device
66
+ reaches you at is a tunnel or a tailnet name this machine cannot discover, and
67
+ `--json` for a script.
68
+
69
+ This works against a server that is already running, and never has to find it:
70
+ a pairing code is a row in the database rather than server state.
52
71
 
53
72
  `--network` turns the listener off loopback **for one run** and does not change
54
73
  what the desktop app does next time it starts. Anything it can reach can drive
package/dist/bin.mjs CHANGED
@@ -4,7 +4,7 @@ import * as NodeChildProcess from "node:child_process";
4
4
  import * as NodeFS from "node:fs";
5
5
  import * as NodeURL from "node:url";
6
6
  //#region package.json
7
- var version = "0.1.1-rc.13";
7
+ var version = "0.1.1-rc.14";
8
8
  //#endregion
9
9
  //#region src/invocation.ts
10
10
  /**
@@ -21,14 +21,27 @@ const HELP = `laplus — the laplus server, and the UI it serves.
21
21
  npx laplus listen on 127.0.0.1:4773 and print a URL to open
22
22
  npx laplus --network also listen off loopback, for a phone on this network
23
23
 
24
+ Pairing another device:
25
+
26
+ npx laplus auth pairing create a code, a URL, and a QR code to scan
27
+ npx laplus auth pairing list what is outstanding (never the secrets)
28
+ npx laplus auth pairing revoke <id>
29
+
30
+ --ttl 1h how long it lives (90s, 5m, 2h, 30d). Default 5 minutes
31
+ --label "ipad" what it is for, to recognise in the list
32
+ --base-url URL for a tunnel or tailnet this machine cannot see itself
33
+ --json for a script
34
+
35
+ Works against a server that is already running, including one started by the
36
+ service below — a pairing code is a database row, not server state.
37
+
24
38
  Keeping it running (Linux with systemd):
25
39
 
26
40
  npx laplus service install [flags] start at boot, and survive logging out
27
41
  npx laplus service status whether one is installed, and up to date
28
42
  npx laplus service uninstall stop it and take it off startup
29
43
 
30
- The flags given to \`service install\` are the ones the service runs with. The
31
- pairing URL then goes to ~/.laplus/logs/service.log rather than to a terminal.
44
+ The flags given to \`service install\` are the ones the service runs with.
32
45
 
33
46
  Flags, all of them the server's own:
34
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laplus",
3
- "version": "0.1.1-rc.13",
3
+ "version": "0.1.1-rc.14",
4
4
  "description": "Run the laplus server and its UI without building either.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,10 +31,10 @@
31
31
  "node": ">=20"
32
32
  },
33
33
  "optionalDependencies": {
34
- "@laplus/server-darwin-arm64": "0.1.1-rc.13",
35
- "@laplus/server-darwin-x64": "0.1.1-rc.13",
36
- "@laplus/server-linux-arm64": "0.1.1-rc.13",
37
- "@laplus/server-linux-x64": "0.1.1-rc.13",
38
- "@laplus/server-win32-x64": "0.1.1-rc.13"
34
+ "@laplus/server-darwin-arm64": "0.1.1-rc.14",
35
+ "@laplus/server-darwin-x64": "0.1.1-rc.14",
36
+ "@laplus/server-linux-arm64": "0.1.1-rc.14",
37
+ "@laplus/server-linux-x64": "0.1.1-rc.14",
38
+ "@laplus/server-win32-x64": "0.1.1-rc.14"
39
39
  }
40
40
  }