Skip to content

Command-line Interface ​

CandleC provides commands to build, validate, and clean a project. Each command accepts an optional project directory; it defaults to the current directory.

sh
candlec [--help] [--version] <command> [PROJECT] [--json]

Running candlec without a command prints the help text. --help displays command help, and --version prints the CandleC version.

Commands ​

CommandPurpose
candlec build [PROJECT]Compiles and links the project into a .candle executable.
candlec check [PROJECT]Checks source and project structure without writing an executable.
candlec clean [PROJECT]Removes the contents of the configured output directory.

For example, build and validate the project in the current directory:

sh
candlec build
candlec check

Pass a directory to select another project:

sh
candlec build path/to/project

See Projects for candlec.toml, build output, and validation details.

JSON diagnostics ​

Add --json after a command to emit one machine-readable result instead of human-readable diagnostics:

sh
candlec check path/to/project --json

The result contains schema_version, task, success, a diagnostics array, and a summary of error and warning counts. Each diagnostic includes its severity, code, and message; source file, line, and column are included when available.

Successful commands exit with status 0. A failed build, check, or clean exits with status 1. In human-readable mode, progress and diagnostics are printed to standard error. JSON mode prints the result as JSON.

Built for the Candle ecosystem · Powered by VitePress.