-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
Krait edited this page May 28, 2026
·
1 revision
The KOSL CLI utility (kosl) is the companion tool to parse, check, format, and transpile KOSL configuration files.
Ensure you have a working Rust toolchain. Run:
cargo install --path crates/kosl-cliAnalyzes a KOSL file and displays its validated Abstract Syntax Tree (AST) output. This is useful for debugging syntax configurations.
kosl parse file.koslTranslates a valid KOSL configuration into TOML syntax. It is primarily used to map Cargo.kosl to Cargo.toml.
# Output format defaults to replacing the extension with .toml
kosl transpile Cargo.kosl
# Specify a custom output path
kosl transpile Cargo.kosl --output Cargo.tomlThe CLI provides clear diagnostics for malformed inputs. Common syntax validation errors include:
-
Duplicate Key Errors: Under the KOSL specification, keys inside the same object scope cannot be redefined.
Error: Duplicate key strictly prohibited: 'dependencies' - Type Ambiguity: Catching invalid float representations and missing object closing tags.