Search for a command to run...
Zaidan includes an AI agent system that automates syncing Shadcn based React components into Zaidan. It handles the full pipeline — code transformation, documentation generation, code review, and registry management — so you can bring your favorite React components into Zaidan.
Zaidan Agent is experimental. While it handles most components well, complex components may appear to work but contain subtle issues. Always review the generated code to make sure the component is properly implemented.
Currently only Claude Code is supported. If you'd like to add support for other agentic coding tools, please open an issue or submit a PR — in most cases, simple file references should be enough to adapt.
Zaidan Agent runs inside the Zaidan repository itself. You should think of Zaidan as a playground — a place to transform, test, and iterate on components using the built-in UI, the component previews, and the customizer before publishing them to the registry.
To get started, clone or fork the repository:
git clone https://github.com/carere/zaidan.gitcd zaidanbun installThen you can run commands in two ways:
Inside a Claude Code session — open the project in Claude Code and run commands interactively:
claude# then type /sync, /registry-audit, etc.One-shot with claude -p — run a command directly from your terminal:
claude -p "/sync --filter=\"button\" --dry-run"The agent generates component code, examples, and documentation that integrate with Zaidan's registry structure. By working inside the repo, you get:
The main command for bringing components into Zaidan. It operates in two modes:
| Flag | Default | Description |
|---|---|---|
--primitive | kobalte | Target primitive system (kobalte, base-ui coming soon) |
--registry | — | External registry.json URL. Omit for shadcn mode |
--docs | — | External only — Raw mdx URL template |
--examples | — | External only — Raw tsx URL template |
--playground | — | External only — URL template of live preview |
--filter | — | Regex to filter which components to sync |
--dry-run | false | Discovery only — stops before transformation |
--transform-instructions | — | Custom instructions passed to transformer agents |
In shadcn mode, you don't need to pass any urls, they are all built-in into Zaidan and will be ignored if you pass them.
URL templates for external mode use {component} as a placeholder, replaced with each component's kebab-case name at runtime. You can append an optional |prompt suffix to provide extraction guidance:
--docs="https://docs.example.com/{component}.mdx|Look in the API section"--examples="https://raw.github.com/.../examples/{component}.tsx|Focus on the usage example"# Glob pattern also works# --examples="https://raw.github.com/.../examples/{component}/*.tsx|Extract all examples, not just the first one"The part before | is the URL, the part after are instructions to find the relevant content (if not provided, all the page is parsed by the agent).
# Sync all missing shadcn components with kobalte primitive/sync
# Preview what would be synced (no transformation) and filter to only button and card components/sync --filter="^(button|card)" --dry-run
# Sync from an external registry/sync --registry="https://raw.github.com/some-dir/registry.json" \ --docs="https://raw.github.com/.../docs/{component}.mdx" \ --examples="https://raw.github.com/.../examples/{component}.tsx" \ --playground="https://bazza.dev/preview/{component}"
# Pass custom guidance to transformers/sync --filter="data-table" \ --transform-instructions="Use Tanstack Table for integrating tables"Read-only health check for the component registry. Scans registry.json against the filesystem and reports missing entries, orphaned items, schema violations, and broken dependency chains. If issues are found, it suggests running /registry-update to fix them automatically.
| Flag | Default | Description |
|---|---|---|
--primitive | kobalte | Registry namespace to audit (kobalte, base-ui comning soon) |
Does everything /registry-audit does, plus auto-fixes the issues it finds: adds missing entries, removes orphaned items, repairs broken dependency chains, rebuilds the registry, formats with Biome, and commits the changes.
| Flag | Default | Description |
|---|---|---|
--primitive | kobalte | Registry namespace to update (kobalte, base-ui coming soon) |
A component's registry dependencies are missing. The transformer validates all dependencies before starting and aborts if any are unavailable. Sync the missing dependency first, then retry.
Critical issues were found — typically React remnants or convention violations. The code reviewer attempts up to 3 automatic fixes per file. If the component still fails, it's excluded from registry updates and you'll need to address the issues manually.
Run /sync --dry-run to see what would be synced without performing any transformation. This is useful for verifying filter patterns, checking which components are missing, and confirming dependency availability before committing to a full sync.