feat(dev-cli): add Bun-based local development CLI#1142
feat(dev-cli): add Bun-based local development CLI#1142evanjacobson wants to merge 11 commits intomainfrom
Conversation
…asks 4-16) Implements the full dev CLI: process spawning with color-prefixed output, UI helpers, docker/tunnel/migration infra, env validation, and all commands (up, down, status, env, tunnel, logs) with a main entry point.
Ports preflight logic from kiloclaw/scripts/dev-start.sh and push logic from kiloclaw/scripts/push-dev.sh into TypeScript project commands. Also adds stub project definitions for code-review, auto-fix, and app-builder which are referenced by the projects index.
Port cloudflare-app-builder/start-dev.sh to TypeScript as a ProjectDef with an `up` command that creates a 9-pane tmux session for all app-builder services.
Route `pnpm kilo <project> <command>` to project-specific handlers. Projects: kiloclaw, code-review, auto-fix, app-builder.
- Fix router: unknown project subcommand now shows error instead of silently falling through to generic `up` command - Fix kiloclaw push-dev: check .dev.vars exists before reading - Fix app-builder: quote dir path in tmux send-keys for spaces - Fix kiloclaw: rename kilocawDir → kiloclawDir typo - Fix setDevVar: avoid double newline on append
| } | ||
|
|
||
| const servicesWithEnv = services.filter(s => s.envFile); | ||
| let allGood = true; |
There was a problem hiding this comment.
WARNING: Final success banner can be wrong
allGood is only flipped by the per-service loop below. If .env.local is missing or .vercel/project.json is absent, this function still reaches All environment checks passed!, which gives a false green result after already printing an error or warning.
| return; | ||
| } | ||
|
|
||
| if (svc.type === 'infra') { |
There was a problem hiding this comment.
WARNING: logs migrations always targets a nonexistent Compose service
migrations is registered as an infra service, but it runs pnpm drizzle migrate rather than a docker compose service. This branch will execute docker compose ... logs -f migrations, so pnpm kilo logs migrations fails immediately instead of showing anything useful.
|
|
||
| const portServices = services.filter(s => s.port && s.type !== 'infra'); | ||
| for (const svc of portServices) { | ||
| const listening = await isPortListening(svc.port!); |
There was a problem hiding this comment.
WARNING: Port-only checks misreport services that share a port
This status view assumes one service per port, but the new registry assigns 8792 to both auto-fix and db-proxy, and 8795 to both kiloclaw and git-token. If either process is running, this loop marks the sibling service as running too, so pnpm kilo status produces false positives.
| const skipRoot = args.includes('--no-root'); | ||
|
|
||
| const logDir = join(root, 'dev', '.dev-logs', 'review'); | ||
| await Bun.write(join(logDir, '.gitkeep'), ''); |
There was a problem hiding this comment.
WARNING: Startup can fail on a fresh checkout
This repository does not include dev/.dev-logs/review/, and Bun.write() does not create missing parent directories. On a clean checkout, pnpm kilo code-review up will throw here before any services start.
| const skipRoot = args.includes('--no-root'); | ||
|
|
||
| const logDir = join(root, 'dev', '.dev-logs', 'auto-fix'); | ||
| await Bun.write(join(logDir, '.gitkeep'), ''); |
There was a problem hiding this comment.
WARNING: Startup can fail on a fresh checkout
This repository does not include dev/.dev-logs/auto-fix/, and Bun.write() does not create missing parent directories. On a clean checkout, pnpm kilo auto-fix up will throw here before any services start.
Code Review SummaryStatus: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Other Observations (not in diff)None. Files Reviewed (31 files)
Reviewed by gpt-5.4-20260305 · 826,008 tokens |
Summary
@kilocode/dev-cli— a Bun-based CLI atdev/cli/that replaces scattered shell scripts with a composable tool for managing the repo's 20+ servicesGeneric commands
Project-specific commands
Architecture
.dev.vars.exampletemplatesTest plan
pnpm kilo --helplists all commands, projects, and 22 servicespnpm kilo statusshows Docker health + port checkspnpm kilo env checkvalidates env vars across all servicespnpm kilo logslists all services with descriptionspnpm kilo kiloclaw badcommandshows error + project help (not silent fallthrough)pnpm kilo up(starts Next.js + infra)pnpm kilo kiloclaw setup(needs Vercel/Fly auth)pnpm kilo app-builder up(needs tmux/ngrok)