@animaapp/cli 0.7.1 → 0.9.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/README.md CHANGED
@@ -6,9 +6,10 @@ from a shell.
6
6
 
7
7
  **What it does.** Connect as a scoped agent identity, then work with **artifacts**
8
8
  (each one a real git repo): create them from your own code or from a
9
- prompt/URL/Figma design, edit them over git, publish them to a live URL, and list
10
- your team's artifacts to resume recent work. Every command runs an AgentGrid MCP
11
- tool for you.
9
+ prompt/URL/Figma design, read and change their files (with or without git),
10
+ publish them to a live URL, answer the review comments humans leave on them, and
11
+ list your team's artifacts to resume recent work. Every command runs an
12
+ AgentGrid MCP tool for you.
12
13
 
13
14
  **How it works.** Built for **agents**: any AI tool that can run a shell command
14
15
  can use it — no MCP server to configure, no plugins, just `npx`. Under the hood
@@ -38,7 +39,7 @@ Every command runs as a **scoped agent identity**: it acts only within the
38
39
  workspaces and capabilities a human approved, and your team can see and
39
40
  **revoke** it at any time. The CLI renews it in the background; after a few
40
41
  months the consent reaches its renewal limit and a human approves again. You get
41
- that identity one of four ways. Door 3 is the usual one — you lead with
42
+ that identity one of three ways. Door 2 is the usual one — you lead with
42
43
  something to show, and it needs neither a token nor an account on their side.
43
44
 
44
45
  ### 1. Device login — `anima login`
@@ -77,20 +78,7 @@ The agent shows the human the URL + code, the human approves, and the same
77
78
  process resolves with the final `{ "success": true, "tokenType": "agent", ... }`
78
79
  on stdout.
79
80
 
80
- ### 2. Pre-issued token — `ANIMA_API_TOKEN`
81
-
82
- For CI or a fully headless agent with **no human in the loop**, skip login and
83
- provide a token directly:
84
-
85
- ```bash
86
- export ANIMA_API_TOKEN=<agent-or-personal-token>
87
- export ANIMA_TEAM_ID=<team-id> # optional
88
- export FIGMA_TOKEN=<token> # only for codegen / f2c
89
- ```
90
-
91
- Resolution priority: `ANIMA_API_TOKEN` env var → stored credentials file → error.
92
-
93
- ### 3. Create first, hand off later — anonymous artifacts
81
+ ### 2. Create first, hand off later — anonymous artifacts
94
82
 
95
83
  This is the flow where **you** lead: no token, and a human who needs no
96
84
  AgentGrid account until the moment they claim. Two commands:
@@ -123,7 +111,7 @@ a fresh one.
123
111
 
124
112
  **Send `clientName` — say what product you are** (`"Claude Code"`, `"Cursor"`,
125
113
  …), the same name you would pass to `login --client-name`. The human sees it on
126
- the claim page and it becomes the agent name they approve; without it they are
114
+ the artifact page and it becomes the agent name they approve; without it they are
127
115
  asked to invent a name for an artifact they did not create. Display-only, never
128
116
  verified, ≤120 characters.
129
117
 
@@ -147,9 +135,8 @@ says so rather than polling forever.
147
135
  | Human at a dev machine | `anima login` (browser opens) |
148
136
  | Interactive agent, human nearby | `anima login` — show the URL + code, human approves on any device |
149
137
  | Headless agent, human reachable | `anima login --json` — relay the `verification_required` event, polling finishes automatically |
150
- | Fully headless / CI, no human | set `ANIMA_API_TOKEN` — no login step |
151
138
  | You want to lead: share something first, no account needed on their side | `anima create --anonymous …` → send `artifactUrl` → `anima login --handoff` |
152
- | Your human led: they sent you an invite link to join | `anima login --invite <url-or-code>` — one exchange, no approval step |
139
+ | Fully headless / CI, or a human sent you an invite link | `anima login --invite <url-or-code>` — they approved when minting it, so there is no approval step at run time |
153
140
 
154
141
  ---
155
142
 
@@ -159,27 +146,65 @@ says so rather than polling forever.
159
146
  # 1. Connect (once)
