Package Exports
- @dkcli/cli
- @dkcli/cli/package.json
Readme
DesignKit CLI
DesignKit CLI is the public package workspace for deterministic design tooling. It ships math and utilities for palettes, scales, APCA contrast, layout, motion, typography, CSS auditing, component recipes, theme tokens, and Svelte 5 components.
The product website and Cloudflare/DKCMS runtime live outside this public repo in the sibling private workspace at ../dkweb.
Packages
@dkcli/cli: thedkanddkclicommand line tools.@dkcli/core: framework-agnostic math, proofs, specs, and recipe compilation.@dkcli/tokens: compiled themes, token aliases, and CSS/JSON emitters.@dkcli/components: Svelte 5 components backed by DesignKit recipes and themes.
Install the CLI globally with npm install -g @dkcli/cli, or run it one-off with npx @dkcli/cli --help.
Setup
- Use Node 22 or newer. CI runs Node 22, and
.node-versionpins that default. - Use pnpm 10.33.0. The root
package.jsondeclares this withpackageManager. - If pnpm is not available, run
corepack enableand thencorepack prepare pnpm@10.33.0 --activate. - Run
pnpm install. - Run
pnpm dk --helpfor the source-owned CLI wrapper.
Runbook
pnpm buildemits the publishable CLI package files todist/.pnpm build:packagesbuilds@dkcli/core,@dkcli/tokens, and@dkcli/components.pnpm pack:drypreviews the CLI npm tarball contents after the build.pnpm lintruns ESLint with zero-warning tolerance.pnpm check:stricttypechecks the CLI and Svelte component package.pnpm testruns the Vitest suite.pnpm test:coverageruns Vitest with the configured coverage thresholds.pnpm release:verifyruns the package release gate.
Public Release Checks
Run these before publishing packages or tagging a public release:
pnpm release:verify
pnpm dk components verify --all
pnpm audit --audit-level low
pnpm licenses list --prodArchitecture
src/bin/dk.tsis the publishable CLI entrypoint compiled intodist/bin/dk.js.src/lib/dkcontains the CLI-facing deterministic helpers and command implementation.src/lib/dkcmscontains typed payload helpers used bydk cmscommands.packages/corecontains framework-agnostic design math and proof contracts.packages/tokensemits theme tokens and CSS/JSON artifacts.packages/componentscontains the Svelte component package.examples/svelte-starterverifies the published package tarballs in a small consumer app.
Hosted Service Commands
The dk cms command group is a public client for the hosted DKCMS service. It may contain request/response types, authentication helpers, and endpoint paths, but the DKCMS server implementation, Cloudflare Worker, deployment config, routes, secrets, and operational docs belong in the private ../dkweb workspace.
Contributing And Security
- Read CONTRIBUTING.md before opening a PR.
- Report sensitive security issues through SECURITY.md.
- Do not commit
.envfiles,.npmrc, service tokens, or deployment overlays.