CLI reference
Commander flags plus interactive prompts. Use --yes for non-interactive CI.
dkit init
Detects Next.js (or scaffolds), stores Directus connection and UI kit preference in dkit.json.
dkit init dkit init --url http://localhost:8010 --token <token> dkit init --yes --url … --token … --ui shadcn
dkit add
Applies schema and access, installs TypeScript services as lib/dkit/<module>.ts, and copies selected UI components. Pass a module id or a single component id. Optional Directus flows apply automatically; sample seed only with --seed. UI kit comes from uiAdapter.
# Module — interactive multi-select (defaults pre-selected) dkit add blog dkit add blog --seed # One component — installs the module first if needed dkit add blog-list-cards dkit add blog-detail # Non-interactive picks dkit add blog --with blog-list-cards,blog-detail dkit add blog --template list=blog-list-cards dkit add blog --yes --path /blog --prefix dkit_ dkit add blog --schema-only dkit add blog --dry-run
Interactive module installs ask which components to copy (defaults checked), then collection prefix. Base path and page scaffolding run only for components that declare route (index / slug / static). --yes skips prompts and installs the default components.
dkit list
Prints registry modules, slots, and components.
dkit list
dkit doctor
Checks project config and Directus connectivity before you apply modules.
dkit doctor