@dodi-education/cli 0.0.0-stage → 0.1.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 +90 -2
- package/dist/chunk-2ZK44UVJ.js +19 -0
- package/dist/chunk-KP4U5Z6H.js +19239 -0
- package/dist/dodi.js +6923 -0
- package/dist/index.umd-A32AINXN.js +2358 -0
- package/dist/renderer-3K4ZMPYW.js +444 -0
- package/package.json +74 -3
package/README.md
CHANGED
|
@@ -1,3 +1,91 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dodi CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Let your own AI agent build learning games, companion avatars and accessories
|
|
4
|
+
for your family on [dodi](https://app.dodi.app). Works with any agent that can
|
|
5
|
+
run shell commands (Claude Code, Cursor, Codex, a local model) or speak MCP.
|
|
6
|
+
|
|
7
|
+
Everything the agent uploads is sealed on its machine under your family's
|
|
8
|
+
vault key. The dodi server never sees your games or your kids' details.
|
|
9
|
+
|
|
10
|
+
## For parents
|
|
11
|
+
|
|
12
|
+
Tell your agent:
|
|
13
|
+
|
|
14
|
+
> Build a learning game for my kid on dodi.app with the dodi CLI (needs Node
|
|
15
|
+
> 20+). Install it with `npm install -g @dodi-education/cli`, run `dodi login` and send
|
|
16
|
+
> me the link it prints so I can allow access, then read `dodi docs` and
|
|
17
|
+
> follow it.
|
|
18
|
+
|
|
19
|
+
The link opens **Allow access** in the dodi app. Check that the fingerprint
|
|
20
|
+
matches what your agent shows, choose what it may do and for how long, and
|
|
21
|
+
confirm with your password. **Settings > Access** lists every browser, app,
|
|
22
|
+
robot and agent that can open your family's data; revoke any of them there.
|
|
23
|
+
|
|
24
|
+
Scopes you can grant:
|
|
25
|
+
|
|
26
|
+
| Scope | Lets the agent |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `games` | create and edit your family's games |
|
|
29
|
+
| `games:publish` | submit games to dodi Discover (reviewed before they go live) |
|
|
30
|
+
| `kids:basic` | see your kids' first names and ages |
|
|
31
|
+
| `kids:memory` | read a kid's memory dossier (off by default: the agent's AI provider reads it) |
|
|
32
|
+
| `assets` | create custom companion avatars and accessories |
|
|
33
|
+
| `assets:publish` | share avatars and accessories on dodi Discover |
|
|
34
|
+
|
|
35
|
+
For an agent that runs unattended, create an **access key** in Settings >
|
|
36
|
+
Access and give it to the agent as `DODI_TOKEN` (or `dodi login --token`).
|
|
37
|
+
|
|
38
|
+
## For agents
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npm install -g @dodi-education/cli
|
|
42
|
+
dodi login # prints the approval link; exit 3 = still pending
|
|
43
|
+
dodi login --resume # after the parent approved
|
|
44
|
+
dodi docs # the workflow; `dodi docs games` before writing a game
|
|
45
|
+
dodi kids # who you build for
|
|
46
|
+
dodi games new dino-count # a working starter game
|
|
47
|
+
dodi games check dino-count # validator + headless run + screenshots
|
|
48
|
+
dodi games push dino-count # seal and upload
|
|
49
|
+
dodi games publish dino-count # optional: dodi Discover
|
|
50
|
+
dodi assets new crown --kind accessory
|
|
51
|
+
dodi assets check crown && dodi assets push crown
|
|
52
|
+
dodi assets publish crown # optional: share it on dodi Discover
|
|
53
|
+
dodi mcp # the same commands as an MCP server (stdio)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Every command takes `--json`. Exit codes: 0 ok, 1 error, 2 usage, 3 waiting
|
|
57
|
+
for approval, 4 check failed, 5 not connected, 6 missing scope.
|
|
58
|
+
|
|
59
|
+
`dodi games check --local` runs the game in Playwright on your machine
|
|
60
|
+
(`npx playwright install chromium`); without it, the dodi screenshot service
|
|
61
|
+
renders it.
|
|
62
|
+
|
|
63
|
+
### MCP
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{ "mcpServers": { "dodi": { "command": "dodi", "args": ["mcp"] } } }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Configuration
|
|
70
|
+
|
|
71
|
+
| Variable | Default | |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| `DODI_API_URL` | `https://platform.dodi.app` | a self-hosted platform |
|
|
74
|
+
| `DODI_APP_URL` | `https://app.dodi.app` | where approval links point |
|
|
75
|
+
| `DODI_CONFIG_DIR` | `~/.config/dodi` | where the device keys live (`credentials.json`, mode 0600) |
|
|
76
|
+
| `DODI_TOKEN` | | an access key; wins over the stored login |
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
pnpm --filter @dodi-education/cli dev -- docs # run from source
|
|
82
|
+
pnpm --filter @dodi-education/cli test
|
|
83
|
+
pnpm --filter @dodi-education/cli build # bundles to dist/dodi.js
|
|
84
|
+
NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" pnpm --filter @dodi-education/cli exec tsx scripts/e2e-local.ts
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`scripts/e2e-local.ts` runs the whole flow (login, approval, kids, games,
|
|
88
|
+
assets, scopes, logout) against a local platform on :3001 and its dev
|
|
89
|
+
database. `E2E_PUBLISH_GAME=1` adds an access-key agent that publishes the
|
|
90
|
+
game to Discover (this sends the operator notification email when the local
|
|
91
|
+
platform has one configured).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
5
|
+
try {
|
|
6
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
7
|
+
} catch (e) {
|
|
8
|
+
throw mod = 0, e;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
__commonJS,
|
|
18
|
+
__export
|
|
19
|
+
};
|