apps/docs/skills/zod-to-form-cli/SKILL.md
Documentation site for zod-to-form (Docusaurus 3 + TypeDoc) Use when: You need programmatic codegen from a Node.js script or build tool (not just....
npx skillsauth add pradeepmouli/zod-to-form zod-to-form-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Documentation site for zod-to-form (Docusaurus 3 + TypeDoc)
Before using the CLI, decide: are you scripting (use runGenerate) or interacting
(use npx zod-to-form)? For config authoring, always use defineConfig for type inference.
Use this skill when:
runGeneraterunGeneratedryRun output for preview/diffing without touching the filesystem → use runGeneratecreateProgramcreateProgramdefineConfig — defineConfig is the typed entry point; bare object literals lose generic inference on components.overridesunknown → use validateConfig — validates and narrows to ZodFormsConfigDo NOT use when:
npx zod-to-form generate (via createProgram()) instead (runGenerate)fs and path APIs (runGenerate)runGenerate() directly (createProgram)npx zod-to-form (the binary entry point) instead (createProgram)defineConfig is a no-op at runtime without a preset; skip it when config comes from JSON or dynamic import (defineConfig)validateConfig)API surface: 4 functions, 1 types
result.code as the on-disk file content when overwrite is false — if the output file already exists, runGenerate returns wroteFile: false and the existing file is unchanged without throwing; FIX: check result.wroteFile before assuming the file was updated, or set defaults.overwrite: true explicitly--watch mode on schemas that re-export types from other modules — the watcher tracks only the top-level file, so a change in an imported schema file does not trigger regeneration; FIX: run runGenerate manually from a parent file watcher (e.g. chokidar) that covers the full import treeprogram.parse() (synchronous) in ESM environments — Commander's synchronous parse returns before async action handlers complete in ESM because it cannot await top-level async actions; FIX: always use .parseAsync(process.argv)ZodFormsConfig — Root configuration type for zod-to-form code generation.
Describes the component library to use, generation defaults, per-schema
overrides, and global field configuration. Pass this to defineConfig() in
your z2f.config.ts for full type inference, or load and validate it at
runtime with validateConfig(). (7 options — see references/config.md)
CLI: runGenerate (Executes the code generation pipeline for a single Zod schema export), createProgram (Creates the Commander)
Configuration: defineConfig (Identity helper that returns its argument typed as ZodFormsConfig), validateConfig (Validates an unknown value as a ZodFormsConfig at runtime)
config.d: ComponentOverride (Per-component metadata override)
Load these on demand — do NOT read all at once:
references/functions.md for full signatures, parameters, and return typesreferences/types.mdreferences/config.md for all settings and defaultstools
Use when working with zod-to-form (core, react, cli, codegen, vite).
tools
Vite plugin for zod-to-form — transforms ?z2f imports into generated form components and optionally replaces <ZodForm> JSX call sites with generated components at build time Use when: You want `import SignupForm from './signup.schema?z2f'` to Just Work in a.... Also: vite, vite-plugin, zod, zod-v4, codegen, forms, form-generation, schema-driven, react-hook-form, build-plugin, jsx-transform.
development
Runtime <ZodForm> renderer for Zod v4 schemas Use when: You need form rendering in storybook, playgrounds, or low-traffic admin UIs —.... Also: zod, zod-v4, react, forms, form-generation, react-hook-form, schema-driven, dynamic-forms, form-renderer, hookform-resolver, zod-form-renderer.
development
Schema walker and processor registry for Zod v4 form generation Use when: You want per-field validation instead of whole-form validation. Also: zod, zod-v4, forms, form-generation, schema, schema-walker, processor-registry, react-hook-form, schema-driven, form-schema, zod-registry.