@leonidstern/labit 0.6.3-main.16 → 0.6.3-main.17

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.
@@ -18,7 +18,9 @@ If their words could mean "the existing one" or "a new one", use the existing on
18
18
 
19
19
  Start it with `npx @leonidstern/labit@latest`, so the person gets the newest version. The other commands (`wait`, `reply`, `pages`…) can run as `npx @leonidstern/labit` (below `LAB`). From a clone of the repo, `node <clone>/local.mjs` works the same.
20
20
 
21
- 1. In the project, run `npx @leonidstern/labit@latest` in the background (no folder). With the project's dev server running (Astro, Next, Vite…) it puts comments on top of it by itself, ignoring other projects' servers. If it says the dev server isn't running, start it the way the project does (usually `npm run dev`, in the background), then run `LAB` again; never stop other servers. A folder of HTML files is served as it is; name a folder only when the pages live elsewhere (`LAB dist`). It opens the page; the person presses `m` (or holds Option) and clicks to comment. If the site has a base path, `/` is a 404: open a real page such as `/leo/<page>`.
21
+ **Reuse labs, one per project.** Every lab is a server: never start one for a topic or a try. First run `LAB list`. If a lab already serves the folder you're working in, use it: running `LAB` there again only prints its address. A page that belongs to no project (a try, a demo, options to pick from) is published, like an Artifact: `LAB publish <page.html> --name "<topic>"` (see Instead of an Artifact). Never make a new folder to start a lab in.
22
+
23
+ 1. In the project, run `npx @leonidstern/labit@latest --name "<topic>"` in the background (no folder), with the topic of the work in a few words ("Lab navigation"): the person's lab list (⌘K) shows it instead of the folder, and later starts keep it. With the project's dev server running (Astro, Next, Vite…) it puts comments on top of it by itself, ignoring other projects' servers. If it says the dev server isn't running, start it the way the project does (usually `npm run dev`, in the background), then run `LAB` again; never stop other servers. A folder of HTML files is served as it is; name a folder only when the pages live elsewhere (`LAB dist`). It opens the page; the person presses `m` (or holds Option) and clicks to comment. If the site has a base path, `/` is a 404: open a real page such as `/leo/<page>`.
22
24
  2. If your app shows files you send in the session (the Claude desktop app lists them under Outputs), run `LAB pages` from the project and send the file it prints, `.lab/lab-pages.md`: this project's labs, as links (`--all` for every lab on the computer). Links only: an HTML file sent this way opens as a single file that can't follow links, so it never reaches the live page. Send it again whenever you start another lab; the same file keeps one row.
23
25
  3. From the project, run `LAB wait --bg --name "<short project name>" --model "<the model you run on, e.g. Sonnet 5.5>"` in the background — in the background, always. A wait left in the foreground holds your turn open for as long as it listens: the person cannot say a word to you until it ends, and the message they send to reach you kills it. Nothing in the command can tell the two apart, so `--bg` is your word for it, and without that word a wait ends after a minute. The page then says "talking to <your agent> · <model> (<name>)": labit tells Claude, Codex, Cursor, Amp, opencode and Antigravity apart by themselves (Copilot: set `LAB_AGENT=copilot`). It ends with the next comment, printed in full.
24
26
  If your app doesn't tell you when a background command finishes, run it in the foreground instead and loop, with no `--bg` and a short timeout so the person is never held up for long: `LAB wait --timeout 50 --name "<name>" --model "<model>"`; "No new comments yet" means run it again.
@@ -30,11 +32,12 @@ Start it with `npx @leonidstern/labit@latest`, so the person gets the newest ver
30
32
 
31
33
  When the person says "use lab", "in lab" or "show it in lab", show the page in labit, not as an Artifact. The page lives on this computer, and their comments come back to you as pins.
32
34
 
33
- 1. Write the page as an `.html` file. Put it in the project you're working in, next to its pages. With no project, use a `lab-pages/` folder in the working directory. One file per page, with a clear name (`pricing.html`), and a `<title>`.
34
- 2. Run `LAB --no-open` in the background from that folder (or `LAB <folder> --no-open`) and read the port it prints. If a lab already runs there, it says so and prints its port.
35
+ 1. Write the page as an `.html` file with a `<title>` (or a folder with an `index.html`, for a page with images).
36
+ - Part of a project's site: put it in the project, next to its pages, and use the lab `LAB list` shows for that folder (start one there only if none runs).
37
+ - Anything else: publish it, as you would an Artifact: `LAB publish <page.html> --name "<topic>"`. It goes into the person's one pages lab (the `pagesFolder` setting, `~/lab-pages`), which starts if it isn't running, and prints the page's link and the line to listen with. Publish again after a change: same link. Never start a lab of its own for it.
35
38
  3. Show the page beside the chat, the way an Artifact shows. In the Claude desktop app, open `http://localhost:<port>/<file name>` in its built-in browser pane (the Claude_Browser tools: `preview_start` with the `url`, or `navigate` when a tab is open) and bring that pane to the front. Anywhere else, run `LAB` without `--no-open` so it opens the person's browser. Pins work in both.
36
39
  4. Give the person the page's URL in one line, then send the page list and listen and answer as in Local lab, steps 2 to 5.
37
- 5. For later changes, edit the file. The page reloads by itself, so there's nothing to republish.
40
+ 5. For later changes, edit the file in the project, or publish a published page again. The page reloads by itself.
38
41
 
39
42
  Start local, always. The page stays on this computer (for a phone, add `--wifi`, then run `LAB invite` and give the person the link it prints: it lets one device in, once, within ten minutes). labit has no hosted labs for now, so to share a page with someone elsewhere, ask the person how they want it shared. Make an Artifact only if they ask for one.
40
43