claude-artifact-cli 0.2.1__tar.gz → 0.3.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: claude-artifact-cli
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Publish, update, list and inspect Claude Artifacts from the terminal, using the Claude Code login already on your machine.
5
5
  Project-URL: Homepage, https://github.com/nikships/claude-artifact-cli
6
6
  Project-URL: Repository, https://github.com/nikships/claude-artifact-cli
@@ -34,7 +34,7 @@ Description-Content-Type: text/markdown
34
34
 
35
35
  # claude-artifact-cli
36
36
 
37
- Publish, update, pull, list and inspect Claude Artifacts from the terminal, using the Claude Code login already on your machine.
37
+ Publish, update, pull and inspect Claude Artifacts from the terminal, and work with their comments, database, assets, types and sharing, using the Claude Code login already on your machine.
38
38
 
39
39
  [![PyPI](https://img.shields.io/pypi/v/claude-artifact-cli?style=for-the-badge)](https://pypi.org/project/claude-artifact-cli/)
40
40
  [![Python](https://img.shields.io/pypi/pyversions/claude-artifact-cli?style=for-the-badge)](https://pypi.org/project/claude-artifact-cli/)
@@ -46,7 +46,7 @@ Publish, update, pull, list and inspect Claude Artifacts from the terminal, usin
46
46
 
47
47
  ## What is this?
48
48
 
49
- `claude-artifact` publishes an HTML page (plus any CSS, JS and images it uses) as a [Claude Artifact](https://claude.ai/code/artifacts) and prints the link, and pulls an artifact's files back down to edit and republish. It talks to the same API the Claude Code `Artifact` tool uses and reuses the claude.ai login from `claude /login`. No API key, no config file, no dependencies beyond Python 3.10+.
49
+ `claude-artifact` publishes an HTML page (plus any CSS, JS and images it uses) as a [Claude Artifact](https://claude.ai/code/artifacts) and prints the link, and pulls an artifact's files back down to edit and republish. It also reads and answers comment threads, reads and writes an artifact's database, manages its uploaded assets, starts artifacts from types (Slides, Docs, Dashboard, …), declares runtime capabilities, and handles sharing, renaming, pinning, history and deletion. It talks to the same API the Claude Code `Artifact` tool uses and reuses the claude.ai login from `claude /login`. No API key, no config file, no dependencies beyond Python 3.10+.
50
50
 
51
51
  Use it where the built-in tool can't reach: other coding agents (Droid, Codex, Cursor, OpenCode), subagents, shell scripts, Makefiles, git hooks and CI jobs.
52
52
 
@@ -80,12 +80,31 @@ claude-artifact list [--scope mine|shared|all] [--limit N]
80
80
  claude-artifact read SLUG_OR_URL [-o FILE] metadata + published file manifest
81
81
  claude-artifact read SLUG_OR_URL --path P [--path P ... --out-dir DIR]
82
82
  a published file's exact bytes
83
+ claude-artifact versions SLUG_OR_URL version history (* marks live)
84
+ claude-artifact rename SLUG_OR_URL TITLE
85
+ claude-artifact pin|unpin SLUG_OR_URL
86
+ claude-artifact delete SLUG_OR_URL --yes delete for everyone; no undo
87
+ claude-artifact share SLUG_OR_URL [--private | --org | --add UUID ... [--access view|comment] | --remove UUID ...]
88
+
89
+ claude-artifact comments list SLUG_OR_URL [--all | --awaiting] [--full]
90
+ claude-artifact comments reply SLUG_OR_URL THREAD TEXT|- [--id UUID]
91
+ claude-artifact comments resolve SLUG_OR_URL THREAD ...
92
+ claude-artifact watch SLUG_OR_URL [--interval S] [--count N] [--no-comments]
93
+
94
+ claude-artifact db whoami|get|list|query|set|update|delete|edit|batch SLUG_OR_URL ...
95
+ claude-artifact assets list|upload|get|delete|copy SLUG_OR_URL ...
96
+
97
+ claude-artifact types list | show TYPE | read TYPE PATH | instances TYPE
98
+ claude-artifact create TYPE [--title T] new artifact from a type (slides, docs, ...)
99
+ claude-artifact contract [VERSION] [--prompt]
100
+ runtime capabilities and the page-author guide
101
+
83
102
  claude-artifact whoami check that auth works
84
103
  claude-artifact update upgrade to the latest release now
85
104
  claude-artifact --version
86
105
  ```
87
106
 
88
- The URL goes to stdout and progress goes to stderr, so `URL=$(claude-artifact publish page.html -q)` captures only the link. Add `--json` to `publish`, `status`, `list` or `read` for raw output. Exit codes: `0` success, `1` API error, `2` auth error, `3` version conflict (HTTP 409), `130` interrupted.
107
+ The URL goes to stdout and progress goes to stderr, so `URL=$(claude-artifact publish page.html -q)` captures only the link. Add `--json` to any command that prints data for raw output. Exit codes: `0` success, `1` API error, `2` auth error, `3` version conflict (HTTP 409: a newer artifact version, or a database document that changed since `--if-version`), `130` interrupted.
89
108
 
90
109
  Wherever a command takes a slug or URL (`SLUG_OR_URL`, `--slug`, `--url`), it accepts any of:
91
110
 
@@ -130,6 +149,12 @@ claude-artifact publish index.html --slug <slug> \
130
149
  | `--mode patch\|replace` | `patch` overlays the manifest onto the base version, so published files you don't pass are kept. Default when updating a page. `replace` makes the manifest the whole artifact, so any published file you leave out is removed. Default for a new artifact and for the first publish of a directory. A directory with `.artifact.json` patches (see below). |
131
150
  | `--base-version` | The version this publish was made against. If a newer version is live, the publish is refused with exit code `3`. Defaults to the version in a directory's `.artifact.json` (when publishing to the slug saved there). Without one, patch uses the live version and replace is not checked, so a concurrent publish goes undetected. |
132
151
  | `--force` | Publish even if a newer version is live, discarding it. |
152
+ | `--capability NAME[=JSON]` | Declare a runtime capability the page uses: `db`, `user`, `assets`, `comments`, `artifact`, `downloads`, … with its config (default `{}`), e.g. `--capability 'db={"rules":[…]}'`. Repeatable. The set you pass replaces the stored declaration; a publish without `--capability` keeps it. Names are checked against the contract. `claude-artifact contract --prompt` documents each one. |
153
+ | `--clear-capabilities` | Drop every declared capability. |
154
+ | `--contract VERSION` | Pin the runtime contract, or `latest` to upgrade. Default: the artifact's stored contract; a declaration on an artifact without one uses the latest. |
155
+ | `--copy SOURCE PUB[=SRC]` | Have the server copy published file `SRC` (default `PUB`) from artifact `SOURCE` into this one at `PUB`. Nothing is downloaded or re-uploaded. Repeatable. The server copies scripts, styles, data, fonts and images, not HTML or XML. |
156
+ | `--note TEXT` | A note recorded with this version; `versions` shows it. |
157
+ | `--thumbnail IMAGE`, `--thumbnail-dark IMAGE` | Gallery thumbnails. |
133
158
  | `-q`, `--quiet` | Print only the URL. |
134
159
 
135
160
  `--json` prints the deploy response with the artifact `url` added: `{"url", "slug", "version", …}`.
@@ -226,8 +251,113 @@ claude-artifact read <slug> --path index.html --path app.css --out-dir ./out #
226
251
 
227
252
  `read --path P` prints the published file's exact bytes to stdout instead, checked against the manifest's sha256. Repeat `--path` with `--out-dir DIR` to save several files under `DIR` at their published paths; it prints each saved path. `--path` doesn't combine with `--json` or `-o`, more than one `--path` needs `--out-dir`, and `--out-dir` needs `--path`.
228
253
 
254
+ `read` also shows the artifact's runtime contract and declared capabilities. `list --pinned` shows only pinned artifacts.
255
+
229
256
  Never WebFetch or curl a `claude.ai` artifact URL: it is a login-walled app shell and returns no page content.
230
257
 
258
+ ### Comments
259
+
260
+ ```bash
261
+ claude-artifact comments list <slug> # open threads, with authors and anchors
262
+ claude-artifact comments list <slug> --awaiting # threads a person sent to Claude that have no answer yet
263
+ claude-artifact comments reply <slug> <thread> "Fixed in the latest version."
264
+ echo "Long answer" | claude-artifact comments reply <slug> <thread> -
265
+ claude-artifact comments resolve <slug> <thread>
266
+ ```
267
+
268
+ `list` shows open threads; `--all` adds resolved ones and `--full` keeps long comments whole. Each thread prints its id, its state (`resolved`, `sent to Claude`, `awaiting Claude`), what it is anchored to, and every comment.
269
+
270
+ `reply` posts **as Claude**, and only on a thread a person sent to Claude ("Send to Claude" on the artifact's page); anything else is refused, as it is for Claude Code's Artifact tool. When the thread is waiting on Claude, the reply marks that request answered. Each reply carries a client id (`--id`, default a fresh UUID); resending the same id posts nothing new, so a retry after a network error is safe. `resolve` works on the same threads. Starting a thread, and replying or resolving as yourself, need a claude.ai browser session: do those on the artifact's page.
271
+
272
+ ### Watch
273
+
274
+ ```bash
275
+ claude-artifact watch <slug> # prints events until Ctrl-C
276
+ claude-artifact watch <slug> --json --count 1 # wait for the next event, print it as JSON, exit
277
+ ```
278
+
279
+ Polls every `--interval` seconds (default 30) and prints one line per new version, new comment (`[to Claude]` when a person sent it to Claude) and resolved thread. `--json` prints one JSON object per line: `{"event": "version", "version", "previous"}`, `{"event": "comment", "thread", "comment", "author", "text", "to_claude", "awaiting_claude"}` or `{"event": "resolved", "thread", "at"}`. `--no-comments` watches versions only. Publishing identical content creates no new version, so it prints nothing.
280
+
281
+ ### Database
282
+
283
+ An artifact's database holds shared and per-person JSON documents its page reads with `claude.use("db")`. The page's published version must declare the capability: `publish … --capability db --capability user`.
284
+
285
+ ```bash
286
+ claude-artifact db set <slug> tasks t1 --data '{"title": "Ship it", "done": false}'
287
+ claude-artifact db update <slug> tasks t1 --data '{"done": true}' --if-version 1
288
+ claude-artifact db get <slug> tasks t1
289
+ claude-artifact db list <slug> tasks --all
290
+ claude-artifact db query <slug> tasks --where done == false --where n '>=' 2 --order-by n:desc
291
+ claude-artifact db edit <slug> notes n1 --field body --old "teh" --new "the" --replace-all
292
+ claude-artifact db delete <slug> tasks t1
293
+ claude-artifact db batch <slug> @writes.json # [{"op":"set","collection":"tasks","doc_id":"t2","data":{…}}, …]
294
+ claude-artifact db whoami <slug> # your id, as in data/users/<id>
295
+ ```
296
+
297
+ | Rule | |
298
+ |------|--|
299
+ | Paths | A collection is 1-15 `/`-separated segments with an odd count (`tasks`, `boards/b1/columns`); a document is collection + doc id. Segments use letters, digits and `_ - . ~ : @ +`. |
300
+ | Per-person data | `data/users/<id>` is private to that person, even from the owner. `me` stands for you: `db get <slug> data/users/me prefs`. |
301
+ | `set` / `update` | `set` replaces the document; `update` merges fields, and `{"__delete__": true}` removes one. `--data` takes JSON, `-` for stdin, or `@FILE`. |
302
+ | `--if-version N` | The write applies only if the document is still at version `N`. Otherwise nothing is written and the command exits `3`. |
303
+ | `edit` | Replaces text inside one string field without resending the document. |
304
+ | `query` | `--where FIELD OP VALUE` with `==` `!=` `<` `<=` `>` `>=` `in` `not-in` `array-contains`. `VALUE` is parsed as JSON when it can be, else taken as a string. |
305
+ | Paging | `list` and `query` print `--cursor` for the next page; `--all` follows every page. |
306
+ | `batch` | 1-50 `set`/`update`/`delete` writes, `{op, collection, doc_id, data?, if_version?}`, each document at most once, up to 1 MiB, in one request. |
307
+
308
+ `get` prints the document's data (stderr has its version); a missing document exits `1`. List and query print `id`, `v<version>` and the data, tab-separated.
309
+
310
+ ### Assets
311
+
312
+ The asset store holds files a page uploads or references by id: images, SVG, video, PDF, fonts, CSS/JS, CSV, Markdown, JSON and text, up to 20 MiB each (SVG 2 MiB, sanitized). Declare `--capability assets` for the page to use them.
313
+
314
+ ```bash
315
+ claude-artifact assets upload <slug> logo.png chart.svg # prints id, url, file
316
+ claude-artifact assets list <slug>
317
+ claude-artifact assets get <slug> <id> -o logo.png # bytes, checked against the sha256
318
+ claude-artifact assets copy <slug> --from <other-slug> <id> ... # 1-10 ids; prints old -> new
319
+ claude-artifact assets delete <slug> <id>
320
+ ```
321
+
322
+ A page serves an asset at `/_blob/<id>`. `--type` overrides the content type taken from the extension.
323
+
324
+ ### Types
325
+
326
+ Artifact types (Slides, Docs, Dashboard, Design, Motion, …) are ready-made pages that take your content as data.
327
+
328
+ ```bash
329
+ claude-artifact types list
330
+ claude-artifact types show slides # release and the files it ships
331
+ claude-artifact types read slides SKILL.md # how to fill one
332
+ claude-artifact create slides --title "Q3 review" # prints the new artifact's URL
333
+ claude-artifact pull <new-slug> ./deck # then add your files, publish ./deck
334
+ ```
335
+
336
+ `TYPE` is a title (case-insensitive), slug or URL. `create` sends an idempotency key (`--idempotency-key` to reuse one), so a retried create doesn't make a second artifact. `types instances TYPE` lists artifacts made from a type.
337
+
338
+ ### Contract and capabilities
339
+
340
+ ```bash
341
+ claude-artifact contract # latest runtime contract and its capability names
342
+ claude-artifact contract --prompt # the guide for page authors: claude.use(...), each capability's config
343
+ ```
344
+
345
+ ### Sharing and housekeeping
346
+
347
+ ```bash
348
+ claude-artifact share <slug> # audience, people, viewers, commenters
349
+ claude-artifact share <slug> --org # everyone in your organization
350
+ claude-artifact share <slug> --private # only you
351
+ claude-artifact share <slug> --add <account-uuid> --access view
352
+ claude-artifact share <slug> --remove <account-uuid>
353
+ claude-artifact versions <slug>
354
+ claude-artifact rename <slug> "New title" # recorded as a new version
355
+ claude-artifact pin <slug>
356
+ claude-artifact delete <slug> --yes
357
+ ```
358
+
359
+ Sharing is read-modify-write: a change made by someone else in between is refused rather than overwritten. People are named by claude.ai account UUID (`owner_account` in `list --json`, `author.account` in comments for org members); there is no lookup by email. `delete` refuses without `--yes`.
360
+
231
361
  ## Updates
232
362
 
233
363
  A uv tool or pipx install keeps itself current. At most once a day, a command checks PyPI in the background (2-second timeout, never in CI). When a newer release is out, it starts `uv tool upgrade claude-artifact-cli` (or `pipx upgrade claude-artifact-cli`) in a detached process after the command finishes and says so on stderr; `-q` keeps that quiet. The upgrade's output goes to `~/.config/claude-artifact-cli/update.log`. A plain pip install isn't changed behind your back: it prints a notice instead. A failed check or upgrade never changes the command's output or exit code.
@@ -289,6 +419,12 @@ curl -fsSL https://raw.githubusercontent.com/nikships/claude-artifact-cli/main/s
289
419
  | `an artifact made from a type can only be patched` | `--mode replace` on a typed directory. Leave `--mode` off. |
290
420
  | `…/index.html belongs to the artifact's type and can't be published; remove it` | A typed directory holds an `index.html`. Delete it. |
291
421
  | `429 … daily publish cap` | Plan limit. Resets at UTC midnight. |
422
+ | `Claude can only reply on a thread a person sent to Claude` | `comments reply`/`resolve` on a thread without "Send to Claude". Ask the person to send it to Claude, or answer on the page. |
423
+ | `this artifact's published version doesn't declare the db capability` | Republish with `--capability db --capability user`. |
424
+ | `the document changed since --if-version`, exit code `3` | Someone wrote the document since you read it. `db get` it again and redo the write. |
425
+ | `… names a document, not a collection` | A collection path needs an odd number of segments. Split off the last segment as the doc id. |
426
+ | `contract … has no capability …` | A misspelled `--capability`. The error lists the valid names. |
427
+ | `deleting … can't be undone; pass --yes` | `delete` needs `--yes`. |
292
428
 
293
429
  ## The protocol
294
430
 
@@ -299,15 +435,34 @@ POST /api/frame/deploy/direct publish
299
435
  POST /api/frame/deploy/prepare content-hash preflight (bodies over ~15 MB)
300
436
  POST /api/frame/upload stage blobs the preflight asked for
301
437
  GET /api/frame/{slug}?via=model_read boot: metadata, file manifest, assetToken
302
- GET /api/frame/read/{slug} ownership / sharing status
438
+ GET /api/frame/read/{slug} ownership, stored contract and capabilities
303
439
  GET /api/frame/frames?limit=N list
440
+ GET /api/frame/versions/{slug} version history
441
+ POST /api/frame/retitle/{slug} rename {"title"}
442
+ POST|DELETE /api/frame/favorite/{slug} pin / unpin
443
+ DELETE /api/frame/{slug} delete
444
+ GET|PATCH /api/frame/perm/{slug} sharing (PATCH needs If-Match: <version from GET>)
445
+
446
+ GET /api/frame/comments/{slug}?names=1 threads
447
+ POST /api/frame/comments/{slug}/{thread} reply as Claude
448
+ POST /api/frame/comments/{slug}/{thread}/session-resolve resolve
449
+ POST /api/frame/db/agent database
450
+ POST /api/frame/blob/{slug}/agent-upload|agent-list|agent-copy, /{id}/agent-delete assets
451
+
452
+ GET /api/frame/types[/{slug}[/files/{path}|/instances]] types
453
+ POST /api/frame/types/{slug}/create?idempotency_key=K new artifact from a type
454
+ GET /api/frame/contract/{latest|version}[/prompt] runtime contract
304
455
 
305
456
  GET https://{slug}.frame.claudeusercontent.com/_f/{ver}/_src/{path}?__frame_t=<assetToken>
306
457
  published source bytes (see Reading files)
307
458
  GET https://{slug}.frame.claudeusercontent.com/_f/{ver}/{path}?__frame_t=<assetToken>
308
459
  served copy
460
+ GET https://{slug}.frame.claudeusercontent.com/_f/{ver}/_blob/{id}?__frame_t=<assetToken>
461
+ an uploaded asset
309
462
  ```
310
463
 
464
+ Every route above answers the OAuth bearer directly. Claude Code routes some of them through a relay in cloud sessions; on a local machine it calls them directly too.
465
+
311
466
  Headers on `api.anthropic.com` calls:
312
467
 
313
468
  ```
@@ -345,7 +500,9 @@ A manifest value with `content` inlines the file; one with `sha256` references a
345
500
 
346
501
  **Wire encoding.** These content types go as raw UTF-8 strings; everything else is base64: `text/html`, `text/css`, `text/plain`, `text/markdown`, `text/csv`, `text/javascript`, `application/javascript`, `application/json`, `application/manifest+json`, `application/xml`, `text/xml`, `image/svg+xml`.
347
502
 
348
- Response: `{"slug", "version", "read", "shared", "kind"}`. The page lives at `https://claude.ai/code/artifact/<slug>`.
503
+ Optional deploy fields: `description`, `icon`, `label`, `note`, `thumbnail` and `thumbnail_dark` (base64 images), and `contract` with `capabilities` (`{"db": {}, "user": {}}`). `capabilities` requires `contract` (`HTTP 400: capabilities requires contract`); a deploy without `capabilities` keeps the stored declaration, and `{}` clears it. A patch needs a non-empty manifest.
504
+
505
+ Response: `{"slug", "version", "manifest", "history", "contract", "capabilities", …}`. The page lives at `https://claude.ai/code/artifact/<slug>`.
349
506
 
350
507
  **Modes and conflicts.** `replace` makes the manifest the whole artifact; `patch` overlays it onto `baseVersion`, keeping paths it doesn't name. Both modes honor `baseVersion`: if the live version is newer, the deploy is refused with
351
508
 
@@ -360,6 +517,37 @@ HTTP 409
360
517
 
361
518
  Over ~15 MB inline, the client switches to `prepare` → `upload` → `deploy`. `prepare` takes `{slug?, shas:[…]}` and answers `{slug, missing:[…]}`. The missing blobs go to `/upload` in batches of at most 15 MB, and the final deploy references them by `sha256`: the hex sha256 of the raw file bytes.
362
519
 
520
+ ### Copying files from another artifact
521
+
522
+ A manifest entry can reference a file another artifact already published. First `POST /api/frame/upload` with `{"slug", "files": [{"path": "<dest>", "from": {"slug", "path", "ver"}}]}` (a new artifact reserves its slug with `/deploy/prepare` first), then deploy with `"<dest>": {"sha256": "<source sha256>", "contentType": "…"}`.
523
+
524
+ ### Comments
525
+
526
+ `GET /comments/{slug}?names=1` answers `{"threads": [...], "names": {account: name}, "viewer"}`. A thread is `{id, created_at, anchor: {path, label, file, file_sha, …}, comments: [...], resolved_at?, resolved_by?, claude_activated_at?}`; a comment is `{id, author: {account, role?}, text, created_at, to_claude_at?}`. `author.role` is set (`"assistant"`) on Claude's comments. `to_claude_at` marks a comment a person sent to Claude.
527
+
528
+ The OAuth token can reply and resolve only on threads with `claude_activated_at` (a person used "Send to Claude"); elsewhere the server answers `403 Claude is not activated on this thread`. A reply is `POST /comments/{slug}/{thread}` with `{"id": "<client uuid>", "text", "answers_summon"?: true}`; it answers `201 {"thread_id", "comment_id", "replayed"?}` and the same `id` again answers `replayed: true` without posting. Resolve is `POST …/session-resolve` with `{"resolved": true}`. Starting a thread (`POST /comments/{slug}`) and `/resolve` answer `403 this comment action requires a claude.ai session`.
529
+
530
+ ### Database
531
+
532
+ `POST /api/frame/db/agent` with `{"slug", "verb", "args"}`:
533
+
534
+ | verb | args |
535
+ |------|------|
536
+ | `whoami` | `{}` → `{"id"}` |
537
+ | `get` | `{"path": "coll/doc"}` → `{exists, data, version, updatedAt}` |
538
+ | `list`, `query` | `{"collection", "limit"?, "cursor"?, "where"?: [{field, op, value}], "orderBy"?: {field, direction}}` → `{docs: [{id, data, version, updatedAt}], nextCursor}` |
539
+ | `set` | `{"path", "data", "replace": true, "ifVersion"?}` |
540
+ | `update` | `{"path", "data", "ifVersion"?}` |
541
+ | `delete` | `{"path", "ifVersion"?}` |
542
+ | `str_replace` | `{"path", "field", "old_str", "new_str", "replace_all"?, "idem": <16 random bytes, base64url>, "ifVersion"?}` |
543
+ | `batch` | `{"ops": [{"op", …the args above}]}` → `{results: [{version?}]}` |
544
+
545
+ `op` is `eq ne lt lte gt gte in not-in array-contains`. Writes answer `{version, usage}`. Errors are `{"error": {"code", "message", …}}`: `404 not_declared` when the published version doesn't declare `db`, `409 version_mismatch` (with the current `version`) when `ifVersion` is stale.
546
+
547
+ ### Assets
548
+
549
+ `agent-upload` takes the raw file bytes with the asset's `Content-Type` and answers `{opaque_id, url: "/_blob/<id>", size_bytes, content_type, sha256}`. `agent-list` takes `{"limit", "after"?}` and answers `{assets, usage, next?}`; `agent-copy` takes `{"from": <slug>, "ids": [...]}`; `/{id}/agent-delete` takes `{}` and answers `{"deleted"}`.
550
+
363
551
  ### Reading files
364
552
 
365
553
  The boot, `GET /api/frame/{slug}?via=model_read`, returns `ver`, the `files` manifest (`path`, `size`, `contentType`, `sha256`) and a short-lived `assetToken`. Bytes come from the content host `https://{slug}.frame.claudeusercontent.com`:
@@ -380,9 +568,10 @@ The `assetToken` is redacted from every output and never written to disk.
380
568
 
381
569
  ### Not supported
382
570
 
383
- - **Delete and pin.** Both go through a relay-only route that isn't reachable on the direct path. Use `/artifacts` in Claude Code, or claude.ai.
384
- - **Capabilities.** Runtime capability declarations (`capabilities`, `contract`) are accepted by the API but not exposed as flags.
385
- - **Comments, watching, thumbnails.**
571
+ - **Starting comment threads, or commenting as yourself.** Those routes need a claude.ai browser session.
572
+ - **Artifacts shared from other organizations in `list`.** `GET /frames/external` needs a browser session.
573
+ - **Push notifications.** Claude Code's watch subscribes a webhook (`/subscribe/{slug}`) minted by its own session; `watch` polls instead.
574
+ - **Sharing by email.** The route takes account UUIDs; Claude Code resolves names on an approval card the CLI has no equivalent of.
386
575
 
387
576
  ## Project Structure
388
577
 
@@ -401,7 +590,8 @@ src/
401
590
  ├── __main__.py python -m claude_artifact_cli
402
591
  ├── api.py frame API client
403
592
  ├── auth.py token lookup
404
- ├── cli.py argparse entry point
593
+ ├── cli.py argparse entry point; publish, read, pull, status
594
+ ├── commands.py comments, db, assets, types, sharing, history, watch
405
595
  └── update.py daily update check, background upgrade, `update`
406
596
  tests/ unit tests (offline; transport mocked)
407
597
  AGENTS.md
@@ -4,7 +4,7 @@
4
4
 
5
5
  # claude-artifact-cli
6
6
 
7
- Publish, update, pull, list and inspect Claude Artifacts from the terminal, using the Claude Code login already on your machine.
7
+ Publish, update, pull and inspect Claude Artifacts from the terminal, and work with their comments, database, assets, types and sharing, using the Claude Code login already on your machine.
8
8
 
9
9
  [![PyPI](https://img.shields.io/pypi/v/claude-artifact-cli?style=for-the-badge)](https://pypi.org/project/claude-artifact-cli/)
10
10
  [![Python](https://img.shields.io/pypi/pyversions/claude-artifact-cli?style=for-the-badge)](https://pypi.org/project/claude-artifact-cli/)
@@ -16,7 +16,7 @@ Publish, update, pull, list and inspect Claude Artifacts from the terminal, usin
16
16
 
17
17
  ## What is this?
18
18
 
19
- `claude-artifact` publishes an HTML page (plus any CSS, JS and images it uses) as a [Claude Artifact](https://claude.ai/code/artifacts) and prints the link, and pulls an artifact's files back down to edit and republish. It talks to the same API the Claude Code `Artifact` tool uses and reuses the claude.ai login from `claude /login`. No API key, no config file, no dependencies beyond Python 3.10+.
19
+ `claude-artifact` publishes an HTML page (plus any CSS, JS and images it uses) as a [Claude Artifact](https://claude.ai/code/artifacts) and prints the link, and pulls an artifact's files back down to edit and republish. It also reads and answers comment threads, reads and writes an artifact's database, manages its uploaded assets, starts artifacts from types (Slides, Docs, Dashboard, …), declares runtime capabilities, and handles sharing, renaming, pinning, history and deletion. It talks to the same API the Claude Code `Artifact` tool uses and reuses the claude.ai login from `claude /login`. No API key, no config file, no dependencies beyond Python 3.10+.
20
20
 
21
21
  Use it where the built-in tool can't reach: other coding agents (Droid, Codex, Cursor, OpenCode), subagents, shell scripts, Makefiles, git hooks and CI jobs.
22
22
 
@@ -50,12 +50,31 @@ claude-artifact list [--scope mine|shared|all] [--limit N]
50
50
  claude-artifact read SLUG_OR_URL [-o FILE] metadata + published file manifest
51
51
  claude-artifact read SLUG_OR_URL --path P [--path P ... --out-dir DIR]
52
52
  a published file's exact bytes
53
+ claude-artifact versions SLUG_OR_URL version history (* marks live)
54
+ claude-artifact rename SLUG_OR_URL TITLE
55
+ claude-artifact pin|unpin SLUG_OR_URL
56
+ claude-artifact delete SLUG_OR_URL --yes delete for everyone; no undo
57
+ claude-artifact share SLUG_OR_URL [--private | --org | --add UUID ... [--access view|comment] | --remove UUID ...]
58
+
59
+ claude-artifact comments list SLUG_OR_URL [--all | --awaiting] [--full]
60
+ claude-artifact comments reply SLUG_OR_URL THREAD TEXT|- [--id UUID]
61
+ claude-artifact comments resolve SLUG_OR_URL THREAD ...
62
+ claude-artifact watch SLUG_OR_URL [--interval S] [--count N] [--no-comments]
63
+
64
+ claude-artifact db whoami|get|list|query|set|update|delete|edit|batch SLUG_OR_URL ...
65
+ claude-artifact assets list|upload|get|delete|copy SLUG_OR_URL ...
66
+
67
+ claude-artifact types list | show TYPE | read TYPE PATH | instances TYPE
68
+ claude-artifact create TYPE [--title T] new artifact from a type (slides, docs, ...)
69
+ claude-artifact contract [VERSION] [--prompt]
70
+ runtime capabilities and the page-author guide
71
+
53
72
  claude-artifact whoami check that auth works
54
73
  claude-artifact update upgrade to the latest release now
55
74
  claude-artifact --version
56
75
  ```
57
76
 
58
- The URL goes to stdout and progress goes to stderr, so `URL=$(claude-artifact publish page.html -q)` captures only the link. Add `--json` to `publish`, `status`, `list` or `read` for raw output. Exit codes: `0` success, `1` API error, `2` auth error, `3` version conflict (HTTP 409), `130` interrupted.
77
+ The URL goes to stdout and progress goes to stderr, so `URL=$(claude-artifact publish page.html -q)` captures only the link. Add `--json` to any command that prints data for raw output. Exit codes: `0` success, `1` API error, `2` auth error, `3` version conflict (HTTP 409: a newer artifact version, or a database document that changed since `--if-version`), `130` interrupted.
59
78
 
60
79
  Wherever a command takes a slug or URL (`SLUG_OR_URL`, `--slug`, `--url`), it accepts any of:
61
80
 
@@ -100,6 +119,12 @@ claude-artifact publish index.html --slug <slug> \
100
119
  | `--mode patch\|replace` | `patch` overlays the manifest onto the base version, so published files you don't pass are kept. Default when updating a page. `replace` makes the manifest the whole artifact, so any published file you leave out is removed. Default for a new artifact and for the first publish of a directory. A directory with `.artifact.json` patches (see below). |
101
120
  | `--base-version` | The version this publish was made against. If a newer version is live, the publish is refused with exit code `3`. Defaults to the version in a directory's `.artifact.json` (when publishing to the slug saved there). Without one, patch uses the live version and replace is not checked, so a concurrent publish goes undetected. |
102
121
  | `--force` | Publish even if a newer version is live, discarding it. |
122
+ | `--capability NAME[=JSON]` | Declare a runtime capability the page uses: `db`, `user`, `assets`, `comments`, `artifact`, `downloads`, … with its config (default `{}`), e.g. `--capability 'db={"rules":[…]}'`. Repeatable. The set you pass replaces the stored declaration; a publish without `--capability` keeps it. Names are checked against the contract. `claude-artifact contract --prompt` documents each one. |
123
+ | `--clear-capabilities` | Drop every declared capability. |
124
+ | `--contract VERSION` | Pin the runtime contract, or `latest` to upgrade. Default: the artifact's stored contract; a declaration on an artifact without one uses the latest. |
125
+ | `--copy SOURCE PUB[=SRC]` | Have the server copy published file `SRC` (default `PUB`) from artifact `SOURCE` into this one at `PUB`. Nothing is downloaded or re-uploaded. Repeatable. The server copies scripts, styles, data, fonts and images, not HTML or XML. |
126
+ | `--note TEXT` | A note recorded with this version; `versions` shows it. |
127
+ | `--thumbnail IMAGE`, `--thumbnail-dark IMAGE` | Gallery thumbnails. |
103
128
  | `-q`, `--quiet` | Print only the URL. |
104
129
 
105
130
  `--json` prints the deploy response with the artifact `url` added: `{"url", "slug", "version", …}`.
@@ -196,8 +221,113 @@ claude-artifact read <slug> --path index.html --path app.css --out-dir ./out #
196
221
 
197
222
  `read --path P` prints the published file's exact bytes to stdout instead, checked against the manifest's sha256. Repeat `--path` with `--out-dir DIR` to save several files under `DIR` at their published paths; it prints each saved path. `--path` doesn't combine with `--json` or `-o`, more than one `--path` needs `--out-dir`, and `--out-dir` needs `--path`.
198
223
 
224
+ `read` also shows the artifact's runtime contract and declared capabilities. `list --pinned` shows only pinned artifacts.
225
+
199
226
  Never WebFetch or curl a `claude.ai` artifact URL: it is a login-walled app shell and returns no page content.
200
227
 
228
+ ### Comments
229
+
230
+ ```bash
231
+ claude-artifact comments list <slug> # open threads, with authors and anchors
232
+ claude-artifact comments list <slug> --awaiting # threads a person sent to Claude that have no answer yet
233
+ claude-artifact comments reply <slug> <thread> "Fixed in the latest version."
234
+ echo "Long answer" | claude-artifact comments reply <slug> <thread> -
235
+ claude-artifact comments resolve <slug> <thread>
236
+ ```
237
+
238
+ `list` shows open threads; `--all` adds resolved ones and `--full` keeps long comments whole. Each thread prints its id, its state (`resolved`, `sent to Claude`, `awaiting Claude`), what it is anchored to, and every comment.
239
+
240
+ `reply` posts **as Claude**, and only on a thread a person sent to Claude ("Send to Claude" on the artifact's page); anything else is refused, as it is for Claude Code's Artifact tool. When the thread is waiting on Claude, the reply marks that request answered. Each reply carries a client id (`--id`, default a fresh UUID); resending the same id posts nothing new, so a retry after a network error is safe. `resolve` works on the same threads. Starting a thread, and replying or resolving as yourself, need a claude.ai browser session: do those on the artifact's page.
241
+
242
+ ### Watch
243
+
244
+ ```bash
245
+ claude-artifact watch <slug> # prints events until Ctrl-C
246
+ claude-artifact watch <slug> --json --count 1 # wait for the next event, print it as JSON, exit
247
+ ```
248
+
249
+ Polls every `--interval` seconds (default 30) and prints one line per new version, new comment (`[to Claude]` when a person sent it to Claude) and resolved thread. `--json` prints one JSON object per line: `{"event": "version", "version", "previous"}`, `{"event": "comment", "thread", "comment", "author", "text", "to_claude", "awaiting_claude"}` or `{"event": "resolved", "thread", "at"}`. `--no-comments` watches versions only. Publishing identical content creates no new version, so it prints nothing.
250
+
251
+ ### Database
252
+
253
+ An artifact's database holds shared and per-person JSON documents its page reads with `claude.use("db")`. The page's published version must declare the capability: `publish … --capability db --capability user`.
254
+
255
+ ```bash
256
+ claude-artifact db set <slug> tasks t1 --data '{"title": "Ship it", "done": false}'
257
+ claude-artifact db update <slug> tasks t1 --data '{"done": true}' --if-version 1
258
+ claude-artifact db get <slug> tasks t1
259
+ claude-artifact db list <slug> tasks --all
260
+ claude-artifact db query <slug> tasks --where done == false --where n '>=' 2 --order-by n:desc
261
+ claude-artifact db edit <slug> notes n1 --field body --old "teh" --new "the" --replace-all
262
+ claude-artifact db delete <slug> tasks t1
263
+ claude-artifact db batch <slug> @writes.json # [{"op":"set","collection":"tasks","doc_id":"t2","data":{…}}, …]
264
+ claude-artifact db whoami <slug> # your id, as in data/users/<id>
265
+ ```
266
+
267
+ | Rule | |
268
+ |------|--|
269
+ | Paths | A collection is 1-15 `/`-separated segments with an odd count (`tasks`, `boards/b1/columns`); a document is collection + doc id. Segments use letters, digits and `_ - . ~ : @ +`. |
270
+ | Per-person data | `data/users/<id>` is private to that person, even from the owner. `me` stands for you: `db get <slug> data/users/me prefs`. |
271
+ | `set` / `update` | `set` replaces the document; `update` merges fields, and `{"__delete__": true}` removes one. `--data` takes JSON, `-` for stdin, or `@FILE`. |
272
+ | `--if-version N` | The write applies only if the document is still at version `N`. Otherwise nothing is written and the command exits `3`. |
273
+ | `edit` | Replaces text inside one string field without resending the document. |
274
+ | `query` | `--where FIELD OP VALUE` with `==` `!=` `<` `<=` `>` `>=` `in` `not-in` `array-contains`. `VALUE` is parsed as JSON when it can be, else taken as a string. |
275
+ | Paging | `list` and `query` print `--cursor` for the next page; `--all` follows every page. |
276
+ | `batch` | 1-50 `set`/`update`/`delete` writes, `{op, collection, doc_id, data?, if_version?}`, each document at most once, up to 1 MiB, in one request. |
277
+
278
+ `get` prints the document's data (stderr has its version); a missing document exits `1`. List and query print `id`, `v<version>` and the data, tab-separated.
279
+
280
+ ### Assets
281
+
282
+ The asset store holds files a page uploads or references by id: images, SVG, video, PDF, fonts, CSS/JS, CSV, Markdown, JSON and text, up to 20 MiB each (SVG 2 MiB, sanitized). Declare `--capability assets` for the page to use them.
283
+
284
+ ```bash
285
+ claude-artifact assets upload <slug> logo.png chart.svg # prints id, url, file
286
+ claude-artifact assets list <slug>
287
+ claude-artifact assets get <slug> <id> -o logo.png # bytes, checked against the sha256
288
+ claude-artifact assets copy <slug> --from <other-slug> <id> ... # 1-10 ids; prints old -> new
289
+ claude-artifact assets delete <slug> <id>
290
+ ```
291
+
292
+ A page serves an asset at `/_blob/<id>`. `--type` overrides the content type taken from the extension.
293
+
294
+ ### Types
295
+
296
+ Artifact types (Slides, Docs, Dashboard, Design, Motion, …) are ready-made pages that take your content as data.
297
+
298
+ ```bash
299
+ claude-artifact types list
300
+ claude-artifact types show slides # release and the files it ships
301
+ claude-artifact types read slides SKILL.md # how to fill one
302
+ claude-artifact create slides --title "Q3 review" # prints the new artifact's URL
303
+ claude-artifact pull <new-slug> ./deck # then add your files, publish ./deck
304
+ ```
305
+
306
+ `TYPE` is a title (case-insensitive), slug or URL. `create` sends an idempotency key (`--idempotency-key` to reuse one), so a retried create doesn't make a second artifact. `types instances TYPE` lists artifacts made from a type.
307
+
308
+ ### Contract and capabilities
309
+
310
+ ```bash
311
+ claude-artifact contract # latest runtime contract and its capability names
312
+ claude-artifact contract --prompt # the guide for page authors: claude.use(...), each capability's config
313
+ ```
314
+
315
+ ### Sharing and housekeeping
316
+
317
+ ```bash
318
+ claude-artifact share <slug> # audience, people, viewers, commenters
319
+ claude-artifact share <slug> --org # everyone in your organization
320
+ claude-artifact share <slug> --private # only you
321
+ claude-artifact share <slug> --add <account-uuid> --access view
322
+ claude-artifact share <slug> --remove <account-uuid>
323
+ claude-artifact versions <slug>
324
+ claude-artifact rename <slug> "New title" # recorded as a new version
325
+ claude-artifact pin <slug>
326
+ claude-artifact delete <slug> --yes
327
+ ```
328
+
329
+ Sharing is read-modify-write: a change made by someone else in between is refused rather than overwritten. People are named by claude.ai account UUID (`owner_account` in `list --json`, `author.account` in comments for org members); there is no lookup by email. `delete` refuses without `--yes`.
330
+
201
331
  ## Updates
202
332
 
203
333
  A uv tool or pipx install keeps itself current. At most once a day, a command checks PyPI in the background (2-second timeout, never in CI). When a newer release is out, it starts `uv tool upgrade claude-artifact-cli` (or `pipx upgrade claude-artifact-cli`) in a detached process after the command finishes and says so on stderr; `-q` keeps that quiet. The upgrade's output goes to `~/.config/claude-artifact-cli/update.log`. A plain pip install isn't changed behind your back: it prints a notice instead. A failed check or upgrade never changes the command's output or exit code.
@@ -259,6 +389,12 @@ curl -fsSL https://raw.githubusercontent.com/nikships/claude-artifact-cli/main/s
259
389
  | `an artifact made from a type can only be patched` | `--mode replace` on a typed directory. Leave `--mode` off. |
260
390
  | `…/index.html belongs to the artifact's type and can't be published; remove it` | A typed directory holds an `index.html`. Delete it. |
261
391
  | `429 … daily publish cap` | Plan limit. Resets at UTC midnight. |
392
+ | `Claude can only reply on a thread a person sent to Claude` | `comments reply`/`resolve` on a thread without "Send to Claude". Ask the person to send it to Claude, or answer on the page. |
393
+ | `this artifact's published version doesn't declare the db capability` | Republish with `--capability db --capability user`. |
394
+ | `the document changed since --if-version`, exit code `3` | Someone wrote the document since you read it. `db get` it again and redo the write. |
395
+ | `… names a document, not a collection` | A collection path needs an odd number of segments. Split off the last segment as the doc id. |
396
+ | `contract … has no capability …` | A misspelled `--capability`. The error lists the valid names. |
397
+ | `deleting … can't be undone; pass --yes` | `delete` needs `--yes`. |
262
398
 
263
399
  ## The protocol
264
400
 
@@ -269,15 +405,34 @@ POST /api/frame/deploy/direct publish
269
405
  POST /api/frame/deploy/prepare content-hash preflight (bodies over ~15 MB)
270
406
  POST /api/frame/upload stage blobs the preflight asked for
271
407
  GET /api/frame/{slug}?via=model_read boot: metadata, file manifest, assetToken
272
- GET /api/frame/read/{slug} ownership / sharing status
408
+ GET /api/frame/read/{slug} ownership, stored contract and capabilities
273
409
  GET /api/frame/frames?limit=N list
410
+ GET /api/frame/versions/{slug} version history
411
+ POST /api/frame/retitle/{slug} rename {"title"}
412
+ POST|DELETE /api/frame/favorite/{slug} pin / unpin
413
+ DELETE /api/frame/{slug} delete
414
+ GET|PATCH /api/frame/perm/{slug} sharing (PATCH needs If-Match: <version from GET>)
415
+
416
+ GET /api/frame/comments/{slug}?names=1 threads
417
+ POST /api/frame/comments/{slug}/{thread} reply as Claude
418
+ POST /api/frame/comments/{slug}/{thread}/session-resolve resolve
419
+ POST /api/frame/db/agent database
420
+ POST /api/frame/blob/{slug}/agent-upload|agent-list|agent-copy, /{id}/agent-delete assets
421
+
422
+ GET /api/frame/types[/{slug}[/files/{path}|/instances]] types
423
+ POST /api/frame/types/{slug}/create?idempotency_key=K new artifact from a type
424
+ GET /api/frame/contract/{latest|version}[/prompt] runtime contract
274
425
 
275
426
  GET https://{slug}.frame.claudeusercontent.com/_f/{ver}/_src/{path}?__frame_t=<assetToken>
276
427
  published source bytes (see Reading files)
277
428
  GET https://{slug}.frame.claudeusercontent.com/_f/{ver}/{path}?__frame_t=<assetToken>
278
429
  served copy
430
+ GET https://{slug}.frame.claudeusercontent.com/_f/{ver}/_blob/{id}?__frame_t=<assetToken>
431
+ an uploaded asset
279
432
  ```
280
433
 
434
+ Every route above answers the OAuth bearer directly. Claude Code routes some of them through a relay in cloud sessions; on a local machine it calls them directly too.
435
+
281
436
  Headers on `api.anthropic.com` calls:
282
437
 
283
438
  ```
@@ -315,7 +470,9 @@ A manifest value with `content` inlines the file; one with `sha256` references a
315
470
 
316
471
  **Wire encoding.** These content types go as raw UTF-8 strings; everything else is base64: `text/html`, `text/css`, `text/plain`, `text/markdown`, `text/csv`, `text/javascript`, `application/javascript`, `application/json`, `application/manifest+json`, `application/xml`, `text/xml`, `image/svg+xml`.
317
472
 
318
- Response: `{"slug", "version", "read", "shared", "kind"}`. The page lives at `https://claude.ai/code/artifact/<slug>`.
473
+ Optional deploy fields: `description`, `icon`, `label`, `note`, `thumbnail` and `thumbnail_dark` (base64 images), and `contract` with `capabilities` (`{"db": {}, "user": {}}`). `capabilities` requires `contract` (`HTTP 400: capabilities requires contract`); a deploy without `capabilities` keeps the stored declaration, and `{}` clears it. A patch needs a non-empty manifest.
474
+
475
+ Response: `{"slug", "version", "manifest", "history", "contract", "capabilities", …}`. The page lives at `https://claude.ai/code/artifact/<slug>`.
319
476
 
320
477
  **Modes and conflicts.** `replace` makes the manifest the whole artifact; `patch` overlays it onto `baseVersion`, keeping paths it doesn't name. Both modes honor `baseVersion`: if the live version is newer, the deploy is refused with
321
478
 
@@ -330,6 +487,37 @@ HTTP 409
330
487
 
331
488
  Over ~15 MB inline, the client switches to `prepare` → `upload` → `deploy`. `prepare` takes `{slug?, shas:[…]}` and answers `{slug, missing:[…]}`. The missing blobs go to `/upload` in batches of at most 15 MB, and the final deploy references them by `sha256`: the hex sha256 of the raw file bytes.
332
489
 
490
+ ### Copying files from another artifact
491
+
492
+ A manifest entry can reference a file another artifact already published. First `POST /api/frame/upload` with `{"slug", "files": [{"path": "<dest>", "from": {"slug", "path", "ver"}}]}` (a new artifact reserves its slug with `/deploy/prepare` first), then deploy with `"<dest>": {"sha256": "<source sha256>", "contentType": "…"}`.
493
+
494
+ ### Comments
495
+
496
+ `GET /comments/{slug}?names=1` answers `{"threads": [...], "names": {account: name}, "viewer"}`. A thread is `{id, created_at, anchor: {path, label, file, file_sha, …}, comments: [...], resolved_at?, resolved_by?, claude_activated_at?}`; a comment is `{id, author: {account, role?}, text, created_at, to_claude_at?}`. `author.role` is set (`"assistant"`) on Claude's comments. `to_claude_at` marks a comment a person sent to Claude.
497
+
498
+ The OAuth token can reply and resolve only on threads with `claude_activated_at` (a person used "Send to Claude"); elsewhere the server answers `403 Claude is not activated on this thread`. A reply is `POST /comments/{slug}/{thread}` with `{"id": "<client uuid>", "text", "answers_summon"?: true}`; it answers `201 {"thread_id", "comment_id", "replayed"?}` and the same `id` again answers `replayed: true` without posting. Resolve is `POST …/session-resolve` with `{"resolved": true}`. Starting a thread (`POST /comments/{slug}`) and `/resolve` answer `403 this comment action requires a claude.ai session`.
499
+
500
+ ### Database
501
+
502
+ `POST /api/frame/db/agent` with `{"slug", "verb", "args"}`:
503
+
504
+ | verb | args |
505
+ |------|------|
506
+ | `whoami` | `{}` → `{"id"}` |
507
+ | `get` | `{"path": "coll/doc"}` → `{exists, data, version, updatedAt}` |
508
+ | `list`, `query` | `{"collection", "limit"?, "cursor"?, "where"?: [{field, op, value}], "orderBy"?: {field, direction}}` → `{docs: [{id, data, version, updatedAt}], nextCursor}` |
509
+ | `set` | `{"path", "data", "replace": true, "ifVersion"?}` |
510
+ | `update` | `{"path", "data", "ifVersion"?}` |
511
+ | `delete` | `{"path", "ifVersion"?}` |
512
+ | `str_replace` | `{"path", "field", "old_str", "new_str", "replace_all"?, "idem": <16 random bytes, base64url>, "ifVersion"?}` |
513
+ | `batch` | `{"ops": [{"op", …the args above}]}` → `{results: [{version?}]}` |
514
+
515
+ `op` is `eq ne lt lte gt gte in not-in array-contains`. Writes answer `{version, usage}`. Errors are `{"error": {"code", "message", …}}`: `404 not_declared` when the published version doesn't declare `db`, `409 version_mismatch` (with the current `version`) when `ifVersion` is stale.
516
+
517
+ ### Assets
518
+
519
+ `agent-upload` takes the raw file bytes with the asset's `Content-Type` and answers `{opaque_id, url: "/_blob/<id>", size_bytes, content_type, sha256}`. `agent-list` takes `{"limit", "after"?}` and answers `{assets, usage, next?}`; `agent-copy` takes `{"from": <slug>, "ids": [...]}`; `/{id}/agent-delete` takes `{}` and answers `{"deleted"}`.
520
+
333
521
  ### Reading files
334
522
 
335
523
  The boot, `GET /api/frame/{slug}?via=model_read`, returns `ver`, the `files` manifest (`path`, `size`, `contentType`, `sha256`) and a short-lived `assetToken`. Bytes come from the content host `https://{slug}.frame.claudeusercontent.com`:
@@ -350,9 +538,10 @@ The `assetToken` is redacted from every output and never written to disk.
350
538
 
351
539
  ### Not supported
352
540
 
353
- - **Delete and pin.** Both go through a relay-only route that isn't reachable on the direct path. Use `/artifacts` in Claude Code, or claude.ai.
354
- - **Capabilities.** Runtime capability declarations (`capabilities`, `contract`) are accepted by the API but not exposed as flags.
355
- - **Comments, watching, thumbnails.**
541
+ - **Starting comment threads, or commenting as yourself.** Those routes need a claude.ai browser session.
542
+ - **Artifacts shared from other organizations in `list`.** `GET /frames/external` needs a browser session.
543
+ - **Push notifications.** Claude Code's watch subscribes a webhook (`/subscribe/{slug}`) minted by its own session; `watch` polls instead.
544
+ - **Sharing by email.** The route takes account UUIDs; Claude Code resolves names on an approval card the CLI has no equivalent of.
356
545
 
357
546
  ## Project Structure
358
547
 
@@ -371,7 +560,8 @@ src/
371
560
  ├── __main__.py python -m claude_artifact_cli
372
561
  ├── api.py frame API client
373
562
  ├── auth.py token lookup
374
- ├── cli.py argparse entry point
563
+ ├── cli.py argparse entry point; publish, read, pull, status
564
+ ├── commands.py comments, db, assets, types, sharing, history, watch
375
565
  └── update.py daily update check, background upgrade, `update`
376
566
  tests/ unit tests (offline; transport mocked)
377
567
  AGENTS.md
@@ -0,0 +1 @@
1
+ __version__ = "0.3.0"