160
147
  npx @animaapp/cli@latest login
161
148
 
162
- # 2. Create from a prompt / URL / Figma
163
- npx @animaapp/cli@latest create -t p2c -p "E-commerce product page with cart"
149
+ # 2. Make an artifact — from your own code, or generated
150
+ npx @animaapp/cli@latest create -t import --from ./my-project # instant
151
+ npx @animaapp/cli@latest create -t p2c -p "E-commerce page with a cart" # waits ~3-7 min
164
152
  npx @animaapp/cli@latest create -t l2c -u https://linear.app
165
153
  npx @animaapp/cli@latest create -t f2c --file-key <key> --nodes 42:15
166
154
 
167
- # 3. Or bring YOUR OWN code: import it in one step -> publish
168
- npx @animaapp/cli@latest create -t import --from ./my-project
169
- npx @animaapp/cli@latest publish <sessionId>
170
-
171
155
  # ...or start empty and push over git
172
156
  npx @animaapp/cli@latest create -t empty --framework react --name "My project"
173
- npx @animaapp/cli@latest get-git-token <sessionId> # then: git clone <url>, add code, git push
174
157
 
175
- # ...or create an independent copy of an existing artifact
176
- npx @animaapp/cli@latest duplicate <artifactUrl-or-sessionId> --name "My copy"
158
+ # 3. Change it — no clone, no git binary
159
+ npx @animaapp/cli@latest explore <sessionId> --search "primaryColor"
160
+ npx @animaapp/cli@latest explore <sessionId> --read src/App.tsx
161
+ npx @animaapp/cli@latest edit <sessionId> -m "Blue buttons" \
162
+ --replace src/App.tsx --old "red" --new "blue"
163
+
164
+ # ...or with a real checkout, when the job needs one
165
+ npx @animaapp/cli@latest get-git-token <sessionId> # then: git clone <url>, commit, push
166
+
167
+ # 4. Share the artifactUrl the create printed. Publishing is a separate,
168
+ # explicit step that makes the app public to the world:
169
+ npx @animaapp/cli@latest publish <sessionId>
170
+
171
+ # Along the way
172
+ npx @animaapp/cli@latest list # resume recent work
173
+ npx @animaapp/cli@latest review list # what humans asked you to change
177
174
  ```
178
175
 
179
176
  ---
180
177
 
181
178
  ## Commands
182
179
 
180
+ Every command runs one MCP tool. `anima <command> --help` prints its own
181
+ options; `--json` makes any of them agent-readable.
182
+
183
+ | | Command | What it does |
184
+ |---|---------|--------------|
185
+ | **Connect** | [`login`](#login--connect-this-machine) | Connect this machine as a scoped agent identity |
186
+ | | [`logout`](#logout--disconnect-this-machine) | Revoke and clear every stored credential |
187
+ | | [`auth`](#auth--inspect-or-manage-credentials) | Inspect credentials, store a Figma token |
188
+ | | [`skill`](#skill--install-the-agentgrid-guide-for-your-agent) | Install the AgentGrid guide as a SKILL.md your agent can read |
189
+ | | [`mcp-config`](#mcp-config--print-your-mcp-server-config) | Print an MCP server config for your MCP client |
190
+ | **Find** | [`workspaces`](#workspaces--where-you-can-work) | The workspaces you can reach, and what you may do in each |
191
+ | | [`list`](#list--the-artifacts-you-can-read) | The artifacts you can read, most-recently-updated first |
192
+ | **Make** | [`create`](#create--an-artifact-for-your-code-or-ai-generated) | Import your code, an empty repo, or AI generation |
193
+ | | [`create-knowledge`](#create--an-artifact-for-your-code-or-ai-generated) | Create a knowledge artifact |
194
+ | | [`status`](#status--did-generation-finish) | Did generation finish? `--wait` blocks until it has |
195
+ | | [`duplicate`](#duplicate--copy-an-existing-artifact) | Copy an artifact into a new, independent one |
196
+ | **Change** | [`explore`](#explore--read-an-artifacts-files-no-git) | Read files: list, search, read, history |
197
+ | | [`edit`](#edit--change-files-and-commit-them-no-git) | Change files and commit them — one commit |
198
+ | | [`upload-asset`](#upload-asset--add-a-large-image-font-or-media-file) | Add an image, font or media file over 256 KB |
199
+ | | [`get-git-token`](#get-git-token--readedit-an-artifacts-code-over-git) | Mint git access for a real checkout |
200
+ | **Collaborate** | [`review`](#review--the-comments-humans-addressed-to-you) | Read and answer the comments humans left you |
201
+ | **Ship** | [`publish`](#publish--deploy-a-session-to-a-public-url-13-min) | Deploy to a public live URL — only when asked |
202
+ | | [`unpublish`](#unpublish--take-a-published-artifact-offline) | Take a published artifact offline |
203
+ | | [`update`](#update--rename-or-change-visibility-metadata-only) | Rename, or change visibility |
204
+ | | [`delete`](#delete--hide-an-artifact-with-reversible-soft-deletion) | Reversible soft deletion |
205
+ | **Figma** | [`codegen`](#codegen--figma-to-local-files-no-artifact) | Figma → local code files, no artifact |
206
+ | **Settings** | [`config`](#config--store-cli-preferences) | Store CLI preferences (e.g. a default API URL) |
207
+
183
208
  ### `login` — connect this machine
184
209
 
185
210
  ```bash
