@lobehub/cli 0.0.69 → 0.0.71

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
@@ -2,6 +2,50 @@
2
2
 
3
3
  LobeHub command-line interface.
4
4
 
5
+ ## Publish local artifacts
6
+
7
+ ```bash
8
+ # Publish ordinary HTML and its referenced local resources
9
+ lh artifact publish ./page.html --root . --json
10
+
11
+ # Read the Canvas component and generation rules
12
+ lh artifact guide canvas
13
+
14
+ # Publish a self-contained Canvas HTML file
15
+ lh artifact publish ./report.html --type canvas --json
16
+
17
+ # The binding remembers the type; subsequent publishes update the same artifact
18
+ lh artifact publish ./report.html --json
19
+
20
+ # Create a separate Canvas and bind future publishes to it
21
+ lh artifact publish ./report.html --new --json
22
+ ```
23
+
24
+ Bindings and pending operations live in the project's `.lobehub/artifacts.json`.
25
+ Retry the same command with unchanged input after a failed Canvas save or publish;
26
+ the CLI resumes that operation without creating another Canvas or saved version.
27
+ Restore the original input before retrying if you edited it during recovery.
28
+ An explicit validation or version-conflict rejection releases the pending save,
29
+ so you can correct the file or inspect the latest version before trying again.
30
+ If publication explicitly rejects a slug, correct `--slug` and retry with the same
31
+ content and target; the CLI reuses the saved Canvas and version.
32
+ Canvas bindings are scoped to the authenticated account, server and workspace.
33
+
34
+ Canvas input is a single HTML file with inline styles, scripts and data, subject
35
+ to the Canvas guide's validation and size limits. Publication saves a version in
36
+ LobeHub and returns a public URL; it requires a server with Canvas publishing and
37
+ a compatible runtime. JSON errors retain any saved Canvas ID and version.
38
+
39
+ `--slug <name>` requests the readable prefix for a new deployment. Market adds an
40
+ eight-character suffix; both HTML and Canvas use the same rule. Existing deployments
41
+ retain their address when updated, including older records without a stored label.
42
+ JSON `publicUrl` is the direct hosting URL; `shareUrl` is the LobeHub product share
43
+ page, and `subdomainLabel` is the actual assigned label when the server returns it.
44
+
45
+ `--deployment <id>` overrides the deployment for this run without changing the
46
+ canonical binding. `--new` and `--deployment` cannot be combined. Changing an
47
+ existing artifact's content type requires `--new`.
48
+
5
49
  ## Acceptance skill
6
50
 
7
51
  The acceptance skill is maintained in [lobehub/acceptance](https://github.com/lobehub/acceptance).
@@ -17,8 +61,8 @@ Update the installed skill:
17
61
  lh acceptance update
18
62
  ```
19
63
 
20
- Creating acceptances and publishing reports require authentication. Run `lh login`
21
- before using those commands.
64
+ Publishing reports to LobeHub requires authentication (`lh login`). Without a
65
+ login, acceptance runs locally — see [Local reports](#local-reports).
22
66
 
23
67
  This selects the same source as `npx skills add lobehub/acceptance --skill acceptance`.
24
68
  Changes merged into the default branch are available on the next install or
@@ -40,6 +84,31 @@ To select an existing version tag explicitly, use `lh acceptance update --skill-
40
84
  with `npx skills add`. A later `lh acceptance update` without `--skill-version`
41
85
  returns to the current default-branch source.
42
86
 
87
+ ## Local reports
88
+
89
+ A machine that has never signed in renders acceptance reports locally instead
90
+ of publishing them; `lh acceptance preflight --json` reports `"mode": "local"`.
91
+
92
+ ```bash
93
+ lh acceptance run render .acceptances/<subject>/<round> --requirement "<business goal>"
94
+ ```
95
+
96
+ This writes `report.html` beside the rounds: the acceptance page, offline — the
97
+ checklist, evidence, before/after pairs, video chapters and round history,
98
+ rendered from every round of that acceptance. Nothing is uploaded. The reader
99
+ can accept or reject checks and circle regions on screenshots there; **Save
100
+ reviews** downloads the decisions, and the next
101
+ `lh acceptance feedback .acceptances/<subject>` (or `view`) files them as
102
+ `reviews.json` and reports them like hosted feedback.
103
+
104
+ Comments, mentions and shared links need LobeHub. After `lh login`,
105
+ `lh acceptance publish .acceptances/<subject>` publishes the unpublished rounds
106
+ in order into one acceptance and carries the standing review decisions over;
107
+ running it again publishes only newer rounds.
108
+
109
+ The page is built by `apps/workbench` (`bun run --cwd ../workbench build:report`);
110
+ `bun run build` copies it to `dist/acceptance-report.html` when it exists.
111
+
43
112
  ## Local Development
44
113
 
45
114
  | Task | Command |
@@ -49,7 +118,7 @@ returns to the current default-branch source.
49
118
  | Link `lh`/`lobe`/`lobehub` into your shell | `bun run cli:link` |
50
119
  | Remove the global link | `bun run cli:unlink` |
51
120
 
52
- - `bun run build` only generates `dist/index.js`.
121
+ - `bun run build` generates `dist/index.js`, plus `dist/acceptance-report.html` when the local report page is built.
53
122
  - To make `lh` available in your shell, run `bun run cli:link`.
54
123
  - After linking, if your shell still cannot find `lh`, run `rehash` in `zsh`.
55
124