CLI reference

One package, one banira command. Scaffold a component, run the dev loop, generate every artifact, and gate your releases.

banira init
Scaffold a starter vanilla web component — a TypeScript source file plus a demo page wired for banira serve.
banira dev
The one-command dev loop: watch, compile, and serve with live reload, so a source edit recompiles and the browser refreshes.
banira watch
Recompile components whenever their source changes. Same options as compile.
banira serve
Serve a directory over HTTP with live reload — changes under the root trigger a browser refresh.
banira compile
Compile one or more TypeScript files with banira's compiler defaults.
banira manifest
Generate a Custom Elements Manifest (custom-elements.json) — the ecosystem-standard descriptor that powers IDE autocomplete, Storybook controls and template type-checking.
banira types
Generate a self-contained .d.ts from the manifest that augments HTMLElementTagNameMap so document.querySelector and document.createElement are typed for consumers.
banira editor-data
Generate editor IntelliSense data from the manifest so consumers get autocomplete and hover docs for your custom elements.
banira doc
Generate an HTML documentation page for a component — the TSDoc summary and @demo blocks combined with a full API reference derived from the manifest.
banira diff
Compare two custom-elements.json files and report API changes with a suggested semver release type — useful as a release gate.
banira test
Manifest-driven smoke test: for every custom element found in the sources, banira compiles its module, mounts it in JSDOM, and asserts the tag registers and upgrades.
banira prerender
Render the components to static HTML using Declarative Shadow DOM.
banira lint
Audit components against a subset of the Gold Standard Checklist plus documentation coverage of their public surface — reflection, overridable :host styles, and documented events/attributes/parts/slots.
banira stories
Generate Storybook Component Story Format (*.stories.js) from the components — an argTypes controls panel derived from each element’s attributes (string-literal unions become select options) and events (mapped to actions), with zero hand-written story code.
banira tokens
Generate a theming / design-tokens document (Markdown) from the components’ CSS custom properties, grouped per component and by token namespace.
banira tokens-css
Compile a W3C Design Tokens (DTCG) tokens.json into :root CSS custom properties, resolving {alias} references.
banira theme
Scaffold a light/dark theme contract, a component, and a demo page — token sets via custom properties, switched by data-theme and prefers-color-scheme.