@@ -200,6 +225,24 @@ npx @animaapp/cli@latest login --handoff <token> # ...or name the t
200
225
  | `--no-open` | Don't try to open the verification page in a browser | — |
201
226
  | `--print-mcp-config` | One-shot: after this fresh login, also print the MCP server config. If you are already logged in, use `mcp-config` instead — this flag always starts a new login | off |
202
227
 
228
+ ### `skill` — install the AgentGrid guide for your agent
229
+
230
+ ```bash
231
+ npx @animaapp/cli@latest skill .claude/skills/agentgrid/SKILL.md # write it
232
+ npx @animaapp/cli@latest skill # or print it
233
+ ```
234
+
235
+ Writes a `SKILL.md` at the path you give — the whole AgentGrid flow, so an
236
+ agent reading it knows how to connect, create, change, review and publish
237
+ without being told. Parent directories are created; re-running overwrites.
238
+
239
+ The prose is **fetched from the API** (`/guide.md`), so it does not go stale in
240
+ an installed package, while the command reference inside it is generated from
241
+ this CLI's own commands — meaning the syntax it shows is the syntax your
242
+ version accepts. No credential needed: the guide is public.
243
+
244
+ Point `--api-url` at another environment to install that one's guide.
245
+
203
246
  ### `mcp-config` — print your MCP server config
204
247
 
205
248
  ```bash
@@ -216,15 +259,46 @@ authorize when it prompts. No CLI in the loop after that. Your client needs to
216
259
  support OAuth for remote MCP servers (`.well-known` discovery); if it cannot,
217
260
  use the CLI commands instead.
218
261
 
262
+ ### `workspaces` — where you can work
263
+
264
+ ```bash
265
+ npx @animaapp/cli@latest workspaces
266
+ ```
267
+
268
+ Artifacts live in workspaces. You may have access to one or more of them, and
269
+ what you may do can differ between them: each row shows the capabilities you
270
+ hold there, and creating or changing an artifact needs `write`.
271
+
272
+ Workspace ids are opaque: get one here (each `list` row carries its own) for `--workspace`.
273
+ An empty list means your access reaches none of this team's workspaces — not
274
+ that the team has none.
275
+
276
+ ### `list` — the artifacts you can read
277
+
278
+ ```bash
279
+ npx @animaapp/cli@latest list
280
+ npx @animaapp/cli@latest list --workspace <id> # just one workspace
281
+ ```
282
+
283
+ Most-recently-updated first, so you can resume existing work instead of
284
+ creating a second artifact for the same job. It spans every workspace you can
285
+ read unless `--workspace` names one, and each row says which workspace it is
286
+ in. Each row carries its session id and `artifactUrl`; `--json` adds them to
287
+ every row.
288
+
219
289
  ### `create` — an artifact for your code, or AI-generated
220
290
 
221
291
  ```bash
