Coralite CLI

This technical documentation provides an in-depth overview of the Coralite CLI, its command-line options, and usage examples.

Command Structure #

The basic command structure for the Coralite CLI is as follows:

bash
Code copied!
coralite [options]

Options #

The Coralite CLI accepts several options to configure its behavior. Here's a detailed list of available options:

Configuration File Support #

The Coralite CLI automatically looks for a coralite.config.js file in the current working directory. If found, it will merge its configuration with the CLI options.

Examples #

1. Generate a site with default options:

bash
Code copied!
coralite -c src/components -p src/pages -o dist

2. Ignore specific elements during parsing and run in dry-run mode:

bash
Code copied!
coralite -c src/components -p src/pages -o dist --ignore-attribute data-ignore=true class=test-only --dry-run

3. Using with a configuration file:

When a coralite.config.js file exists in your project the CLI will automatically load it:

bash
Code copied!
coralite -c src/components -p src/pages -o dist

coralite check (Workspace Audit) #

The coralite check command performs a multi-domain static audit across Components, Plugins, and Pages in your workspace.

bash
Code copied!
coralite check [options]

coralite fix (Unified AST Auto-Fixer) #

The coralite fix command executes deterministic AST auto-fixers across Components and Plugins. It modifies source files in-place and re-audits the codebase to confirm issues are resolved.

bash
Code copied!
coralite fix [--dry-run]

coralite init-agent (AI Coding Rules Scaffolder) #

The coralite init-agent command scaffolds zero-token AGENTS.md guidelines in the repository root for AI coding assistants such as Claude Code, Cursor, and GitHub Copilot.

bash
Code copied!
coralite init-agent [options]

coralite validate-pages (Page Document Validator) #

The coralite validate-pages command audits static HTML pages for unknown custom element tags, missing required component attributes, and inline script encapsulation leaks.

bash
Code copied!
coralite validate-pages [options]

coralite validate-components (Component Validator) #

The coralite validate-components command (alias: coralite validate:components) performs static AST and template validation across components to identify template syntax errors, missing refs, CSP violations, serialization leaks, and unused symbols.

bash
Code copied!
coralite validate-components [options]

coralite validate-plugins (Plugin Validator) #

The coralite validate-plugins command (alias: coralite validate:plugins) validates plugin contracts, lifecycle hook signatures, serializable client options, and isomorphic boundaries.

bash
Code copied!
coralite validate-plugins [options]

Start Building with Coralite!

Use the scaffolding script to get jump started into your next project with Coralite

Copied commandline!