@animaapp/cli 0.7.1 → 0.8.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 +273 -56
- package/dist/index.js +1065 -124
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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.
|
|
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
|
|
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
|
-
|
|
|
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,63 @@ says so rather than polling forever.
|
|
|
159
146
|
# 1. Connect (once)
|
|
160
147
|
npx @animaapp/cli@latest login
|
|
161
148
|
|
|
162
|
-
# 2.
|
|
163
|
-
npx @animaapp/cli@latest create -t
|
|
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
|
-
#
|
|
176
|
-
npx @animaapp/cli@latest
|
|
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** | [`list`](#list--your-teams-artifacts) | Your team's artifacts, most-recently-updated first |
|
|
191
|
+
| **Make** | [`create`](#create--an-artifact-for-your-code-or-ai-generated) | Import your code, an empty repo, or AI generation |
|
|
192
|
+
| | [`status`](#status--did-generation-finish) | Did generation finish? `--wait` blocks until it has |
|
|
193
|
+
| | [`duplicate`](#duplicate--copy-an-existing-artifact) | Copy an artifact into a new, independent one |
|
|
194
|
+
| **Change** | [`explore`](#explore--read-an-artifacts-files-no-git) | Read files: list, search, read, history |
|
|
195
|
+
| | [`edit`](#edit--change-files-and-commit-them-no-git) | Change files and commit them — one commit |
|
|
196
|
+
| | [`upload-asset`](#upload-asset--add-a-large-image-font-or-media-file) | Add an image, font or media file over 256 KB |
|
|
197
|
+
| | [`get-git-token`](#get-git-token--readedit-an-artifacts-code-over-git) | Mint git access for a real checkout |
|
|
198
|
+
| **Collaborate** | [`review`](#review--the-comments-humans-addressed-to-you) | Read and answer the comments humans left you |
|
|
199
|
+
| **Ship** | [`publish`](#publish--deploy-a-session-to-a-public-url-13-min) | Deploy to a public live URL — only when asked |
|
|
200
|
+
| | [`unpublish`](#unpublish--take-a-published-artifact-offline) | Take a published artifact offline |
|
|
201
|
+
| | [`update`](#update--rename-or-change-visibility-metadata-only) | Rename, or change visibility |
|
|
202
|
+
| | [`delete`](#delete--hide-an-artifact-with-reversible-soft-deletion) | Reversible soft deletion |
|
|
203
|
+
| **Figma** | [`codegen`](#codegen--figma-to-local-files-no-artifact) | Figma → local code files, no artifact |
|
|
204
|
+
| **Settings** | [`config`](#config--store-cli-preferences) | Store CLI preferences (e.g. a default API URL) |
|
|
205
|
+
|
|
183
206
|
### `login` — connect this machine
|
|
184
207
|
|
|
185
208
|
```bash
|
|
@@ -200,6 +223,24 @@ npx @animaapp/cli@latest login --handoff <token> # ...or name the t
|
|
|
200
223
|
| `--no-open` | Don't try to open the verification page in a browser | — |
|
|
201
224
|
| `--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
225
|
|
|
226
|
+
### `skill` — install the AgentGrid guide for your agent
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npx @animaapp/cli@latest skill .claude/skills/agentgrid/SKILL.md # write it
|
|
230
|
+
npx @animaapp/cli@latest skill # or print it
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Writes a `SKILL.md` at the path you give — the whole AgentGrid flow, so an
|
|
234
|
+
agent reading it knows how to connect, create, change, review and publish
|
|
235
|
+
without being told. Parent directories are created; re-running overwrites.
|
|
236
|
+
|
|
237
|
+
The prose is **fetched from the API** (`/guide.md`), so it does not go stale in
|
|
238
|
+
an installed package, while the command reference inside it is generated from
|
|
239
|
+
this CLI's own commands — meaning the syntax it shows is the syntax your
|
|
240
|
+
version accepts. No credential needed: the guide is public.
|
|
241
|
+
|
|
242
|
+
Point `--api-url` at another environment to install that one's guide.
|
|
243
|
+
|
|
203
244
|
### `mcp-config` — print your MCP server config
|
|
204
245
|
|
|
205
246
|
```bash
|
|
@@ -216,6 +257,16 @@ authorize when it prompts. No CLI in the loop after that. Your client needs to
|
|
|
216
257
|
support OAuth for remote MCP servers (`.well-known` discovery); if it cannot,
|
|
217
258
|
use the CLI commands instead.
|
|
218
259
|
|
|
260
|
+
### `list` — your team's artifacts
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
npx @animaapp/cli@latest list
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Most-recently-updated first, so you can resume existing work instead of
|
|
267
|
+
creating a second artifact for the same job. Each row carries its session id
|
|
268
|
+
and `artifactUrl`; `--json` adds them to every row.
|
|
269
|
+
|
|
219
270
|
### `create` — an artifact for your code, or AI-generated
|
|
220
271
|
|
|
221
272
|
```bash
|
|
@@ -235,6 +286,16 @@ or binary ones are zipped and uploaded via a presigned URL automatically.
|
|
|
235
286
|
returned URL, add your code, and `git push`. Then `publish <sessionId>` for a
|
|
236
287
|
live URL. The other types are AI generation (3–7 min).
|
|
237
288
|
|
|
289
|
+
**`create -t p2c|l2c|f2c` blocks for 3–7 minutes.** The generation itself is
|
|
290
|
+
asynchronous — the server starts a background job and answers immediately — but
|
|
291
|
+
the command waits it out for you, polling until the app is ready or failed. So
|
|
292
|
+
what `create` prints is a finished app, and a failed generation is a non-zero
|
|
293
|
+
exit rather than a link to nothing. Budget the wall-clock time, and keep the
|
|
294
|
+
default `--timeout` of `600000`.
|
|
295
|
+
|
|
296
|
+
Pass `--no-wait` to get the session id back in seconds instead and do the
|
|
297
|
+
waiting yourself with [`status --wait`](#status--did-generation-finish).
|
|
298
|
+
|
|
238
299
|
`--artifact-type` is a separate question from `-t`: `-t` is how the repository
|
|
239
300
|
starts, `--artifact-type` is what the artifact IS, and it decides how a human
|
|
240
301
|
sees it. `app` is a running web page and needs an `index.html`; `markdown` is a
|
|
@@ -261,10 +322,133 @@ uploaded as an app produce an artifact with nothing to render.
|
|
|
261
322
|
| `--language` | `typescript`, `javascript` | `typescript` (react) |
|
|
262
323
|
| `--ui-library` | `shadcn`, `mui`, `antd`, `clean_react` | _(none)_ |
|
|
263
324
|
| `--guidelines` | free text | _(p2c only)_ |
|
|
325
|
+
| `--no-wait` | Return as soon as generation starts, instead of waiting for the finished app | _off (create waits)_ |
|
|
326
|
+
| `--timeout <ms>` | How long to wait for generation | `600000` |
|
|
264
327
|
|
|
265
328
|
¹ The valid styling / UI-library set depends on `--type`; the server validates and
|
|
266
329
|
returns a clear error for unsupported combinations.
|
|
267
330
|
|
|
331
|
+
### `status` — did generation finish?
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
npx @animaapp/cli@latest status <artifactUrl-or-sessionId> # a snapshot
|
|
335
|
+
npx @animaapp/cli@latest status <artifactUrl-or-sessionId> --wait # block until ready or failed
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Generation runs in the background, so this is how you learn it finished.
|
|
339
|
+
`create` already waits; reach for this after `create --no-wait`, or to pick a
|
|
340
|
+
wait back up after a timeout. `--wait` blocks until the artifact is `ready` or
|
|
341
|
+
`failed` (the underlying tool returns about every 45 seconds and this re-calls
|
|
342
|
+
it), and a `failed` status exits non-zero so a caller checking only the exit
|
|
343
|
+
code cannot mistake it for done.
|
|
344
|
+
|
|
345
|
+
| Option | Values | Default |
|
|
346
|
+
|--------|--------|---------|
|
|
347
|
+
| `--wait` | block until the artifact settles | off (snapshot) |
|
|
348
|
+
| `--timeout <ms>` | how long `--wait` may block | `600000` |
|
|
349
|
+
|
|
350
|
+
### `explore` — read an artifact's files (no git)
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
npx @animaapp/cli@latest explore <artifact> --search "buttonColor" # find the file
|
|
354
|
+
npx @animaapp/cli@latest explore <artifact> --read src/App.tsx # read it
|
|
355
|
+
npx @animaapp/cli@latest explore <artifact> --tree --path src # list a directory
|
|
356
|
+
npx @animaapp/cli@latest explore <artifact> --history # commits, newest first
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
Needs no shell, no git and no network of its own. Start with `--search` when
|
|
360
|
+
you do not know which file to change, then `--read` the ones you will edit.
|
|
361
|
+
Every response carries `revision`, the artifact's current commit — pass it to
|
|
362
|
+
`edit --base-revision`.
|
|
363
|
+
|
|
364
|
+
| Option | Values | Default |
|
|
365
|
+
|--------|--------|---------|
|
|
366
|
+
| `--tree` / `--search <q>` / `--read <paths...>` / `--history` | exactly one is required | — |
|
|
367
|
+
| `--path <prefix>` | tree/search: a literal directory prefix (not a glob) | _(whole artifact)_ |
|
|
368
|
+
| `--range <start,end>` | read: 1-based inclusive line window, single file only | _(whole file)_ |
|
|
369
|
+
| `--revision <rev>` | see the artifact as it was at this commit | _(current)_ |
|
|
370
|
+
| `--regex`, `--case-sensitive` | search behaviour | off |
|
|
371
|
+
| `--include-excluded` | also search `node_modules`, `dist`, `build` | off |
|
|
372
|
+
| `--limit <n>` | maximum rows | _(server default)_ |
|
|
373
|
+
| `--cursor <c>` | history: continue after a previous response's `nextCursor` | — |
|
|
374
|
+
|
|
375
|
+
A file whose bytes are not text comes back as `asset: true` with its size and
|
|
376
|
+
mime instead of content, and an empty search reports what it skipped — check
|
|
377
|
+
`notSearched` before concluding the text is not there.
|
|
378
|
+
|
|
379
|
+
### `edit` — change files and commit them (no git)
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
# the shorthands
|
|
383
|
+
npx @animaapp/cli@latest edit <artifact> -m "Blue pill" --replace src/App.tsx --old "red" --new "blue"
|
|
384
|
+
npx @animaapp/cli@latest edit <artifact> -m "Add page" --write src/about.tsx --from-file ./about.tsx
|
|
385
|
+
npx @animaapp/cli@latest edit <artifact> -m "Drop dead code" --delete src/old.ts
|
|
386
|
+
npx @animaapp/cli@latest edit <artifact> -m "Rename" --move src/a.ts --to src/b.ts
|
|
387
|
+
|
|
388
|
+
# the general door: several operations, one commit
|
|
389
|
+
npx @animaapp/cli@latest edit <artifact> -m "Retheme" --changes '[
|
|
390
|
+
{"op":"str_replace","path":"src/App.tsx","oldText":"red","newText":"blue"},
|
|
391
|
+
{"op":"delete","path":"src/legacy.css"}
|
|
392
|
+
]'
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
Everything in one call lands as **one commit**: either every operation applies
|
|
396
|
+
or none does. The live artifact reflects it immediately.
|
|
397
|
+
|
|
398
|
+
| Option | Values | Default |
|
|
399
|
+
|--------|--------|---------|
|
|
400
|
+
| `-m, --message` | commit message | _required_ |
|
|
401
|
+
| `--base-revision <rev>` | the revision the edit applies to | _the current head_ |
|
|
402
|
+
| `--changes <json>` / `--changes-file <path>` | the full operation list | — |
|
|
403
|
+
| `--write <path>` + `--content <text>` / `--from-file <path>` | create or replace a file | — |
|
|
404
|
+
| `--delete <path>` | remove a file | — |
|
|
405
|
+
| `--move <path> --to <path>` | rename a file | — |
|
|
406
|
+
| `--replace <path> --old <text> --new <text>` `[--all]` | swap an exact snippet | — |
|
|
407
|
+
|
|
408
|
+
Without `--base-revision` the edit applies to the artifact's current head, read
|
|
409
|
+
immediately beforehand. Pass a revision from `explore` when you want to be told
|
|
410
|
+
about a concurrent change (`REVISION_CONFLICT`) rather than write over it.
|
|
411
|
+
|
|
412
|
+
`--move` does not rewrite imports — neither in the files importing the moved
|
|
413
|
+
module nor the relative imports inside it. Read the file first and send the
|
|
414
|
+
`str_replace` operations that fix them in the same commit.
|
|
415
|
+
|
|
416
|
+
### `upload-asset` — add a large image, font or media file
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
npx @animaapp/cli@latest upload-asset <artifact> ./hero.png --path public/hero.png -m "Add hero"
|
|
420
|
+
npx @animaapp/cli@latest upload-asset <artifact> ./hero.png # stage only; prints assetUploadId
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
For files over 256 KB, which is the most `edit` takes inline. This stages the
|
|
424
|
+
upload, performs it, and — when `--path` says where the file belongs — commits
|
|
425
|
+
it in the same run. Files over 10 MB go through Git LFS automatically. Smaller
|
|
426
|
+
files need none of this: send them to `edit` directly.
|
|
427
|
+
|
|
428
|
+
### `review` — the comments humans addressed to you
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
npx @animaapp/cli@latest review list # everything addressed to you
|
|
432
|
+
npx @animaapp/cli@latest review list <artifact> # just this artifact
|
|
433
|
+
npx @animaapp/cli@latest review reply <commentId> -m "Which pill did you mean?"
|
|
434
|
+
npx @animaapp/cli@latest review resolve <commentId> --note "Left as-is: it matches the spec"
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
A review is a batch of comments a human pinned to places in an artifact and
|
|
438
|
+
sent as one. Nothing pushes them to you, so `review list` is how the work
|
|
439
|
+
arrives — run it when a human says they left comments, and when starting work
|
|
440
|
+
on an artifact you have been reviewed on before.
|
|
441
|
+
|
|
442
|
+
Read the replies before acting: a reviewer can keep talking after sending, so
|
|
443
|
+
the comment body is where the request starts, not necessarily where it ends. A
|
|
444
|
+
comment marked `unassigned` was addressed to nobody in particular and is
|
|
445
|
+
anyone's to take.
|
|
446
|
+
|
|
447
|
+
To close comments, put the review's `resolveTrailer` lines in your commit
|
|
448
|
+
message — that records which commit resolved them. `review resolve` is for what
|
|
449
|
+
a commit cannot carry (a question answered, a change you decided against), and
|
|
450
|
+
`review reply` says something while leaving the comment **open**.
|
|
451
|
+
|
|
268
452
|
### `duplicate` — copy an existing artifact
|
|
269
453
|
|
|
270
454
|
```bash
|
|
@@ -278,8 +462,9 @@ chat or custom domains. The source must be readable and the destination
|
|
|
278
462
|
workspace must be writable. Without `--name`, the API names it
|
|
279
463
|
`<source name> (Copy)`.
|
|
280
464
|
|
|
281
|
-
The result includes the new and source session IDs, duplicate name,
|
|
282
|
-
`
|
|
465
|
+
The result includes the new and source session IDs, the duplicate's name, its
|
|
466
|
+
`artifactUrl` (plus `playgroundUrl` and `previewUrl` when the copy is an app),
|
|
467
|
+
and API-provided next steps. Duplication is not
|
|
283
468
|
idempotent: if a request times out or its response is lost, run `list` and check
|
|
284
469
|
recent artifacts before retrying.
|
|
285
470
|
|
|
@@ -303,7 +488,7 @@ npx @animaapp/cli@latest codegen --file-key <key-or-url> --nodes 42:15 -o ./comp
|
|
|
303
488
|
### `publish` — deploy a session to a public URL (1–3 min)
|
|
304
489
|
|
|
305
490
|
Publishing makes the app **public to the world**. Sharing usually
|
|
306
|
-
doesn't need it — the artifact is already visible at its `
|
|
491
|
+
doesn't need it — the artifact is already visible at its `artifactUrl`.
|
|
307
492
|
**Agents:** only publish when the human explicitly asked for a public site;
|
|
308
493
|
otherwise share that URL and offer publishing as a follow-up.
|
|
309
494
|
|
|
@@ -325,6 +510,17 @@ The inverse of `publish`: clears the live URL so the deployed site stops being
|
|
|
325
510
|
reachable. The artifact, its code, and its content are untouched; publishing
|
|
326
511
|
again reuses the same subdomain.
|
|
327
512
|
|
|
513
|
+
### `delete` — hide an artifact with reversible soft deletion
|
|
514
|
+
|
|
515
|
+
```bash
|
|
516
|
+
npx @animaapp/cli@latest delete <artifactUrl-or-sessionId>
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
Run this only when deletion was explicitly requested. Published artifacts must
|
|
520
|
+
be unpublished first. The operation hides the artifact but is reversible and
|
|
521
|
+
does not remove its code, assets, history, database content, or domain
|
|
522
|
+
assignments; it never permanently deletes an artifact.
|
|
523
|
+
|
|
328
524
|
### `update` — rename or change visibility (metadata only)
|
|
329
525
|
|
|
330
526
|
```bash
|
|
@@ -333,28 +529,42 @@ npx @animaapp/cli@latest update <sessionId> --privacy public # anyone with th
|
|
|
333
529
|
npx @animaapp/cli@latest update <sessionId> --privacy private # team only
|
|
334
530
|
```
|
|
335
531
|
|
|
336
|
-
Never touches code or content — that's the git flow
|
|
532
|
+
Never touches code or content — that's `edit` (or the git flow via
|
|
533
|
+
`get-git-token`).
|
|
337
534
|
|
|
338
535
|
### `get-git-token` — read/edit an artifact's code over git
|
|
339
536
|
|
|
340
537
|
```bash
|
|
341
|
-
npx @animaapp/cli@latest get-git-token https://
|
|
538
|
+
npx @animaapp/cli@latest get-git-token https://app.agentgrid.io/artifacts/<sessionId>
|
|
342
539
|
```
|
|
343
540
|
|
|
344
|
-
An artifact **is** a git repository
|
|
345
|
-
|
|
346
|
-
|
|
541
|
+
An artifact **is** a git repository. This command mints a short-lived access
|
|
542
|
+
token scoped to that one artifact and prints a ready-to-use remote URL — you
|
|
543
|
+
run git yourself:
|
|
347
544
|
|
|
348
545
|
```bash
|
|
349
546
|
git clone <gitRemoteUrl> # read (and edit locally)
|
|
547
|
+
git config user.name … && git config user.email … # the identity the grant names
|
|
350
548
|
git push # read-write access: updates the live artifact
|
|
351
549
|
git remote set-url origin <new url> # after expiry: re-run get-git-token, re-point the clone
|
|
352
550
|
```
|
|
353
551
|
|
|
354
|
-
|
|
552
|
+
A read-write grant also names the `commitAuthor` your commits should carry —
|
|
553
|
+
the agent behind the credential, or the human. Run the printed `git config`
|
|
554
|
+
pair in the clone before committing: a fresh clone has no identity of its own,
|
|
555
|
+
so without it your pushes are attributed to whatever git identity this machine
|
|
556
|
+
happens to have.
|
|
557
|
+
|
|
558
|
+
In `--json` mode the output is `{ gitRemoteUrl, access: "ro"|"rw", expiresAt,
|
|
559
|
+
commitAuthor, gitConfigCommand }`.
|
|
355
560
|
The token expires within an hour and cannot be renewed — treat the URL as a
|
|
356
561
|
secret, and re-mint rather than store it.
|
|
357
562
|
|
|
563
|
+
Git is not the only door: `explore` and `edit` change the same repository with
|
|
564
|
+
no clone, no shell and no git binary. Reach for a checkout when that is what
|
|
565
|
+
the job actually needs — a large refactor, running the project, branches, or
|
|
566
|
+
rewriting history.
|
|
567
|
+
|
|
358
568
|
### `logout` — disconnect this machine
|
|
359
569
|
|
|
360
570
|
```bash
|
|
@@ -402,23 +612,29 @@ is `awaiting_claim` or `expired`, alongside the `artifactUrl` to re-send.
|
|
|
402
612
|
|
|
403
613
|
## Global flags
|
|
404
614
|
|
|
405
|
-
|
|
406
|
-
|
|
615
|
+
| Flag | Description | Available on |
|
|
616
|
+
|------|-------------|--------------|
|
|
617
|
+
| `--json` | Emit a single JSON object to stdout (for agents) | every command |
|
|
618
|
+
| `--api-url <url>` | API base URL — point at local or staging³ | every command except `config` |
|
|
619
|
+
| `--log-file <path>` | Append a JSON debug log of each step to a file | every command that reaches the network |
|
|
620
|
+
| `--verbose` | Stream progress to stderr in JSON mode¹ | `create`, `status`, `duplicate`, `upload-asset`, `publish`, `unpublish`, `update`, `delete`, `codegen`, `get-git-token` |
|
|
621
|
+
| `--timeout <ms>` | How long to wait² | `create`, `status`, `codegen` |
|
|
622
|
+
|
|
623
|
+
¹ Only the commands that do slow work carry a spinner, so `--verbose` is on
|
|
624
|
+
those. `explore`, `edit`, `list` and `review` are a single round trip and
|
|
625
|
+
report nothing in between.
|
|
626
|
+
|
|
627
|
+
² Defaults to `600000` (10 min). On `create` and `status --wait` it is the
|
|
628
|
+
budget for the whole generation wait, not one request — don't lower it, since
|
|
629
|
+
generation takes minutes. Running out is a `TIMEOUT` exit that tells you the
|
|
630
|
+
job is still running and how to resume the wait.
|
|
407
631
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
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) |
|
|
632
|
+
³ Falls back to `ANIMA_API_URL`, then `anima config set api-url`, then
|
|
633
|
+
`https://api.agentgrid.io`. Set it once with `config` instead of passing
|
|
634
|
+
`--api-url` every time.
|
|
415
635
|
|
|
416
|
-
|
|
417
|
-
`
|
|
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.
|
|
636
|
+
**Environment variables:** `ANIMA_API_URL`, `ANIMA_LOG_FILE`, and `FIGMA_TOKEN`
|
|
637
|
+
for `codegen` / `create -t f2c`.
|
|
422
638
|
|
|
423
639
|
---
|
|
424
640
|
|
|
@@ -430,7 +646,7 @@ default. Set it once with `config` instead of passing `--api-url` every time.
|
|
|
430
646
|
a clean, parseable result.
|
|
431
647
|
|
|
432
648
|
```bash
|
|
433
|
-
npx @animaapp/cli@latest create -t p2c -p "dashboard" --json 2>/dev/null | jq .
|
|
649
|
+
npx @animaapp/cli@latest create -t p2c -p "dashboard" --json 2>/dev/null | jq -r .artifactUrl
|
|
434
650
|
```
|
|
435
651
|
|
|
436
652
|
---
|
|
@@ -446,7 +662,8 @@ npx @animaapp/cli@latest login --log-file ./anima-debug.log
|
|
|
446
662
|
```
|
|
447
663
|
|
|
448
664
|
**`HTTP 404` on `login`** means the API at `--api-url` doesn't have the device
|
|
449
|
-
grant deployed. Point at an API that does
|
|
665
|
+
grant deployed. Point at an API that does with `--api-url`, or connect with
|
|
666
|
+
`login --invite` instead.
|
|
450
667
|
|
|
451
668
|
---
|
|
452
669
|
|