222
292
  npx @animaapp/cli@latest create -t import --from ./my-project # import YOUR code (instant)
223
293
  npx @animaapp/cli@latest create -t import --from ./notes --artifact-type markdown # a readable document
294
+ npx @animaapp/cli@latest create-knowledge --name "Team knowledge" # server-provided template
295
+ npx @animaapp/cli@latest create-knowledge --name "Team knowledge" --workspace <id> # ...in a specific workspace
224
296
  npx @animaapp/cli@latest create -t empty --framework react --name "My project" # empty repo you push to (instant)
297
+ npx @animaapp/cli@latest create -t import --from ./my-project --workspace <id> # in a specific workspace
225
298
  npx @animaapp/cli@latest create -t p2c -p "Analytics dashboard with a sidebar"
226
299
  npx @animaapp/cli@latest create -t l2c -u https://stripe.com
227
300
  npx @animaapp/cli@latest create -t f2c --file-key <key> --nodes 42:15
301
+ npx @animaapp/cli@latest create -t p2c -p "Pricing page" --workspace <id> # any type takes --workspace
228
302
  npx @animaapp/cli@latest create -t import --from ./my-project --anonymous # no account — hand off later
229
303
  ```
230
304
 
@@ -235,6 +309,16 @@ or binary ones are zipped and uploaded via a presigned URL automatically.
235
309
  returned URL, add your code, and `git push`. Then `publish <sessionId>` for a
236
310
  live URL. The other types are AI generation (3–7 min).
237
311
 
312
+ **`create -t p2c|l2c|f2c` blocks for 3–7 minutes.** The generation itself is
313
+ asynchronous — the server starts a background job and answers immediately — but
314
+ the command waits it out for you, polling until the app is ready or failed. So
315
+ what `create` prints is a finished app, and a failed generation is a non-zero
316
+ exit rather than a link to nothing. Budget the wall-clock time, and keep the
317
+ default `--timeout` of `600000`.
318
+
319
+ Pass `--no-wait` to get the session id back in seconds instead and do the
320
+ waiting yourself with [`status --wait`](#status--did-generation-finish).
321
+
238
322
  `--artifact-type` is a separate question from `-t`: `-t` is how the repository
239
323
  starts, `--artifact-type` is what the artifact IS, and it decides how a human
240
324
  sees it. `app` is a running web page and needs an `index.html`; `markdown` is a
@@ -242,6 +326,14 @@ readable document and needs `.md` files. Omit it and the server infers one:
242
326
  markdown when your files are `.md`/`.mdx` with no HTML, otherwise app. Getting it wrong is the common mistake — `.md` files
243
327
  uploaded as an app produce an artifact with nothing to render.
244
328
 
329
+ Knowledge artifacts use the dedicated `create-knowledge` command instead of
330
+ generic `create`. It accepts an optional `--name` (maximum 120 characters) and
331
+ an optional `--workspace <id>`; the server-provided knowledge template supplies
332
+ the initial files and framework.
333
+ This command requires deployment of the server contract containing merged
334
+ AnimaApp/anima-design-to-code PR 5114. There is no compatibility fallback to
335
+ generic creation on older servers.
336
+
245
337
  | Option | Values | Default |
246
338
  |--------|--------|---------|
247
339
  | `-t, --type` | `import` (your code, with `--from`), `empty` (repo to push to), `p2c` (prompt), `l2c` (URL), `f2c` (Figma) | _required_ |
@@ -261,25 +353,151 @@ uploaded as an app produce an artifact with nothing to render.
261
353
  | `--language` | `typescript`, `javascript` | `typescript` (react) |
262
354
  | `--ui-library` | `shadcn`, `mui`, `antd`, `clean_react` | _(none)_ |
263
355
  | `--guidelines` | free text | _(p2c only)_ |
356
+ | `--no-wait` | Return as soon as generation starts, instead of waiting for the finished app | _off (create waits)_ |
357
+ | `--timeout <ms>` | How long to wait for generation | `600000` |
264
358
 
265
359
  ¹ The valid styling / UI-library set depends on `--type`; the server validates and
266
360
  returns a clear error for unsupported combinations.
267
361
 
362
+ ### `status` — did generation finish?
363
+
364
+ ```bash
365
+ npx @animaapp/cli@latest status <artifactUrl-or-sessionId> # a snapshot
366
+ npx @animaapp/cli@latest status <artifactUrl-or-sessionId> --wait # block until ready or failed
367
+ ```
368
+
369
+ Generation runs in the background, so this is how you learn it finished.
370
+ `create` already waits; reach for this after `create --no-wait`, or to pick a
371
+ wait back up after a timeout. `--wait` blocks until the artifact is `ready` or
372
+ `failed` (the underlying tool returns about every 45 seconds and this re-calls
373
+ it), and a `failed` status exits non-zero so a caller checking only the exit
374
+ code cannot mistake it for done.
375
+
376
+ | Option | Values | Default |
377
+ |--------|--------|---------|
378
+ | `--wait` | block until the artifact settles | off (snapshot) |
379
+ | `--timeout <ms>` | how long `--wait` may block | `600000` |
380
+
381
+ ### `explore` — read an artifact's files (no git)
382
+
383
+ ```bash
384
+ npx @animaapp/cli@latest explore <artifact> --search "buttonColor" # find the file
385
+ npx @animaapp/cli@latest explore <artifact> --read src/App.tsx # read it
386
+ npx @animaapp/cli@latest explore <artifact> --tree --path src # list a directory
387
+ npx @animaapp/cli@latest explore <artifact> --history # commits, newest first
388
+ ```
389
+
390
+ Needs no shell, no git and no network of its own. Start with `--search` when
391
+ you do not know which file to change, then `--read` the ones you will edit.
392
+ Every response carries `revision`, the artifact's current commit — pass it to
393
+ `edit --base-revision`.
394
+
395
+ | Option | Values | Default |
396
+ |--------|--------|---------|
397
+ | `--tree` / `--search <q>` / `--read <paths...>` / `--history` | exactly one is required | — |
398
+ | `--path <prefix>` | tree/search: a literal directory prefix (not a glob) | _(whole artifact)_ |
399
+ | `--range <start,end>` | read: 1-based inclusive line window, single file only | _(whole file)_ |
400
+ | `--revision <rev>` | see the artifact as it was at this commit | _(current)_ |
401
+ | `--regex`, `--case-sensitive` | search behaviour | off |
402
+ | `--include-excluded` | also search `node_modules`, `dist`, `build` | off |
403
+ | `--limit <n>` | maximum rows | _(server default)_ |
404
+ | `--cursor <c>` | history: continue after a previous response's `nextCursor` | — |
405
+
406
+ A file whose bytes are not text comes back as `asset: true` with its size and
407
+ mime instead of content, and an empty search reports what it skipped — check
408
+ `notSearched` before concluding the text is not there.
409
+
410
+ ### `edit` — change files and commit them (no git)
411
+
412
+ ```bash
413
+ # the shorthands
414
+ npx @animaapp/cli@latest edit <artifact> -m "Blue pill" --replace src/App.tsx --old "red" --new "blue"
415
+ npx @animaapp/cli@latest edit <artifact> -m "Add page" --write src/about.tsx --from-file ./about.tsx
416
+ npx @animaapp/cli@latest edit <artifact> -m "Drop dead code" --delete src/old.ts
417
+ npx @animaapp/cli@latest edit <artifact> -m "Rename" --move src/a.ts --to src/b.ts
418
+
419
+ # the general door: several operations, one commit
420
+ npx @animaapp/cli@latest edit <artifact> -m "Retheme" --changes '[
421
+ {"op":"str_replace","path":"src/App.tsx","oldText":"red","newText":"blue"},
422
+ {"op":"delete","path":"src/legacy.css"}
423
+ ]'
424
+ ```
425
+
426
+ Everything in one call lands as **one commit**: either every operation applies
427
+ or none does. The live artifact reflects it immediately.
428
+
429
+ | Option | Values | Default |
430
+ |--------|--------|---------|
431
+ | `-m, --message` | commit message | _required_ |
432
+ | `--base-revision <rev>` | the revision the edit applies to | _the current head_ |
433
+ | `--changes <json>` / `--changes-file <path>` | the full operation list | — |
434
+ | `--write <path>` + `--content <text>` / `--from-file <path>` | create or replace a file | — |
435
+ | `--delete <path>` | remove a file | — |
436
+ | `--move <path> --to <path>` | rename a file | — |
437
+ | `--replace <path> --old <text> --new <text>` `[--all]` | swap an exact snippet | — |
438
+
439
+ Without `--base-revision` the edit applies to the artifact's current head, read
440
+ immediately beforehand. Pass a revision from `explore` when you want to be told
441
+ about a concurrent change (`REVISION_CONFLICT`) rather than write over it.
442
+
443
+ `--move` does not rewrite imports — neither in the files importing the moved
444
+ module nor the relative imports inside it. Read the file first and send the
445
+ `str_replace` operations that fix them in the same commit.
446
+
447
+ ### `upload-asset` — add a large image, font or media file
448
+
449
+ ```bash
450
+ npx @animaapp/cli@latest upload-asset <artifact> ./hero.png --path public/hero.png -m "Add hero"
451
+ npx @animaapp/cli@latest upload-asset <artifact> ./hero.png # stage only; prints assetUploadId
452
+ ```
453
+
454
+ For files over 256 KB, which is the most `edit` takes inline. This stages the
455
+ upload, performs it, and — when `--path` says where the file belongs — commits
456
+ it in the same run. Files over 10 MB go through Git LFS automatically. Smaller
457
+ files need none of this: send them to `edit` directly.
458
+
459
+ ### `review` — the comments humans addressed to you
460
+
461
+ ```bash
462
+ npx @animaapp/cli@latest review list # everything addressed to you
463
+ npx @animaapp/cli@latest review list <artifact> # just this artifact
464
+ npx @animaapp/cli@latest review reply <commentId> -m "Which pill did you mean?"
465
+ npx @animaapp/cli@latest review resolve <commentId> --note "Left as-is: it matches the spec"
466
+ ```
467
+
468
+ A review is a batch of comments a human pinned to places in an artifact and
469
+ sent as one. Nothing pushes them to you, so `review list` is how the work
470
+ arrives — run it when a human says they left comments, and when starting work
471
+ on an artifact you have been reviewed on before.
472
+
473
+ Read the replies before acting: a reviewer can keep talking after sending, so
474
+ the comment body is where the request starts, not necessarily where it ends. A
475
+ comment marked `unassigned` was addressed to nobody in particular and is
476
+ anyone's to take.
477
+
478
+ To close comments, put the review's `resolveTrailer` lines in your commit
479
+ message — that records which commit resolved them. `review resolve` is for what
480
+ a commit cannot carry (a question answered, a change you decided against), and
481
+ `review reply` says something while leaving the comment **open**.
482
+
268
483
  ### `duplicate` — copy an existing artifact
269
484
 
270
485
  ```bash
