Workspace

A Khotan workspace is a monorepo: one GitHub repo per organization, using Bun workspaces and Turborepo. Apps live under apps/deployments/; pipelines live under apps/pipelines/. The repo root holds shared agent skills and instruction files. Per-app guidance lives in each subdirectory's own AGENTS.md / CLAUDE.md. See Concepts for the layout.

Check the checkout

khotan workspace check
khotan workspace check --json

The command fetches origin/main and compares it with HEAD. It updates remote-tracking metadata only. It never merges, rebases, resets, stashes, or changes worktree files.

In a workspace with .env.khotan.local, catalog write and destructive commands run this check automatically. If the check blocks, update or reconcile the checkout yourself, then run it again. Khotan never changes local Git work.

To recover:

Status

khotan status           # topology: apps, pipelines, databases
khotan status --write   # refresh a committable WORKSPACE.md from live data

Use khotan status to see which subdirectory maps to which app or pipeline, which database it uses, and which repo it deploys from.

Clone

khotan apps get <appId> and khotan pipelines get <pipelineId> return repo.clone (HTTPS, SSH, GitHub CLI) and repo.subdirectory. Databases live in the same repo. See Concepts.

Do not scaffold at the root

Each app lives in its own subdirectory. Do not run app scaffolders (for example khotan-data init) at the repo root. cd into the app's subdirectory first.

Next

See commands for the catalog-derived surface, and output for --json.