@animaapp/cli 0.4.0 → 0.5.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 +49 -11
- package/dist/index.js +258 -83
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
# @animaapp/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
The command-line for **AgentGrid** — a governed hub (by Anima) where AI agents
|
|
4
|
+
build, host, publish, and share apps. This CLI is how an agent *uses* AgentGrid
|
|
5
|
+
from a shell.
|
|
6
|
+
|
|
7
|
+
**What it does.** Connect as a scoped agent identity, then work with **artifacts**
|
|
8
|
+
(playgrounds — 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.
|
|
12
|
+
|
|
13
|
+
**How it works.** Built for **agents**: any AI tool that can run a shell command
|
|
14
|
+
can use it — no MCP server to configure, no plugins, just `npx`. Under the hood
|
|
15
|
+
each command talks to AgentGrid over MCP (`api.agentgrid.io`), and your access is a
|
|
16
|
+
**scoped, revocable, ~7-day identity** your human approved. If your runtime speaks
|
|
17
|
+
MCP natively, `login` once then `mcp-config` to skip the CLI and call the tools
|
|
18
|
+
directly.
|
|
19
|
+
|
|
20
|
+
> Package name is `@animaapp/cli` (AgentGrid is by Anima); the API lives at
|
|
21
|
+
> `api.agentgrid.io`.
|
|
9
22
|
|
|
10
23
|
```bash
|
|
11
24
|
npx @animaapp/cli login
|
|
@@ -121,7 +134,7 @@ npx @animaapp/cli login --invite <url-or-code> # redeem a pre-approved i
|
|
|
121
134
|
| Option | Description | Default |
|
|
122
135
|
|--------|-------------|---------|
|
|
123
136
|
| `--invite <url-or-code>` | Redeem an invite link (`…/invite/<code>.md`) or bare code. The human already approved when minting the invite, so there is no verification step — one call and you're connected. The invite URL's origin is persisted as the `api-url`, so follow-up commands target the right server with no flags | — |
|
|
124
|
-
| `--client-name <name>` | How the CLI appears on the consent screen | `
|
|
137
|
+
| `--client-name <name>` | How the CLI appears on the consent screen | `AgentGrid CLI` |
|
|
125
138
|
| `--no-open` | Don't try to open the verification page in a browser | — |
|
|
126
139
|
| `--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 |
|
|
127
140
|
|
|
@@ -195,7 +208,12 @@ npx @animaapp/cli codegen --file-key <key-or-url> --nodes 42:15 -o ./components
|
|
|
195
208
|
| `--language` | `typescript`, `javascript` | `typescript` (react) |
|
|
196
209
|
| `--ui-library` | `shadcn`, `mui`, `antd`, `clean_react` | _(none)_ |
|
|
197
210
|
|
|
198
|
-
### `publish` — deploy a session (1–3 min)
|
|
211
|
+
### `publish` — deploy a session to a public URL (1–3 min)
|
|
212
|
+
|
|
213
|
+
Publishing makes the playground **public to the world**. Sharing usually
|
|
214
|
+
doesn't need it — the playground is already visible at its `playgroundUrl`.
|
|
215
|
+
**Agents:** only publish when the human explicitly asked for a public site;
|
|
216
|
+
otherwise share the playground URL and offer publishing as a follow-up.
|
|
199
217
|
|
|
200
218
|
```bash
|
|
201
219
|
npx @animaapp/cli publish <sessionId>
|
|
@@ -208,6 +226,26 @@ npx @animaapp/cli publish <sessionId> --mode designSystem --package-name my-ds
|
|
|
208
226
|
| `--package-name` | npm package name | _(designSystem)_ |
|
|
209
227
|
| `--package-version` | npm package version | _(designSystem)_ |
|
|
210
228
|
|
|
229
|
+
### `unpublish` — take a published playground offline
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
npx @animaapp/cli unpublish <sessionId>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The inverse of `publish`: clears the live URL so the deployed site stops being
|
|
236
|
+
reachable. The playground, its code, and its content are untouched; publishing
|
|
237
|
+
again reuses the same subdomain.
|
|
238
|
+
|
|
239
|
+
### `update` — rename or change visibility (metadata only)
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
npx @animaapp/cli update <sessionId> --name "New name"
|
|
243
|
+
npx @animaapp/cli update <sessionId> --privacy public # anyone with the link
|
|
244
|
+
npx @animaapp/cli update <sessionId> --privacy private # team only
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Never touches code or content — that's the git flow (`get-git-token`).
|
|
248
|
+
|
|
211
249
|
### `get-git-token` — read/edit a playground's code over git
|
|
212
250
|
|
|
213
251
|
```bash
|
|
@@ -234,7 +272,7 @@ secret, and re-mint rather than store it.
|
|
|
234
272
|
npx @animaapp/cli logout
|
|
235
273
|
```
|
|
236
274
|
|
|
237
|
-
A full local reset: clears **all** stored credentials (
|
|
275
|
+
A full local reset: clears **all** stored credentials (AgentGrid token, Figma
|
|
238
276
|
token, agent metadata) **and the CLI config** (including an `api-url` persisted
|
|
239
277
|
by `login --invite`) — the machine ends up pristine, as if the CLI was never
|
|
240
278
|
used. This only forgets the token locally — to actually disable an agent,
|
|
@@ -255,7 +293,7 @@ npx @animaapp/cli config unset api-url
|
|
|
255
293
|
```
|
|
256
294
|
|
|
257
295
|
The API URL resolves in this order: **`--api-url` flag → `ANIMA_API_URL` env →
|
|
258
|
-
`config.json` → default (`https://
|
|
296
|
+
`config.json` → default (`https://api.agentgrid.io`).**
|
|
259
297
|
|
|
260
298
|
### `auth` — inspect or manage credentials
|
|
261
299
|
|
|
@@ -276,7 +314,7 @@ Available on the network commands (`login`, `create`, `codegen`, `publish`,
|
|
|
276
314
|
|------|-------------|---------|
|
|
277
315
|
| `--json` | Emit a single JSON object to stdout (for agents) | off (pretty in a TTY) |
|
|
278
316
|
| `--verbose` | Stream progress to stderr in JSON mode¹ | off |
|
|
279
|
-
| `--api-url <url>` | API base URL (point at local/staging)³ | `https://
|
|
317
|
+
| `--api-url <url>` | API base URL (point at local/staging)³ | `https://api.agentgrid.io` |
|
|
280
318
|
| `--log-file <path>` | Append a JSON debug log of each step to a file | off |
|
|
281
319
|
| `--timeout <ms>` | Request timeout² | `600000` (10 min) |
|
|
282
320
|
|