@lobehub/cli 0.0.74 → 0.0.75
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 +48 -0
- package/dist/acceptance-report.html +365 -308
- package/dist/index.js +12278 -13943
- package/man/man1/lh.1 +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
LobeHub command-line interface.
|
|
4
4
|
|
|
5
|
+
## Update a connected device
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
lh update # Install the latest CLI without restarting a connector
|
|
9
|
+
lh connect status # Connection, running version, and any required action
|
|
10
|
+
lh connect status --verbose # Service metadata and CLI installation paths
|
|
11
|
+
|
|
12
|
+
# Wait for active tasks to finish, then restart the detected connector:
|
|
13
|
+
lh connect restart
|
|
14
|
+
lh connect status # Verify the new running version and connection
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Installing an update and activating it are separate steps. `lh update` keeps the
|
|
18
|
+
running connector in place; it reports the installed and running versions separately.
|
|
19
|
+
Restarting disconnects the device and closes its remote terminals. A terminal
|
|
20
|
+
provided by LobeHub may close or print `Terminated` before the restart request
|
|
21
|
+
returns. Reconnect before checking status; “Restart requested” is not confirmation
|
|
22
|
+
that the device is already connected.
|
|
23
|
+
|
|
24
|
+
`lh connect restart` detects a CLI daemon or a user/system systemd service. System
|
|
25
|
+
services use `sudo` unless already running as root. When multiple connectors are
|
|
26
|
+
running, select one with `--manager daemon`, `--manager user`, or `--manager system`.
|
|
27
|
+
Service restarts preserve the unit's configuration; daemon connection flags such
|
|
28
|
+
as `--token` cannot override it. `lh connect service restart` remains a user-service
|
|
29
|
+
alias. With no managed connector and no inspection failures, `lh connect restart`
|
|
30
|
+
retains its existing behavior of starting a daemon. Daemon restarts wait for the
|
|
31
|
+
previous process to exit before starting its replacement, including when upgrading
|
|
32
|
+
from an older CLI. If shutdown times out, no replacement is started.
|
|
33
|
+
|
|
34
|
+
A daemon cannot be restarted from a terminal or shell it owns: its shutdown would
|
|
35
|
+
kill the waiting restart command. This is rejected before stopping the connection;
|
|
36
|
+
run `lh connect restart` from a local terminal or an independent SSH session instead.
|
|
37
|
+
If process ancestry cannot be verified, the restart is also rejected without
|
|
38
|
+
stopping the connector. Systemd service restarts still use the service manager.
|
|
39
|
+
|
|
40
|
+
If an older restart lost `daemon.pid`, `lh connect status` can recover it from the
|
|
41
|
+
status record only after verifying that the process is alive and is a daemon, not
|
|
42
|
+
a foreground connection or systemd service. This recovery does not restart the
|
|
43
|
+
connection. Cleanup checks PID ownership; normal restarts also wait for the old
|
|
44
|
+
process to exit before creating new records.
|
|
45
|
+
|
|
46
|
+
If the version still differs after a restart, the status report shows the command's
|
|
47
|
+
CLI entry path and the connector's entry path when available. Different paths mean
|
|
48
|
+
you should update the connector's installation or change its service configuration.
|
|
49
|
+
Diagnostics never dump the service's command line or environment. Older connectors
|
|
50
|
+
on Linux use a conservative `/proc` lookup; an inaccessible or unsupported entry
|
|
51
|
+
is reported as unknown instead of guessed.
|
|
52
|
+
|
|
5
53
|
## Publish local artifacts
|
|
6
54
|
|
|
7
55
|
```bash
|