@dodi-education/cli 0.0.0-stage → 0.2.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/LICENSE +661 -0
- package/README.md +98 -2
- package/dist/chunk-DOOTVCQI.js +19247 -0
- package/dist/chunk-LMSPDGSC.js +40 -0
- package/dist/de-JLZ2OZTF.js +1616 -0
- package/dist/dodi.js +32354 -0
- package/dist/en-ZDFMS73L.js +1616 -0
- package/dist/index.umd-MIHLDV5V.js +2358 -0
- package/dist/renderer-PBTE4WAZ.js +444 -0
- package/package.json +79 -3
package/README.md
CHANGED
|
@@ -1,3 +1,99 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dodi CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Let your own AI agent make learning games for your family on
|
|
4
|
+
[dodi](https://app.dodi.app), the way you would in Game Studio: your agent
|
|
5
|
+
describes the game and reviews it, and dodi's own game agent builds it with
|
|
6
|
+
your AI providers (background and preview pictures, a visual check and
|
|
7
|
+
translations included). Works with any agent that can run shell commands
|
|
8
|
+
(Claude Code, Cursor, Codex, a local model) or speak MCP.
|
|
9
|
+
|
|
10
|
+
Everything the agent uploads is sealed on its machine under your family's
|
|
11
|
+
vault key. The dodi server never sees your games or your kids' details.
|
|
12
|
+
|
|
13
|
+
## For parents
|
|
14
|
+
|
|
15
|
+
Tell your agent:
|
|
16
|
+
|
|
17
|
+
> Build a learning game for my kid on dodi.app with the dodi CLI (needs Node
|
|
18
|
+
> 20+). Install it with `npm install -g @dodi-education/cli`, run `dodi login`
|
|
19
|
+
> and send me the link it prints so I can allow access, then read `dodi docs`
|
|
20
|
+
> and follow it: you brief dodi's game agent and review what it builds.
|
|
21
|
+
|
|
22
|
+
The link opens **Allow access** in the dodi app. Check that the fingerprint
|
|
23
|
+
matches what your agent shows, choose what it may do and for how long, and
|
|
24
|
+
allow it. **Settings > Access** lists every browser, app,
|
|
25
|
+
robot and agent that can open your family's data; revoke any of them there.
|
|
26
|
+
|
|
27
|
+
Scopes you can grant:
|
|
28
|
+
|
|
29
|
+
| Scope | Lets the agent |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `studio` | build with your AI providers: your keys for the game, image and thinking models are handed to the agent's machine (never the voice key), and builds are charged to those accounts |
|
|
32
|
+
| `games` | create and edit your family's games |
|
|
33
|
+
| `games:publish` | submit games to dodi Discover (reviewed before they go live) |
|
|
34
|
+
| `kids:basic` | see your kids' first names and ages |
|
|
35
|
+
| `kids:memory` | read a kid's memory and your notes, so games fit (off by default: the agent's AI provider reads them) |
|
|
36
|
+
| `assets` | create custom companion avatars and accessories |
|
|
37
|
+
| `assets:publish` | share avatars and accessories on dodi Discover |
|
|
38
|
+
|
|
39
|
+
For an agent that runs unattended, create an **access key** in Settings >
|
|
40
|
+
Access and give it to the agent as `DODI_TOKEN` (or `dodi login --token`).
|
|
41
|
+
|
|
42
|
+
## For agents
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npm install -g @dodi-education/cli
|
|
46
|
+
dodi login # prints the approval link; exit 3 = still pending
|
|
47
|
+
dodi login --resume # after the parent approved
|
|
48
|
+
dodi docs # the workflow; `dodi docs studio` before your first brief
|
|
49
|
+
dodi kids # who you make the game for
|
|
50
|
+
dodi studio new "<brief>" # plan it with dodi
|
|
51
|
+
dodi studio plan "<answer>" # until the plan is right
|
|
52
|
+
dodi studio build # dodi builds it in the background
|
|
53
|
+
dodi studio wait # dodi's reply and screenshots to review (exit 3 = still building)
|
|
54
|
+
dodi studio send "<feedback>" # a change round, then wait again
|
|
55
|
+
dodi games publish # only when the parent asks: dodi Discover (translated, reviewed)
|
|
56
|
+
dodi assets new crown --kind accessory # custom companion looks (3D, see `dodi docs assets`)
|
|
57
|
+
dodi mcp # the same commands as an MCP server (stdio)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Every command takes `--json`. Exit codes: 0 ok, 1 error, 2 usage, 3 waiting
|
|
61
|
+
(approval or a running build), 4 check failed, 5 not connected, 6 missing
|
|
62
|
+
scope.
|
|
63
|
+
|
|
64
|
+
Builds run dodi's own game agent on the agent's machine. Its visual check
|
|
65
|
+
renders the game with Playwright when it is installed
|
|
66
|
+
(`npx playwright install chromium-headless-shell`), otherwise through dodi's
|
|
67
|
+
screenshot service.
|
|
68
|
+
|
|
69
|
+
### MCP
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{ "mcpServers": { "dodi": { "command": "dodi", "args": ["mcp"] } } }
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Configuration
|
|
76
|
+
|
|
77
|
+
| Variable | Default | |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `DODI_API_URL` | `https://platform.dodi.app` | a self-hosted platform |
|
|
80
|
+
| `DODI_APP_URL` | `https://app.dodi.app` | where approval links point |
|
|
81
|
+
| `DODI_CONFIG_DIR` | `~/.config/dodi` | where the device keys live (`credentials.json`, mode 0600) |
|
|
82
|
+
| `DODI_TOKEN` | | an access key; wins over the stored login |
|
|
83
|
+
|
|
84
|
+
## Development
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
pnpm --filter @dodi-education/cli dev -- docs # run from source
|
|
88
|
+
pnpm --filter @dodi-education/cli test
|
|
89
|
+
pnpm --filter @dodi-education/cli build # bundles to dist/dodi.js
|
|
90
|
+
NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" pnpm --filter @dodi-education/cli exec tsx scripts/e2e-local.ts
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Against a local platform on :3001 and its dev database:
|
|
94
|
+
- `scripts/e2e-local.ts`: login, approval, kids, manual game edits, assets,
|
|
95
|
+
scopes, access keys, the Access list, logout.
|
|
96
|
+
- `scripts/e2e-studio-local.ts`: the studio flow (plan, build, review, a
|
|
97
|
+
change round) with a stand-in model (`scripts/stub-anthropic.ts`), so no
|
|
98
|
+
real AI is called. `E2E_PUBLISH_GAME=1` also publishes (this sends the
|
|
99
|
+
operator notification email when the local platform has one configured).
|