271
486
  npx @animaapp/cli@latest duplicate <artifactUrl-or-sessionId>
272
487
  npx @animaapp/cli@latest duplicate <artifactUrl-or-sessionId> --name "My copy"
488
+ npx @animaapp/cli@latest duplicate <artifactUrl-or-sessionId> --workspace <id>
273
489
  ```
274
490
 
275
- Creates a new, independent artifact in the current team's Default workspace.
491
+ Creates a new, independent artifact in the workspace `--workspace` names, which
492
+ is optional when you can create in only one.
276
493
  It copies code, assets, and supported database content, but does **not** copy
277
494
  chat or custom domains. The source must be readable and the destination
278
495
  workspace must be writable. Without `--name`, the API names it
279
496
  `<source name> (Copy)`.
280
497
 
281
- The result includes the new and source session IDs, duplicate name,
282
- `playgroundUrl`, `previewUrl`, and API-provided next steps. Duplication is not
498
+ The result includes the new and source session IDs, the duplicate's name, its
499
+ `artifactUrl` (plus `playgroundUrl` and `previewUrl` when the copy is an app),
500
+ and API-provided next steps. Duplication is not
283
501
  idempotent: if a request times out or its response is lost, run `list` and check
284
502
  recent artifacts before retrying.
285
503
 
@@ -303,7 +521,7 @@ npx @animaapp/cli@latest codegen --file-key <key-or-url> --nodes 42:15 -o ./comp
303
521
  ### `publish` — deploy a session to a public URL (1–3 min)
304
522
 
305
523
  Publishing makes the app **public to the world**. Sharing usually
306
- doesn't need it — the artifact is already visible at its `playgroundUrl`.
524
+ doesn't need it — the artifact is already visible at its `artifactUrl`.
307
525
  **Agents:** only publish when the human explicitly asked for a public site;
308
526
  otherwise share that URL and offer publishing as a follow-up.
309
527
 
@@ -325,6 +543,17 @@ The inverse of `publish`: clears the live URL so the deployed site stops being
325
543
  reachable. The artifact, its code, and its content are untouched; publishing
326
544
  again reuses the same subdomain.
327
545
 
546
+ ### `delete` — hide an artifact with reversible soft deletion
547
+
548
+ ```bash
549
+ npx @animaapp/cli@latest delete <artifactUrl-or-sessionId>
550
+ ```
551
+
552
+ Run this only when deletion was explicitly requested. Published artifacts must
553
+ be unpublished first. The operation hides the artifact but is reversible and
554
+ does not remove its code, assets, history, database content, or domain
555
+ assignments; it never permanently deletes an artifact.
556
+
328
557
  ### `update` — rename or change visibility (metadata only)
329
558
 
330
559
  ```bash
