Coralite CLI

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

Command Structure #

The Coralite CLI is subcommand-based. Directories, output, and modes are declared in coralite.config.js (see the Configuration reference); the CLI only accepts flags that adjust the operation:

bash
Code copied!
coralite <command> [options]

Commands #

Command Description
coralite dev Start the development server with live reload and hot CSS updates.
coralite test Start the testing server used by coralite.config.js with mode: 'testing'.
coralite build Build the site for production.
coralite check Run a unified validation pass across Components, Plugins, and Pages.
coralite fix Apply deterministic AST auto-fixes in place.
coralite init-agent Scaffold AGENTS.md guidelines for AI coding assistants.
coralite validate-components Validate component templates, refs, serialization boundaries, and unused symbols.
coralite validate-pages Validate page documents against known component schemas.
coralite validate-plugins Validate plugin contracts, hook signatures, and serializable client options.

Shared Options (dev / test / build) #

Configuration File Support #

coralite dev, coralite test, and coralite build require a coralite.config.js file in the current working directory. Paths such as pages, components, and output, plus mode and cleanUrls, are all declared there via defineConfig imported from coralite — the CLI itself no longer accepts directory or output flags.

Examples #

1. Start the development server:

bash
Code copied!
coralite dev

2. Build for production with CLI asset mappings:

bash
Code copied!
coralite build -a ./src/logo.png:assets/logo.png -a my-package:dist/style.css:assets/style.css

3. Start the testing server:

bash
Code copied!
coralite test

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, Pages, and Plugins. It modifies source files in-place and re-audits the codebase to confirm issues are resolved.

bash
Code copied!
coralite fix [options]

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!