iterate 0.2.5 → 0.2.6
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 +40 -77
- package/bin/iterate.js +4 -4
- package/dist/cli-DMS4kJph.mjs +868 -0
- package/dist/cli-DMS4kJph.mjs.map +1 -0
- package/dist/config-DtnR7Lv7.mjs +170 -0
- package/dist/config-DtnR7Lv7.mjs.map +1 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -0
- package/dist/stream-tui/agent-chat-terminal.d.mts +1 -0
- package/dist/stream-tui/agent-chat-terminal.mjs +933 -0
- package/dist/stream-tui/agent-chat-terminal.mjs.map +1 -0
- package/dist/worker.d.mts +33 -0
- package/dist/worker.mjs +18 -0
- package/dist/worker.mjs.map +1 -0
- package/package.json +31 -23
- package/dist/cli.d.ts +0 -7
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -430
- package/dist/cli.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,58 +1,52 @@
|
|
|
1
1
|
# iterate
|
|
2
2
|
|
|
3
|
-
⚠️⚠️⚠️ Coming soon! `npx iterate` is a work-in-progress CLI for managing [iterate.com](https://iterate.com) agents ⚠️⚠️⚠️
|
|
4
|
-
|
|
5
3
|
CLI for Iterate.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
`npx iterate` opens the Iterate chat terminal UI. It is equivalent to
|
|
6
|
+
`npx iterate chat`.
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
3. Loads `apps/os/backend/trpc/root.ts` from that checkout.
|
|
12
|
-
4. Exposes commands like `iterate os ...` and `iterate whoami`.
|
|
8
|
+
The package also runs as a thin bootstrapper: inside this repo it delegates to
|
|
9
|
+
the local `packages/iterate` source, and from npm it runs the published build.
|
|
13
10
|
|
|
14
11
|
## Requirements
|
|
15
12
|
|
|
16
13
|
- Node `>=22`
|
|
17
|
-
-
|
|
18
|
-
- `pnpm` or `corepack`
|
|
14
|
+
- Bun, for the current OpenTUI-based chat terminal runtime
|
|
19
15
|
|
|
20
16
|
## Quick start
|
|
21
17
|
|
|
22
18
|
Run without installing globally:
|
|
23
19
|
|
|
24
20
|
```bash
|
|
25
|
-
npx iterate
|
|
21
|
+
npx iterate
|
|
26
22
|
```
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
If you are not logged in yet, `iterate chat` starts the browser OAuth flow. The
|
|
25
|
+
auth flow asks for project access and can create your first organization and
|
|
26
|
+
project before returning to the CLI.
|
|
29
27
|
|
|
30
28
|
```bash
|
|
31
|
-
npx iterate
|
|
32
|
-
--os-base-url https://dev-yourname-os.dev.iterate.com \
|
|
33
|
-
--daemon-base-url http://localhost:3001 \
|
|
34
|
-
--admin-password-env-var-name SERVICE_AUTH_TOKEN \
|
|
35
|
-
--user-email dev-yourname@iterate.com \
|
|
36
|
-
--scope global
|
|
29
|
+
npx iterate chat
|
|
37
30
|
```
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
For help and other commands:
|
|
40
33
|
|
|
41
34
|
```bash
|
|
42
|
-
npx iterate
|
|
43
|
-
npx iterate
|
|
35
|
+
npx iterate --help
|
|
36
|
+
npx iterate login
|
|
37
|
+
npx iterate orgs list
|
|
38
|
+
npx iterate config list
|
|
44
39
|
```
|
|
45
40
|
|
|
46
41
|
## Commands
|
|
47
42
|
|
|
48
|
-
- `iterate
|
|
49
|
-
- `iterate
|
|
50
|
-
- `iterate
|
|
51
|
-
- `iterate
|
|
43
|
+
- `iterate` - open chat
|
|
44
|
+
- `iterate chat` - open the Iterate agent chat terminal UI
|
|
45
|
+
- `iterate login` - authenticate with browser-based OAuth
|
|
46
|
+
- `iterate logout` - remove the stored session for the current config
|
|
47
|
+
- `iterate orgs list`
|
|
48
|
+
- `iterate config ...`
|
|
52
49
|
- `iterate os ...`
|
|
53
|
-
- `iterate daemon ...`
|
|
54
|
-
|
|
55
|
-
`setup --scope global` writes auth + launcher values into `global`; `setup --scope workspace` writes them into `workspaces[process.cwd()]`.
|
|
56
50
|
|
|
57
51
|
## Config file
|
|
58
52
|
|
|
@@ -64,71 +58,40 @@ Config shape:
|
|
|
64
58
|
|
|
65
59
|
```json
|
|
66
60
|
{
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
"configs": {
|
|
62
|
+
"default": {
|
|
63
|
+
"osBaseUrl": "https://os.iterate.com",
|
|
64
|
+
"authBaseUrl": "https://auth.iterate.com",
|
|
65
|
+
"defaultProject": "my-project"
|
|
66
|
+
},
|
|
67
|
+
"dev": {
|
|
68
|
+
"osBaseUrl": "http://localhost:54896",
|
|
69
|
+
"authBaseUrl": "http://localhost:7101"
|
|
70
|
+
}
|
|
72
71
|
},
|
|
72
|
+
"default": "default",
|
|
73
73
|
"workspaces": {
|
|
74
|
-
"/absolute/workspace/path":
|
|
75
|
-
"osBaseUrl": "https://dev-yourname-os.dev.iterate.com",
|
|
76
|
-
"daemonBaseUrl": "http://localhost:3001",
|
|
77
|
-
"adminPasswordEnvVarName": "SERVICE_AUTH_TOKEN",
|
|
78
|
-
"userEmail": "dev-yourname@iterate.com"
|
|
79
|
-
}
|
|
74
|
+
"/absolute/workspace/path": "dev"
|
|
80
75
|
}
|
|
81
76
|
}
|
|
82
77
|
```
|
|
83
78
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
`global` -> `workspaces[process.cwd()]`
|
|
87
|
-
|
|
88
|
-
## Repo checkout resolution
|
|
89
|
-
|
|
90
|
-
`repoPath` resolution order:
|
|
91
|
-
|
|
92
|
-
1. `ITERATE_REPO_DIR`
|
|
93
|
-
2. `workspaces[process.cwd()].repoPath`
|
|
94
|
-
3. `global.repoPath`
|
|
95
|
-
4. nearest parent directory containing `.git`, `pnpm-workspace.yaml`, and `apps/os/backend/trpc/root.ts`
|
|
96
|
-
5. default managed checkout path `${XDG_DATA_HOME:-~/.local/share}/iterate/repo`
|
|
97
|
-
|
|
98
|
-
`repoPath` shortcuts in `setup`:
|
|
99
|
-
|
|
100
|
-
- `local` - nearest local iterate checkout
|
|
101
|
-
- `managed` - default managed checkout path
|
|
102
|
-
|
|
103
|
-
Environment overrides:
|
|
104
|
-
|
|
105
|
-
- `ITERATE_REPO_DIR`
|
|
106
|
-
- `ITERATE_REPO_REF`
|
|
107
|
-
- `ITERATE_REPO_URL`
|
|
108
|
-
- `ITERATE_AUTO_INSTALL` (`1/true` or `0/false`)
|
|
79
|
+
Config resolution priority: `--config` flag > workspace match (walk up from cwd) > `default` key > single-config auto-select.
|
|
109
80
|
|
|
110
81
|
## Local iterate dev
|
|
111
82
|
|
|
112
|
-
If you run inside an `iterate/iterate` clone, the CLI auto-detects it
|
|
113
|
-
|
|
114
|
-
You can pin explicitly:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
npx iterate setup \
|
|
118
|
-
--os-base-url https://dev-yourname-os.dev.iterate.com \
|
|
119
|
-
--daemon-base-url http://localhost:3001 \
|
|
120
|
-
--admin-password-env-var-name SERVICE_AUTH_TOKEN \
|
|
121
|
-
--user-email dev-yourname@iterate.com \
|
|
122
|
-
--scope workspace
|
|
123
|
-
```
|
|
83
|
+
If you run inside an `iterate/iterate` clone, the CLI auto-detects it and
|
|
84
|
+
delegates to the local source instead of the published build.
|
|
124
85
|
|
|
125
86
|
## Publishing (maintainers)
|
|
126
87
|
|
|
127
88
|
From repo root:
|
|
128
89
|
|
|
129
90
|
```bash
|
|
91
|
+
pnpm --filter ./packages/iterate build
|
|
130
92
|
pnpm --filter ./packages/iterate typecheck
|
|
131
|
-
pnpm
|
|
132
|
-
pnpm
|
|
93
|
+
pnpm --filter ./packages/iterate test
|
|
94
|
+
pnpm exec oxlint packages/iterate/src/cli.ts packages/iterate/src/cli.test.ts
|
|
95
|
+
pnpm exec oxfmt --check packages/iterate
|
|
133
96
|
pnpm --filter ./packages/iterate publish --access public
|
|
134
97
|
```
|
package/bin/iterate.js
CHANGED
|
@@ -45,7 +45,7 @@ const findLocalModule = () => {
|
|
|
45
45
|
// Prefer TS source in monorepo dev, fall back to dist
|
|
46
46
|
const repoSrc = join(repoPkg, "src/index.ts");
|
|
47
47
|
if (existsSync(repoSrc)) return repoSrc;
|
|
48
|
-
const repoDist = join(repoPkg, "dist/index.
|
|
48
|
+
const repoDist = join(repoPkg, "dist/index.mjs");
|
|
49
49
|
if (existsSync(repoDist)) return repoDist;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -56,7 +56,7 @@ const findLocalModule = () => {
|
|
|
56
56
|
const nmScript = join(nmRoot, "node_modules/.bin/iterate");
|
|
57
57
|
if (existsSync(nmScript) && realpathSync(nmScript) !== selfReal) {
|
|
58
58
|
// Published package — use dist
|
|
59
|
-
const nmDist = join(nmRoot, "node_modules/iterate/dist/index.
|
|
59
|
+
const nmDist = join(nmRoot, "node_modules/iterate/dist/index.mjs");
|
|
60
60
|
if (existsSync(nmDist)) return nmDist;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -70,9 +70,9 @@ if (localModule) {
|
|
|
70
70
|
await runCli();
|
|
71
71
|
} else {
|
|
72
72
|
// No delegation — run our own copy.
|
|
73
|
-
// In monorepo dev: src/index.ts exists. Published: dist/index.
|
|
73
|
+
// In monorepo dev: src/index.ts exists. Published: dist/index.mjs exists.
|
|
74
74
|
const srcPath = join(pkgRoot, "src/index.ts");
|
|
75
|
-
const distPath = join(pkgRoot, "dist/index.
|
|
75
|
+
const distPath = join(pkgRoot, "dist/index.mjs");
|
|
76
76
|
const modulePath = existsSync(srcPath) ? srcPath : distPath;
|
|
77
77
|
const { runCli } = await import(modulePath);
|
|
78
78
|
await runCli();
|