3.9 KiB
Remote Cloud Environment Instructions
Setup notes and caveats for developing Kandev in ephemeral cloud VMs (Cursor Cloud, Codex, GitHub Codespaces, or similar sandboxed environments).
Runtime requirements
- mise —
mise.tomlat the repo root pins the developer toolchain (Go 1.26, Node.js 24, pnpm 9.15.9, golangci-lint 2.9.0, go-licenses 1.6.0, pre-commit, etc.). - gcc / sqlite headers — required for CGO (SQLite FTS5).
scripts/bootstrap-dev-envinstalls these on common Linux/macOS package managers when it has permission. - Azure Repos PR creation (optional) — only needed when testing
worktree.create_pragainst Azure remotes outside the published Docker image:- Azure CLI (
az) onPATH - DevOps extension:
az extension add --name azure-devops - Auth:
az loginorexport AZURE_DEVOPS_EXT_PAT=<pat> - The
ghcr.io/kdlbs/kandevimage shipsgh,az, and theazure-devopsextension preinstalled (see rootDockerfile). - Host routing table:
apps/backend/internal/agentctl/AGENTS.md.
- Azure CLI (
Provider prepare scripts should do auth + clone first, then run the shared bootstrap from the repo root:
scripts/bootstrap-dev-env
For E2E-capable environments:
scripts/bootstrap-dev-env --with-e2e
Generated files before typecheck
Before running make typecheck, you must generate two files that are gitignored:
node apps/web/scripts/generate-release-notes.mjs
node apps/web/scripts/generate-changelog.mjs
Without these, tsc fails with missing module errors for @/generated/release-notes.json and @/generated/changelog.json.
Running dev mode
make dev from the repo root builds the backend and starts both the Go backend (port 38429) and Vite frontend (port 37429). It needs a Go toolchain plus pnpm (for the Vite dev server); the tsx/TypeScript launcher is gone — all launch modes (dev, start, run, service) go through the native Go launcher (apps/backend/bin/kandev). The launcher sets KANDEV_DEBUG_DEV_MODE=true which activates the dev profile from profiles.yaml, enabling mock agent and other dev conveniences. No external services (database, message queue, Docker) are needed — SQLite is embedded and the event bus runs in-memory.
Key commands
All documented in the root Makefile:
make dev— build + start backend + web (dev mode)make test— backend (Go) + web (vitest) + CLI testsmake lint— golangci-lint + ESLintmake typecheck— TypeScript type-checking across all appsmake fmt— format all code (run before lint to avoid false positives)make test-e2e— Playwright E2E tests (requiresmake build-backend && make build-webfirst). Usese2e/playwright.config.ts. 1000+ specs.
Firecracker / cloud-VM caveats
These apply to Cursor Cloud, Codex, and similar Firecracker-backed sandboxes:
- tool PATH:
scripts/bootstrap-dev-envactivates mise for its own process. New shells should runeval "$(mise activate bash)"or use a shell profile that activates mise sonode,pnpm,go,golangci-lint, andpre-commitresolve from the pinned toolchain. - First page load:
make devcompiles pages on first visit via the Vite dev server — expect ~25 s for the initial load. - CLI shim tests:
apps/clitests run under the Node built-in test runner (node --test); the old Vitest-basedsrc/tree was deleted whenmake devmoved to the Go launcher. - Playwright browser installation:
playwright install chromiumhangs during zip extraction (Node.js io_uring incompatibility with the Firecracker kernel). Workaround:scripts/install-playwright-browsers.shruns the install with a timeout, then falls back to extracting the already-downloaded zips withunzip.scripts/bootstrap-dev-env --with-e2ecalls this automatically. System deps can be installed viaplaywright install-deps chromium.