@marigold/cli@0.2.0
Minor Changes
-
6b40542: feat(DST-1264): add
@marigold/cli— terminal access to Marigold docs, component discovery, and project setup.- New package
@marigold/cliwith commands:marigold docs <Component>— fetch component documentation (supports--section,--format,--fresh,--offline)marigold list— list available components (supports--category,--search)marigold init— interactive wizard that installs Marigold packages, edits CSS, wraps the app inProviders, and patches the Vite config for Next.js and Vite projectsmarigold telemetry <status|enable|disable>— manage anonymous telemetrymarigold completion <bash|zsh|fish>— print a shell completion script for tab-completing commands, options, and component names
- Security: sanitize remote content at the fetch boundary to strip the full ECMA-48 escape set (OSC, DCS, APC/PM/SOS, cursor) so a compromised docs origin can't write to the clipboard via OSC 52 or hijack the terminal; the OSC/DCS matchers are linear-time to avoid ReDoS on adversarial input.
- Docs site: extended
/api/manifest.jsonwith categorized components and package version; added/api/telemetryingest route (Upstash Redis). - CLAUDE.md: documented CLI usage for AI agents.
The CLI is designed so AI coding agents can fetch accurate Marigold API data from the terminal instead of guessing from training data. Library exports (
getComponentDocs,loadManifest, …) are available for the MCP server to reuse in a later change. - New package