@@ -333,28 +562,42 @@ npx @animaapp/cli@latest update <sessionId> --privacy public # anyone with th
333
562
  npx @animaapp/cli@latest update <sessionId> --privacy private # team only
334
563
  ```
335
564
 
336
- Never touches code or content — that's the git flow (`get-git-token`).
565
+ Never touches code or content — that's `edit` (or the git flow via
566
+ `get-git-token`).
337
567
 
338
568
  ### `get-git-token` — read/edit an artifact's code over git
339
569
 
340
570
  ```bash
341
- npx @animaapp/cli@latest get-git-token https://dev.animaapp.com/chat/<sessionId>
571
+ npx @animaapp/cli@latest get-git-token https://app.agentgrid.io/artifacts/<sessionId>
342
572
  ```
343
573
 
344
- An artifact **is** a git repository, and git is the only way to read or edit
345
- its code. This command mints a short-lived access token scoped to that one
346
- artifact and prints a ready-to-use remote URL — you run git yourself:
574
+ An artifact **is** a git repository. This command mints a short-lived access
575
+ token scoped to that one artifact and prints a ready-to-use remote URL — you
576
+ run git yourself:
347
577
 
348
578
  ```bash
349
579
  git clone <gitRemoteUrl> # read (and edit locally)
580
+ git config user.name … && git config user.email … # the identity the grant names
350
581
  git push # read-write access: updates the live artifact
