Documentation
CLI
Find components, inspect application setup, and preview changes before applying them.
Use the release candidate
The package is @mizen-labs/cli and its executable is mizen. It is an unpublished 0.1.0 candidate. Use matching CLI and UI archives; public @latest commands are not available yet.
Obtain the candidate archives and copy mizen-cli.tgz and mizen-ui.tgz into your app. Install the CLI as a development dependency, then use the local executable. Node must satisfy >=22.18.0 <23 or >=24.11.0. npm and pnpm are supported for setup.
Pack archives from this repository
Maintainers can produce the archives from the Mizen repository. Each command runs inside its selected package: the files land in packages/cli and packages/ui. Copy both archives to your consumer app before following the examples below.
Find and inspect components
Search matches every query word, ignoring case. With no query it lists the catalog. Info accepts a component slug or name and shows imports, API, guidance, and documented examples.
Discovery is offline and does not inspect your app. Its bundled catalog describes the UI version shipped with the CLI, which can differ from your installed UI. Use each command's --help for its options and examples.
Check an application
Doctor checks installed package compatibility, React identity, stylesheet imports, theme setup, and framework bundling declarations. It supports Next.js App Router, TanStack Start, and conventional plain React + Vite apps.
It reads files without running app configuration or package-manager hooks. It does not build or run your app. Computed configuration can remain unverified. Follow each diagnostic's evidence and repair step. --strict fails when any check remains unverified.
Check a workspace
--workspace finds the nearest workspace declaration from the current directory or --cwd anchor. It reads pnpm-workspace.yaml or package.json workspaces patterns, including exclusions. pnpm-workspace.yaml takes precedence when both exist; differing declarations remain unverified.
The report lists each supported app with its framework and result. Ordinary libraries are skipped with a reason. Invalid package manifests are errors and do not prevent inspection of other apps. Ambiguous frameworks, linked or external members, and unclear React + Vite library layouts remain unverified. node_modules and .git are excluded from discovery.
JSON keeps the doctor envelope. data.apps contains per-app reports, data.skipped explains omitted packages, and data.workspace identifies the declaration. Flattened diagnostics carry an app project path; the top-level summary counts all diagnostics. No supported apps produces an incomplete result. Use --strict for CI. Init remains targeted with --cwd and does not accept --workspace.
Preview and apply setup
Init returns a plan by default. Review its source diffs and dependency command, then rerun with --yes. --dry-run prevents application even when --yes is present. A matching, installed and declared UI package needs no archive option.
The package manager must agree with the app's declaration and lockfiles. For an app without either, select --package-manager npm or pnpm. --feature diagram installs the optional diagram peer when requested. Installation skips lifecycle scripts. Source edits preserve existing providers, comments, and unrelated configuration.
Resolve failures
--yes does not bypass conflicts. Resolve the named file or declaration before retrying. Failed verification includes diagnostic IDs, paths, and repair steps.
A failed dependency installation leaves source files unchanged, but package.json, lockfiles, or node_modules may have changed. Repair installation and rerun doctor. Source rollback preserves detected caller edits.
An interrupted run can leave .mizen-init-journal.json with original and proposed source text. Review it and restore or finish the recorded edits before removing it. The next init stops while the journal remains. Help and version reporting remain usable if the bundled catalog is damaged.
Use JSON and exit codes
--json prints one schema version 1 document. Results go to stdout; an error goes to stderr as one line, with a stable reason and the next command to run. The package exports a local Draft-07 schema at @mizen-labs/cli/schema/v1.json. Payloads permit additive fields; command names, field types, and reasons define the contract.
Check the process exit separately: 0 means success, including a plan or no changes needed; 2 is invalid usage or missing input; 1 is every other failure, including failed doctor checks, unverified checks with --strict, init conflicts, and failed installs.
Doctor failures remain doctor reports. Init installation or verification failures remain init reports. Other failures use an error envelope. Human messages can change; automation should use fields and codes. Source previews can contain local application code, so choose where to store or share them.