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.
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
| Command | Purpose |
|---|---|
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:
candlec build
candlec checkPass a directory to select another project:
candlec build path/to/projectSee 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:
candlec check path/to/project --jsonThe 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.