351
582
  git remote set-url origin <new url> # after expiry: re-run get-git-token, re-point the clone
352
583
  ```
353
584
 
354
- In `--json` mode the output is `{ gitRemoteUrl, access: "ro"|"rw", expiresAt }`.
585
+ A read-write grant also names the `commitAuthor` your commits should carry —
586
+ the agent behind the credential, or the human. Run the printed `git config`
587
+ pair in the clone before committing: a fresh clone has no identity of its own,
588
+ so without it your pushes are attributed to whatever git identity this machine
589
+ happens to have.
590
+
591
+ In `--json` mode the output is `{ gitRemoteUrl, access: "ro"|"rw", expiresAt,
592
+ commitAuthor, gitConfigCommand }`.
355
593
  The token expires within an hour and cannot be renewed — treat the URL as a
356
594
  secret, and re-mint rather than store it.
357
595
 
596
+ Git is not the only door: `explore` and `edit` change the same repository with
597
+ no clone, no shell and no git binary. Reach for a checkout when that is what
598
+ the job actually needs — a large refactor, running the project, branches, or
599
+ rewriting history.
600
+
358
601
  ### `logout` — disconnect this machine
359
602
 
360
603
  ```bash
@@ -402,23 +645,29 @@ is `awaiting_claim` or `expired`, alongside the `artifactUrl` to re-send.
402
645
 
