@artifactshare/cli 0.12.0 → 0.13.0
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/CHANGELOG.md +18 -0
- package/README.md +65 -29
- package/dist/cursor-acp-entry.d.ts +1 -0
- package/dist/cursor-acp-entry.js +413 -0
- package/dist/cursor-notification-BBGHJ5v5.js +520 -0
- package/dist/index.js +813 -443
- package/package.json +5 -3
- package/skills/artifactshare/SKILL.md +87 -61
- package/skills/artifactshare/artifactshare.mdc +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artifactshare/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Upload and share HTML, Markdown, folders, and static sites from terminals, AI agents, automation, and CI.",
|
|
5
5
|
"homepage": "https://artifactshare.com/connect",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"bin": {
|
|
24
|
-
"artifactshare": "./dist/index.js"
|
|
24
|
+
"artifactshare": "./dist/index.js",
|
|
25
|
+
"artifactshare-preview-cursor": "./dist/cursor-acp-entry.js"
|
|
25
26
|
},
|
|
26
27
|
"engines": {
|
|
27
28
|
"node": ">=22.19.0"
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"gunshi": "^0.37.0",
|
|
41
|
-
"undici": "^8.10.0"
|
|
42
|
+
"undici": "^8.10.0",
|
|
43
|
+
"zod": "4.4.3"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@artifactshare/viewer-kit": "0.0.1",
|
|
@@ -27,15 +27,15 @@ for creating or designing an artifact inside the chat. Artifact Share is for
|
|
|
27
27
|
sharing, updating, opening, or reading back existing files, folders, static
|
|
28
28
|
sites, and Artifact Share URLs.
|
|
29
29
|
|
|
30
|
-
Run commands with `
|
|
31
|
-
command or flag, run `
|
|
30
|
+
Run commands with `npm exec --yes --package=@artifactshare/cli -- artifactshare`. When unsure about a
|
|
31
|
+
command or flag, run `npm exec --yes --package=@artifactshare/cli -- artifactshare <command> --help` first.
|
|
32
32
|
|
|
33
33
|
Honor an explicit user request to use CLI or MCP before selecting the default
|
|
34
34
|
below. Use the CLI when a coding agent can access a user-controlled workspace,
|
|
35
35
|
install the CLI package, and reach Artifact Share, even when MCP tools are also
|
|
36
36
|
available. Use remote MCP for source text in chat or a temporary sandbox when
|
|
37
37
|
CLI network access is unavailable or uncertain; a temporary file alone is not
|
|
38
|
-
enough to try `
|
|
38
|
+
enough to try `npm exec`. MCP OAuth is not CLI authentication: follow the CLI
|
|
39
39
|
`auth_required` recovery for first setup, then reuse the saved CLI profile.
|
|
40
40
|
|
|
41
41
|
When passing paths or free-form text through a shell, quote them. Paths may
|
|
@@ -84,7 +84,7 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
|
84
84
|
API-token profiles are removed locally only and are not revoked on the server.
|
|
85
85
|
- To keep using an issued token as a named profile without TTY or browser
|
|
86
86
|
login, pipe it on standard input:
|
|
87
|
-
`printf '%s' "$TOKEN" |
|
|
87
|
+
`printf '%s' "$TOKEN" | npm exec --yes --package=@artifactshare/cli -- artifactshare profiles import-token --profile <name> --json`.
|
|
88
88
|
Bot tokens (`asb_` prefix, issued by a workspace admin) use the same command; the first
|
|
89
89
|
refresh consumes the displayed token, overwriting an existing profile credential requires
|
|
90
90
|
`--force`, and a revoked or superseded bot token fails with `bot_token_invalid` (ask the
|
|
@@ -104,8 +104,8 @@ case-insensitive `</body>` when present, or at source end otherwise. It adds no
|
|
|
104
104
|
newline or separator and does not support sites.
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare share ./report.html --json
|
|
108
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare share ./site-dir --project-id <id> --json
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
- `share` accepts a single `.html` / `.md` file or a static-site directory.
|
|
@@ -147,10 +147,10 @@ Posting to a project delivers to the audience defined by that project. Without
|
|
|
147
147
|
a destination, `share` posts to home. Choose the home audience by purpose:
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare config set home_audience private --scope user --json
|
|
151
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare config set home_audience workspace --scope repository --json
|
|
152
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare share ./report.html --visibility private --json
|
|
153
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare config get home_audience --scope effective --json
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
Use the user scope for a personal safe default in this CLI environment, the
|
|
@@ -177,7 +177,7 @@ defaults are unchanged.
|
|
|
177
177
|
Use `update` to add a new version to an existing artifact while keeping its URL.
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
|
|
180
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare update <artifact-id-or-url> ./report.html --json
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
- To keep an existing share URL, do not run `share --artifact-id`; use `update`.
|
|
@@ -191,10 +191,10 @@ npx --yes @artifactshare/cli update <artifact-id-or-url> ./report.html --json
|
|
|
191
191
|
Use `artifacts get` for single-file sources. Use `download` for static sites.
|
|
192
192
|
|
|
193
193
|
```bash
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare artifacts get <artifact-id-or-url> --json
|
|
195
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare artifacts get <artifact-id-or-url> --include versions --include comments --json
|
|
196
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare download <artifact-id-or-url> --output ./out --json
|
|
197
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare download --project-id <id> --output ./out --json
|
|
198
198
|
```
|
|
199
199
|
|
|
200
200
|
- In the successful JSON response, read the source from `data.content` and the current version from `data.version_id`.
|
|
@@ -230,11 +230,11 @@ Use `comments list` to read, `comments post` to write. IDs from `list` feed
|
|
|
230
230
|
into `edit`, `resolve`, `reopen`, and `delete`.
|
|
231
231
|
|
|
232
232
|
```bash
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments list <artifact-id-or-url> --json
|
|
234
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <artifact-id-or-url> --body '<text>' --json
|
|
235
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <artifact-id-or-url> --body '<text>' --reply-to <thread-id> --json
|
|
236
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <artifact-id-or-url> --body '<text>' --quote 'exact text' --json
|
|
237
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments post <artifact-id-or-url> --body '<text>' --agent 'Claude' --json
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
- `--reply-to <thread-id>` replies to an existing thread from `comments list`.
|
|
@@ -247,10 +247,10 @@ npx --yes @artifactshare/cli comments post <artifact-id-or-url> --body '<text>'
|
|
|
247
247
|
`comments list` returns an `agent` field on messages posted with this flag.
|
|
248
248
|
|
|
249
249
|
```bash
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments edit <artifact-id-or-url> --message-id <id> --body '<text>' --json
|
|
251
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments resolve <artifact-id-or-url> --thread-id <id> --json
|
|
252
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments reopen <artifact-id-or-url> --thread-id <id> --json
|
|
253
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare comments delete <artifact-id-or-url> --thread-id <id> --message-id <id> --json
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
- Comment deletion cannot be undone. Omit `--message-id` only when the user
|
|
@@ -263,11 +263,11 @@ Use `edit` for post-share changes. Use `projects list/create/edit` for
|
|
|
263
263
|
project management.
|
|
264
264
|
|
|
265
265
|
```bash
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
266
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare edit <artifact-id-or-url> --title 'New title' --json
|
|
267
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare edit <artifact-id-or-url> --visibility private --grant-email viewer@example.com --json
|
|
268
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare edit <artifact-id-or-url> --project-id <id> --json
|
|
269
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare edit <artifact-id-or-url> --home --json
|
|
270
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare delete <artifact-id-or-url> --json
|
|
271
271
|
```
|
|
272
272
|
|
|
273
273
|
- `edit` changes title, visibility, explicit viewers, or project placement
|
|
@@ -289,11 +289,11 @@ npx --yes @artifactshare/cli delete <artifact-id-or-url> --json
|
|
|
289
289
|
when the user explicitly asks.
|
|
290
290
|
|
|
291
291
|
```bash
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
292
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare projects list --json
|
|
293
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare projects create 'Client reports' --json
|
|
294
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare projects create 'Internal' --visibility private --json
|
|
295
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare projects edit <id> --add-email viewer@example.com --json
|
|
296
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare projects edit <id> --archive --json
|
|
297
297
|
```
|
|
298
298
|
|
|
299
299
|
- `projects create` uses `default_project_visibility` when saved, otherwise
|
|
@@ -309,9 +309,9 @@ npx --yes @artifactshare/cli projects edit <id> --archive --json
|
|
|
309
309
|
## Profiles
|
|
310
310
|
|
|
311
311
|
```bash
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare profiles list --json
|
|
313
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare profiles use <name> --json
|
|
314
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare profiles delete <name> --json
|
|
315
315
|
```
|
|
316
316
|
|
|
317
317
|
- `profiles list` shows saved profiles and the default.
|
|
@@ -324,9 +324,9 @@ npx --yes @artifactshare/cli profiles delete <name> --json
|
|
|
324
324
|
## Skills
|
|
325
325
|
|
|
326
326
|
```bash
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare skills ensure --tool auto --json
|
|
328
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare skills update --json
|
|
329
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare skills list --json
|
|
330
330
|
```
|
|
331
331
|
|
|
332
332
|
- `open`, flag-less `init`, and `skills ensure --tool auto` detect Claude Code,
|
|
@@ -354,15 +354,16 @@ batch, and the agent fixes the file. Nothing is uploaded by previewing;
|
|
|
354
354
|
an upload happens only if the user opens the share dialog from the page.
|
|
355
355
|
|
|
356
356
|
```bash
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare preview ./lp.html
|
|
358
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare preview start ./lp.html --no-open
|
|
359
359
|
```
|
|
360
360
|
|
|
361
361
|
- Internally this runs the `preview start` subcommand (bare `preview <file>`
|
|
362
362
|
is rewritten to it). It prints a single ready JSON line with `url` (the
|
|
363
363
|
local page), `session` (id for `--session`), `share_origin`, and `reused`
|
|
364
364
|
(`true` means an already-live session for the same file was picked up
|
|
365
|
-
instead of starting a new server),
|
|
365
|
+
instead of starting a new server), plus a sanitized `agent` notification
|
|
366
|
+
projection, then keeps running until stopped.
|
|
366
367
|
`--no-open` skips opening the browser.
|
|
367
368
|
- Editing and saving the file reloads the page automatically; annotations
|
|
368
369
|
stay anchored where possible.
|
|
@@ -371,12 +372,14 @@ npx --yes @artifactshare/cli preview start ./lp.html --no-open
|
|
|
371
372
|
`--wait <sec>` it long-polls. `timed_out: true` and `session_ended: true`
|
|
372
373
|
are normal empty results, not errors. The error
|
|
373
374
|
`preview_session_not_found` means no live session exists; ask the user to
|
|
374
|
-
start one. `
|
|
375
|
+
start one. `preview_wait_conflict` means another long poll owns the session;
|
|
376
|
+
use that wait or retry after it returns. `preview_request_failed` means the session is alive but rejected
|
|
375
377
|
the request, so fix the payload (thread id, generation, size) and retry.
|
|
376
378
|
`preview_session_unverified` on startup means a recorded session did not
|
|
377
|
-
answer
|
|
378
|
-
|
|
379
|
-
process
|
|
379
|
+
answer, or it was started before the current notification contract. Retry a
|
|
380
|
+
temporarily unresponsive session; for an older session, ask the user to stop
|
|
381
|
+
that preview process and start it again with the current CLI. The `--force`
|
|
382
|
+
fallback clears an unresponsive record only once the process is gone.
|
|
380
383
|
- Report outcomes with `preview done --stdin`; reply into a thread with
|
|
381
384
|
`preview reply --thread <id> --body <text>` (state unchanged); end the
|
|
382
385
|
session with `preview stop` (annotations stay saved on disk).
|
|
@@ -385,16 +388,37 @@ npx --yes @artifactshare/cli preview start ./lp.html --no-open
|
|
|
385
388
|
|
|
386
389
|
Pick the first mode your environment supports:
|
|
387
390
|
|
|
388
|
-
1. In
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
`preview next
|
|
397
|
-
|
|
391
|
+
1. In Codex, start preview from the session that owns the work. Current Codex
|
|
392
|
+
environments expose the session UUID to the trusted local preview process;
|
|
393
|
+
Artifact Share registers it and uses `codex queue` to send a fixed
|
|
394
|
+
batch-ready notice. End your turn after preview is ready. When the notice
|
|
395
|
+
resumes the session, run `preview next`, fix the whole batch, and report it
|
|
396
|
+
with `preview done`. A `queued` state means Codex accepted the notice, not
|
|
397
|
+
that it started processing. If it remains queued, the session may have
|
|
398
|
+
ended: use `codex resume`, then run `preview next`. Never copy comments into
|
|
399
|
+
a queue message; `preview next` is their source of truth.
|
|
400
|
+
2. In Claude Code, use the background-wait path only if
|
|
401
|
+
`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` is neither `1` nor `true`, Bash exposes
|
|
402
|
+
`run_in_background`, and starting `preview next --wait 3600` in the
|
|
403
|
+
background returns a task ID. End your turn. A submitted batch completes the
|
|
404
|
+
command and resumes you; fix the file, report with `preview done`, then arm
|
|
405
|
+
one new background wait. If the wait returns `timed_out: true`, do not
|
|
406
|
+
re-arm it automatically. If background execution is unavailable or
|
|
407
|
+
rejected, use manual pickup and do not describe the session as waiting.
|
|
408
|
+
3. For an Artifact Share-managed Cursor ACP session, start with
|
|
409
|
+
`npm exec --yes --package=@artifactshare/cli -- artifactshare-preview-cursor <file>`.
|
|
410
|
+
Run one managed launcher per workspace. The launcher creates or loads the
|
|
411
|
+
workspace's managed conversation and sends a fixed batch-ready prompt only
|
|
412
|
+
while that session is idle. Read all comment content with `preview next`;
|
|
413
|
+
never place it in the ACP prompt. Keep the launcher attended and approve
|
|
414
|
+
Cursor tool permissions only after checking the request shown in its
|
|
415
|
+
terminal.
|
|
416
|
+
4. In the interactive Cursor Agent CLI, start preview with
|
|
417
|
+
`ARTIFACTSHARE_CURSOR_FOREGROUND_WAIT=1`, then block in the foreground on
|
|
418
|
+
`preview next --wait 90` and repeat. Do not use that marker for a normal
|
|
419
|
+
Cursor IDE chat: IDE chats are manual pickup and must not be described as
|
|
420
|
+
automatically resumable.
|
|
421
|
+
5. Fallback: run `preview next` only when the user tells you a batch is
|
|
398
422
|
ready.
|
|
399
423
|
|
|
400
424
|
If `preview next` immediately returns the same item set as the previous
|
|
@@ -403,12 +427,14 @@ call, do not re-arm; report the situation to the user instead.
|
|
|
403
427
|
### Working through a batch
|
|
404
428
|
|
|
405
429
|
```bash
|
|
406
|
-
|
|
407
|
-
|
|
430
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare preview next ./lp.html --wait 90
|
|
431
|
+
npm exec --yes --package=@artifactshare/cli -- artifactshare preview next --session 0123456789abcdef
|
|
408
432
|
```
|
|
409
433
|
|
|
410
434
|
- Read the whole batch first, then fix everything in one editing pass and
|
|
411
435
|
save once, then report the whole batch with a single `preview done` call.
|
|
436
|
+
- Successful `preview next` and `preview done` results include the same
|
|
437
|
+
sanitized `agent` notification projection as the ready result.
|
|
412
438
|
- Each done item is `{thread, generation, outcome, note}` with outcome
|
|
413
439
|
`fixed` (you changed the file) or `skipped` (`note` explaining why is
|
|
414
440
|
required). The `note` is shown to the user as the thread summary, so
|
|
@@ -421,7 +447,7 @@ npx --yes @artifactshare/cli preview next --session 0123456789abcdef
|
|
|
421
447
|
know.
|
|
422
448
|
|
|
423
449
|
```bash
|
|
424
|
-
printf '%s' '{"items":[{"thread":"t1","generation":1,"outcome":"fixed","note":"Tightened the headline"}]}' |
|
|
450
|
+
printf '%s' '{"items":[{"thread":"t1","generation":1,"outcome":"fixed","note":"Tightened the headline"}]}' | npm exec --yes --package=@artifactshare/cli -- artifactshare preview done ./lp.html --stdin
|
|
425
451
|
```
|
|
426
452
|
|
|
427
453
|
Sharing is user-driven: the page's share button opens a separate-origin
|
|
@@ -441,7 +467,7 @@ carried into the shared copy.
|
|
|
441
467
|
|
|
442
468
|
## First-time setup
|
|
443
469
|
|
|
444
|
-
`
|
|
470
|
+
`npm exec --yes --package=@artifactshare/cli -- artifactshare init` detects the agent, installs or updates
|
|
445
471
|
this skill, and reports the next steps (sign in, then share). When you receive
|
|
446
472
|
a share URL instead, start with `open <artifact-id-or-url> --json`. It ensures
|
|
447
473
|
this skill is installed or updated, then reads single-file artifacts or returns
|
|
@@ -14,8 +14,8 @@ Artifact Share is for the last step after a file already exists: share,
|
|
|
14
14
|
publish, upload, or host HTML pages, Markdown documents, folders, and static
|
|
15
15
|
sites; return a browser link; update the same URL; open or read back an
|
|
16
16
|
Artifact Share URL; and read or post comments. Use
|
|
17
|
-
`
|
|
18
|
-
Run `
|
|
17
|
+
`npm exec --yes --package=@artifactshare/cli -- artifactshare` from the terminal.
|
|
18
|
+
Run `npm exec --yes --package=@artifactshare/cli -- artifactshare <command> --help` before choosing a command.
|
|
19
19
|
|
|
20
20
|
Use this rule for Artifact Share, artifactshare, and contextual "as" requests.
|
|
21
21
|
Japanese requests such as `as でアップして` or `as に上げて` are strong
|
|
@@ -33,7 +33,7 @@ the CLI when a coding agent can work in a user-controlled workspace, fetch the
|
|
|
33
33
|
package, and connect to Artifact Share, even when MCP is available. Use
|
|
34
34
|
remote MCP for source text in chat or a temporary sandbox when CLI network
|
|
35
35
|
access is unavailable or uncertain; a temporary file alone is not enough to
|
|
36
|
-
try `
|
|
36
|
+
try `npm exec`. MCP OAuth is separate from CLI authentication: follow the CLI
|
|
37
37
|
`auth_required` recovery, then reuse the saved profile.
|
|
38
38
|
Use `append <target> <path> --json` to append a non-empty UTF-8 file exactly
|
|
39
39
|
as-is to a single-file artifact. Markdown is appended at source end; HTML is
|
|
@@ -50,7 +50,7 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
|
50
50
|
both to use the workspace default on share or preserve the current expiry on
|
|
51
51
|
edit. Results expose `link_expires_at` as a UTC timestamp or `null`.
|
|
52
52
|
- For an attended coding agent on the user's own machine, use `login --preset agent --profile <name> --json`; add `--project <exact-name-or-id>` to confirm a fixed project or omit it to use the browser picker. In CI, issue an API token at `https://artifactshare.com/settings/tokens` and inject it with `ARTIFACTSHARE_TOKEN` or `--token`. A shared agent platform uses a workspace-managed bot credential in a trusted host outside the model sandbox; never expose it to model shell commands. Do not pass tokens to `login`.
|
|
53
|
-
- To save that token as a named profile without TTY or browser login, pipe it on standard input: `printf '%s' "$TOKEN" |
|
|
53
|
+
- To save that token as a named profile without TTY or browser login, pipe it on standard input: `printf '%s' "$TOKEN" | npm exec --yes --package=@artifactshare/cli -- artifactshare profiles import-token --profile <name> --json`. Imported API-token profiles are not renewed by the CLI. Bot tokens (`asb_` prefix) import through the same command as rotating refresh credentials; overwriting an existing profile credential needs `--force`, and a rejected bot token reports `bot_token_invalid` (recovery is an admin reissue). Add `--allow-plaintext-token-store` only on a trusted machine without a native token store. That fallback is mode `0600` on POSIX and unavailable on Windows, where saved profiles require Credential Manager.
|
|
54
54
|
- Use `login --profile <name> --json` when a user is present for browser approval. The pending event on stderr includes `browser_open`. Profiles created by `login` renew expired CLI sessions automatically.
|
|
55
55
|
- Use `logout --profile <name> --json` to revoke a device-login credential before removing it locally; this keeps profile metadata. API-token profiles are removed locally only and their server token is not revoked.
|
|
56
56
|
- Switch profiles with `profiles use <name> --json`; list with `profiles list --json`; remove a profile entry and its credential with `profiles delete <name> --json`.
|
|
@@ -79,6 +79,6 @@ contain `$`, spaces, `*`, or `?`; use single quotes such as
|
|
|
79
79
|
- Manage projects: `projects list --json`, `projects create <name> --json` (uses `default_project_visibility` when saved, otherwise `workspace`; pass `--visibility private` for a confidential project), `projects edit <id>` for name, description, visibility, audience (`--add-email`/`--remove-email`), and archive state (`--archive`/`--unarchive`).
|
|
80
80
|
- Save a default project with `init --project-id <id> --json`. Preview setup with `init --dry-run --json`.
|
|
81
81
|
- Manage skills: `skills ensure --tool auto --json` detects Claude Code, Codex, or Cursor and installs or updates user-scope skills; Cursor project scope needs `skills install --tool cursor --scope project --json`. Use `skills install --tool cursor --scope user --json` for the Cursor user-scope skill explicitly. Project scope is opt-in via `skills install --tool <tool> --scope project --json`. `skills update --json` updates installed managed skills; `--force` overwrites unmanaged files on install.
|
|
82
|
-
- Preview a local `.md` / `.html` file with `preview <file> --json` (add `--no-open` to keep the browser closed). It is local and needs no sign-in: one ready JSON line (`url` / `session` / `share_origin` / `reused`) is printed and the process keeps serving; saving the file reloads the page. The user annotates in the browser and submits batches. Fetch them with `preview next [--wait <sec>] [--session <id>]` — non-claiming long poll where `timed_out` / `session_ended` are normal empty results and `preview_session_not_found` means no live session, `preview_request_failed` means the session is alive and rejected the request, and `preview_session_unverified` means the recorded session went silent — retry, then stop the process before `preview stop <file> --force`. Fix the whole batch in one edit, then pipe `{"items":[{"thread","generation","outcome":"fixed|skipped","note"}]}` to `preview done --stdin` (idempotent per generation; results `accepted|stale|already_reported|unknown_thread`; `skipped` needs a note; items with `anchor.state: "orphaned"` are skipped, not re-fixed; the note becomes the thread summary). `preview reply --thread <id> --body <text>` answers without changing state; `preview stop` ends the session and keeps annotations. If `preview next` immediately returns the same items again, stop polling and tell the user. Nothing is uploaded unless the user shares from the page.
|
|
82
|
+
- Preview a local `.md` / `.html` file with `preview <file> --json` (add `--no-open` to keep the browser closed). It is local and needs no sign-in: one ready JSON line (`url` / `session` / `share_origin` / `reused` / sanitized `agent`) is printed and the process keeps serving; saving the file reloads the page. A preview started inside Codex registers the trusted thread UUID and uses `codex queue` for a fixed batch-ready notice; `queued` means accepted, while `preview next` is the first proof of processing. If it remains queued, reopen the session with `codex resume`. In Claude Code, if background tasks are enabled (`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` is neither `1` nor `true`), Bash exposes `run_in_background`, and the command returns a task ID, arm one background `preview next --wait 3600`; re-arm after `preview done`, but not after `timed_out: true`. If background execution is disabled or rejected, use manual pickup. In Cursor, keep `preview next --wait 90` in the foreground. The user annotates in the browser and submits batches. Fetch them with `preview next [--wait <sec>] [--session <id>]` — non-claiming long poll where `timed_out` / `session_ended` are normal empty results and `preview_session_not_found` means no live session, `preview_request_failed` means the session is alive and rejected the request, and `preview_session_unverified` means the recorded session went silent — retry, then stop the process before `preview stop <file> --force`. Fix the whole batch in one edit, then pipe `{"items":[{"thread","generation","outcome":"fixed|skipped","note"}]}` to `preview done --stdin` (idempotent per generation; results `accepted|stale|already_reported|unknown_thread`; `skipped` needs a note; items with `anchor.state: "orphaned"` are skipped, not re-fixed; the note becomes the thread summary). `preview reply --thread <id> --body <text>` answers without changing state; `preview stop` ends the session and keeps annotations. Never copy comment content into a provider notification; `preview next` is the source of truth. If `preview next` immediately returns the same items again, stop polling and tell the user. Nothing is uploaded unless the user shares from the page.
|
|
83
83
|
- Check the current state with `whoami --json` or `doctor --json` for token storage, authentication, destination, network, upload access, and skill update status.
|
|
84
|
-
- First-time setup: `
|
|
84
|
+
- First-time setup: `npm exec --yes --package=@artifactshare/cli -- artifactshare init --json` detects Claude Code, Codex, or Cursor, installs or updates user-scope skills, and reports the next steps (sign in, then share). For Cursor project scope, run `skills install --tool cursor --scope project --json` explicitly.
|