The CLI is isolated from the monorepo (excluded from workspaces in root package.json, has its own cli/bun.lock) solely because Ink 5 required React 18 while the dashboard uses React 19. Ink 6 now supports React 19, so the version conflict no longer exists. This upgrade unblocks agents that trip over the React 18 isolation and simplifies the monorepo setup.
feat(cli): upgrade to React 19 + Ink 6refactor(cli): integrate CLI into monorepo workspacesdocs: remove React 18 isolation references from CLI docs
Bump versions in cli/package.json while keeping CLI isolated (so we can test the upgrade in isolation first):
| Package | Current | Target |
|---|---|---|
react |
18.3.1 |
^19.2.2 |
ink |
^5.1.0 |
^6.2.0 |
@inkjs/ui |
^2.0.0 |
keep (peerDep ink>=5 satisfied) |
ink-link |
^5.0.0 |
keep (peerDep ink>=6 satisfied) |
@types/react |
^18.3.0 |
^19.2.6 |
No TUI code changes expected. The 20 TUI files use only stable APIs (Box, Text, render, useApp, useInput, useStdout, useStdin, memo, standard React hooks). React 19 has no breaking changes for these patterns.
Steps:
- Edit
cli/package.json— update the 4 versions above - Run
cd cli && bun installto regeneratecli/bun.lock - Run
bun obvious typecheck --changedto verify types - Manual smoke test:
bun obvious up— verify TUI renders, keyboard works
Now that React versions match, remove the isolation:
-
package.json(root) — add"cli"to workspaces array:"workspaces": ["apps/*", "cli", "dashboard", "functions/*", "packages/*"]
-
Delete
cli/bun.lock— root lockfile now manages CLI deps -
cli/cli-bootstrap.sh— changecd "$CLI_DIR" && bun installtocd "$PROJECT_ROOT" && bun install --frozen-lockfile(root install now covers CLI) -
cli/src/check-deps.ts— updateprintMissingDepsError()message: remove "isolated dependencies (React/Ink)" phrasing, point tobun installat project root instead of./cli/cli-bootstrap.sh -
Run
bun installfrom root to regenerate rootbun.lockwith CLI deps -
Verify:
bun obvious upstill works,bun obvious typecheck --changed
Note on check-deps.ts: The checkCliDeps() function checks for cli/node_modules/react and cli/node_modules/ink. Bun workspaces create symlinks in workspace node_modules, so this check still works.
Update documentation that references the now-removed isolation strategy:
cli/AGENTS.md— remove/rewrite "IMPORTANT: React 18 Isolation" section (~lines 63-87)cli/CLI_AGENT_GUIDE.md— remove "React 18 Isolation" section (~lines 481-495)cli/TUI_GUIDE.md— update stack table: react 18.3.1 → 19.x, ink 5.1.0 → 6.x
cli/package.json— version bumpspackage.json(root) — workspaces array, resolutionscli/bun.lock— delete after workspace integrationcli/cli-bootstrap.sh— simplify install commandcli/src/check-deps.ts— update error messagingcli/AGENTS.md,cli/CLI_AGENT_GUIDE.md,cli/TUI_GUIDE.md— doc updates
bun obvious typecheck --changed— types passbun obvious up— TUI renders, all panels work, keyboard shortcuts functionalbun obvious up --no-tui— console mode still works- Verify
@inkjs/uicomponents work: Select, TextInput, ConfirmInput, Alert, Badge, StatusMessage cd cli && bun run build— compiled binary builds successfully
@inkjs/uiv2 + Ink 6: peerDep says>=5so it should work, but it's ~2 years old. If runtime issues appear, can vendor the specific components or bump to a newer version.- Workspace hoisting: If bun hoists in a way that breaks
check-deps.ts, adjust the path resolution. Low risk — bun creates symlinks in workspacenode_modules.