403
646
  ## Global flags
404
647
 
405
- Available on the network commands (`login`, `create`, `duplicate`, `codegen`,
406
- `publish`, `get-git-token`):
648
+ | Flag | Description | Available on |
649
+ |------|-------------|--------------|
650
+ | `--json` | Emit a single JSON object to stdout (for agents) | every command |
651
+ | `--api-url <url>` | API base URL — point at local or staging³ | every command except `config` |
652
+ | `--log-file <path>` | Append a JSON debug log of each step to a file | every command that reaches the network |
653
+ | `--verbose` | Stream progress to stderr in JSON mode¹ | `create`, `create-knowledge`, `status`, `duplicate`, `upload-asset`, `publish`, `unpublish`, `update`, `delete`, `codegen`, `get-git-token` |
654
+ | `--timeout <ms>` | How long to wait² | `create`, `status`, `codegen` |
655
+
656
+ ¹ Only the commands that do slow work carry a spinner, so `--verbose` is on
657
+ those. `explore`, `edit`, `list` and `review` are a single round trip and
658
+ report nothing in between.
659
+
660
+ ² Defaults to `600000` (10 min). On `create` and `status --wait` it is the
661
+ budget for the whole generation wait, not one request — don't lower it, since
662
+ generation takes minutes. Running out is a `TIMEOUT` exit that tells you the
663
+ job is still running and how to resume the wait.
407
664
 
408
- | Flag | Description | Default |
409
- |------|-------------|---------|
410
- | `--json` | Emit a single JSON object to stdout (for agents) | off (pretty in a TTY) |
411
- | `--verbose` | Stream progress to stderr in JSON mode¹ | off |
412
- | `--api-url <url>` | API base URL (point at local/staging)³ | `https://api.agentgrid.io` |
413
- | `--log-file <path>` | Append a JSON debug log of each step to a file | off |
414
- | `--timeout <ms>` | Request timeout² | `600000` (10 min) |
665
+ ³ Falls back to `ANIMA_API_URL`, then `anima config set api-url`, then
666
+ `https://api.agentgrid.io`. Set it once with `config` instead of passing
667
+ `--api-url` every time.
415
668
 
416
- ¹ `--verbose` applies to `create` / `duplicate` / `codegen` / `publish` /
417
- `get-git-token`.
418
- ² `--timeout` applies to `create` / `codegen`. Don't lower it — generation takes
419
- minutes.
420
- ³ Falls back to `ANIMA_API_URL`, then `anima config set api-url`, then the
421
- default. Set it once with `config` instead of passing `--api-url` every time.
669
+ **Environment variables:** `ANIMA_API_URL`, `ANIMA_LOG_FILE`, and `FIGMA_TOKEN`
670
+ for `codegen` / `create -t f2c`.
422
671
 
423
672
  ---
424
673
 
@@ -430,7 +679,7 @@ default. Set it once with `config` instead of passing `--api-url` every time.
430
679
  a clean, parseable result.
431
680
 
432
681
  ```bash
433
- npx @animaapp/cli@latest create -t p2c -p "dashboard" --json 2>/dev/null | jq .playgroundUrl
682
+ npx @animaapp/cli@latest create -t p2c -p "dashboard" --json 2>/dev/null | jq -r .artifactUrl
434
683
  ```
435
684
 
436
685
  ---
@@ -446,7 +695,8 @@ npx @animaapp/cli@latest login --log-file ./anima-debug.log
446
695
  ```
447
696
 
448
697
  **`HTTP 404` on `login`** means the API at `--api-url` doesn't have the device
449
- grant deployed. Point at an API that does (`--api-url`) or use `ANIMA_API_TOKEN`.
698
+ grant deployed. Point at an API that does with `--api-url`, or connect with
699
+ `login --invite` instead.
450
700
 
451
701
  ---
452
702