create-zudo-doc CLI
Complete CLI reference for the create-zudo-doc project scaffolder.
Usage
create-zudo-doc [project-name] [options]When run without flags, the CLI launches an interactive wizard. All options can be specified via flags for non-interactive (CI/agent) usage.
You can also use the Setup Preset Generator to interactively build a configuration and copy it as a JSON preset or CLI command.
What the CLI generates
The scaffold is minimal — roughly a dozen files (see Project Structure). The layout, chrome, and schema all ship from @takazudo/zudo-doc and are consumed from node_modules, so the generated project holds only what is genuinely its own.
Your feature choices are written into a single zfb.config.ts as a zudoDoc({ … }) call containing only the fields that differ from the defaults (siteName is always emitted). There is no separate src/ — the one config file is the whole configuration surface. See Configuration for every field.
A few things a fresh scaffold intentionally does not include:
No
.zudo-doc.json— the eject provenance file is lazy-created on your firstzudo-doc eject, so an un-ejected project never carries it.No
check:html/ HTML-validation step and nogen:z-index/check:z-indexcodegen — both were pruned from generated projects. The default z-index tiers ship from the package; HTML validation and pre-push suites are opt-in add-backs (see Customizing → Restoring pre-push and HTML validation).No deploy adapter or
wrangler.toml— the default build is a pure static export. Deploying (or enabling SSR features like the AI assistant) is an explicit extend step.
Note
@takazudo/zdtp is added as an unconditional dependency of every generated project — not only those enabling designTokenPanel. The package's chrome imports the panel bootstrap module at module scope (so zfb's island scanner can find it), but that module itself lazy-loads @takazudo/zdtp via a dynamic import() on first use rather than importing it eagerly (see Lazy loading). The bundler still needs the package resolvable in node_modules to build that chunk, so it stays a build-time-required dependency regardless of the setting — only the runtime load is deferred.
Color Schemes
zudo-doc ships exactly two color schemes — Default Light and Default Dark — sharing one set of OKLCH ramps. There is no bundled catalog of community or terminal presets to pick a --scheme value from.
Customization happens one level deeper, through the colorSchemes escape-hatch field in zfb.config.ts: pass your own { ramps, map } palette map to zudoDoc({ colorSchemes: { … } }) (see Color — "Adding a Custom Color Scheme"). Preview the result live in the Design Token Panel's Palette tab (see Color Scheme Preview) before committing it to source.
Theme Packs
Independently of the color scheme, the scaffold can start a project on any bundled theme pack — a prebuilt design bundle layered on top of the scheme system. Pass --theme-pack <slug>, or answer the interactive "Theme pack:" prompt (asked between the color-scheme questions and the feature multiselect). The chosen slug is written to themePack in the generated zfb.config.ts (only when it differs from default, per the diff-from-defaults rule). The on-page switcher UI is a separate feature toggle, --theme-pack-switcher.
Options
Project
| Flag | Description | Default |
|---|---|---|
--name <name> | Project name (or first positional arg) | my-docs |
--lang <code> | Default language code | en |
--github-url <url> | GitHub repository URL (drives header link + source link) | — |
--pm <manager> | Package manager: pnpm, npm, yarn, bun | pnpm |
--[no-]install | Install dependencies after scaffolding | prompt |
--[no-]git | Initialize a git repository + initial commit (enables doc-history metadata) | on |
Color Scheme
| Flag | Description | Default |
|---|---|---|
--color-scheme-mode <mode> | single or light-dark | light-dark |
--scheme <name> | Color scheme (single mode) | Default Dark |
--light-scheme <name> | Light scheme (light-dark mode) | Default Light |
--dark-scheme <name> | Dark scheme (light-dark mode) | Default Dark |
--default-mode <mode> | light or dark (light-dark mode) | dark |
--[no-]respect-system-preference | Respect OS color scheme preference | true |
Theme Pack
| Flag | Description | Default |
|---|---|---|
--theme-pack <slug> | Theme pack applied to the generated project — any slug from the Theme Gallery | default |
Features
| Flag | Description | Default |
|---|---|---|
--[no-]i18n | Multi-language support | off |
--[no-]search | Built-in full-text/word-match search over a generated search-index.json | on |
--[no-]sidebar-filter | Real-time sidebar filtering | on |
--[no-]claude-resources | Claude Code docs generation | off |
--[no-]claude-skills | Ship zudo-doc-* Claude Code skills (design-system, translate, version-bump) | off |
--[no-]claude-skills-writing | Ship the zudo-doc-writing skill (doc-writing + navigation-structure guide for AI-assisted authoring) | off |
--[no-]design-token-panel | Interactive tabbed panel for tweaking spacing, font, size, and color tokens | off |
--[no-]theme-pack-switcher | Bottom-right flyout (and browse-all dialog) to switch between installed theme packs | off |
--[no-]sidebar-resizer | Draggable sidebar width | off |
--[no-]sidebar-toggle | Show/hide desktop sidebar | off |
--[no-]toc-toggle | Show/hide the desktop table of contents (edge chevron, xl screens) | off |
--[no-]versioning | Multi-version documentation support | off |
--[no-]doc-history | Document edit history | off |
--[no-]body-foot-util | Right-aligned strip below each doc: doc history trigger + View source on GitHub link | off |
--[no-]llms-txt | Generate llms.txt for LLM consumption | off |
--[no-]skill-symlinker | Symlink documentation skills into Claude Code or Codex | off |
--[no-]tauri | Tauri desktop app (Mode 1) — macOS offline reader with in-page search | off |
--[no-]tauri-dev | Tauri dev wrapper (Mode 2) — configurable desktop dev wrapper for any project | off |
--[no-]footer-nav-group | Navigation links in the footer | off |
--[no-]image-enlarge | Click-to-enlarge for oversized markdown images | on |
--[no-]dynamic-page-transition | SPA-style page transition with history handling | on |
--[no-]footer-copyright | Copyright notice in the footer | on |
--[no-]changelog | Changelog page | off |
--[no-]tag-governance | Vocabulary-aware tag audit + suggest scripts | off |
--[no-]doc-tags | Per-tag and tag-index browsing routes (docs/tags/...) | off |
--[no-]footer-taglist | Grouped tag index in the footer (requires tagGovernance) | off |
--[no-]noindex | Avoid robots indexing — noindex meta + robots.txt | off |
Preset
| Flag | Description |
|---|---|
--preset <path> | Load settings from a JSON preset file (use "-" for stdin) |
The --preset flag accepts the JSON output from the Setup Preset Generator. When a preset is loaded, all prompts are skipped (same as --yes). Individual CLI flags override preset values.
General
| Flag | Description |
|---|---|
-y, --yes | Use defaults for unspecified options, skip all prompts |
-h, --help | Show help message |
Supported Languages
The --lang flag accepts any of the following language codes:
| Code | Language |
|---|---|
en | English |
ja | Japanese |
zh-cn | Chinese (Simplified) |
zh-tw | Chinese (Traditional) |
ko | Korean |
es | Spanish |
fr | French |
de | German |
pt | Portuguese |
The default language determines the locale used for root pages (/). When i18n is enabled, a secondary language is added automatically (English when the default is non-English, Japanese when the default is English).
Examples
Interactive mode
pnpm create zudo-docNon-interactive with all defaults
pnpm create zudo-doc my-docs --yesJapanese site, single dark scheme
pnpm create zudo-doc my-docs --lang ja --scheme "Default Dark" --no-i18n --pm pnpm --installLight/dark mode with an explicit default mode
pnpm create zudo-doc my-docs \
--color-scheme-mode light-dark \
--default-mode light \
--no-respect-system-preference \
--yesUsing a preset file
Generate a preset JSON from the Setup Preset Generator, save it to a file, then pass it to the CLI:
pnpm create zudo-doc --preset setup.json --installOr pipe JSON directly via stdin:
cat setup.json | pnpm create zudo-doc --preset - --installCI/automation usage
pnpm create zudo-doc my-docs \
--lang en \
--scheme "Default Dark" \
--no-i18n \
--search \
--no-claude-resources \
--pm pnpm \
--install \
--yesProgrammatic API
The package also exports a programmatic API. The options object accepts the same fields as the JSON preset, plus install and git options. The programmatic API defaults both to false.
import { createZudoDoc } from "create-zudo-doc";
await createZudoDoc({
projectName: "my-docs",
defaultLang: "en",
colorSchemeMode: "light-dark",
lightScheme: "Default Light",
darkScheme: "Default Dark",
defaultMode: "dark",
respectPrefersColorScheme: true,
themePack: "foundry",
features: [
"search",
"sidebarFilter",
"sidebarResizer",
"sidebarToggle",
"tocToggle",
"docHistory",
"footerCopyright",
],
cjkFriendly: false,
minifyHtml: true,
headerRightItems: [
{ type: "component", component: "theme-toggle" },
{ type: "component", component: "github-link" },
],
metaTags: {
description: true,
ogImage: "/img/ogp.png",
},
packageManager: "pnpm",
install: true,
git: true,
});headerRightItems (see the Header Right Items guide) and metaTags (see Configuration) accept the same shapes as the JSON preset fields of the same name, and are validated with the same rules — an unknown headerRightItems component/trigger name or an invalid metaTags sub-field type throws before scaffolding starts.