@usedoku/cli
v0.0.3
Published
The Doku command-line interface.
Downloads
446
Readme
@usedoku/cli
The Doku command-line interface.
Use this package for local Doku login, development sync, Git helper setup, repo status, MCP connection flows, and narrow sandbox fixture operations.
npm install -g @usedoku/cli
doku auth statusThe published doku executable runs with Bun. Install Bun 1.3 or newer and keep
bun on PATH before running the global binary.
Command Discovery
The CLI uses Clipanion for typed command routing and command-specific help. Agents should discover commands through the CLI itself:
doku help
doku help --json
doku collections copy --helpdoku help --json is the stable agent-readable command catalog. It includes
paths, summaries, options, environment fallbacks, examples, and JSON support.
Keep command metadata in src/cli/command-catalog.ts when adding or changing a
command so human help, agent discovery, and docs do not drift.
Runtime Boundary
The CLI is an Effect-powered command runtime. Clipanion command classes are thin
syntax adapters; command behavior should live behind Effect-backed handlers,
services, and plain Promise-returning package boundaries. Project-facing
authoring APIs live in @usedoku/sdk and runtime site helpers live in
@usedoku/site.
The hosted MCP surface is for Project-scoped CodeMode runtime work, especially
brokered Integrations. It does not mirror the CLI command catalog. Local project
operations such as doku dev, doku init, repo status/actions, MCP config
installation, and sandbox fixture commands remain CLI-owned.
Collections Fixtures
Content Collections fixture commands are development and preview helpers, not general Content Item authoring commands.
doku collections seedreadsdoku.seed.jsonby default, preflights dev fixtures against locally compiled collection schemas, and writes explicit items to the target sandbox. Use--target previewwith--sandboxor--preview-keyto seed preview data with remote sandbox validation.doku collections reset --yesdeletes Content Collections data only. It does not reset Forms, Workflows, Analytics, secrets, manifests, or whole sandbox state. Use--target previewwith--sandboxor--preview-keyfor preview reset.doku collections copysupports production-to-dev, production-to-preview, and dev-to-preview fixture paths. Use--collection --limitfor bounded samples or--itemsfor explicit Content Item IDs.
Dev targets default to .doku/dev.env; --sandbox overrides the target sandbox.
Preview targets must be explicit through --sandbox or --preview-key.
--ensure-preview is the only path that creates preview fixture state.
Copy is bounded, idempotent by source Content Item identity, non-recursive for references in v1, and partial-success by default. Fixture copy authorization uses operator permissions on the source and target sandboxes; Content Collection public/private site-runtime visibility is not the authority model.
Preview deployments do not implicitly copy dev sandbox data. Production seed and production reset are out of scope; production content changes use normal authorized Production Content Operations.
