Command-line reference
text
kern [--config <PATH>] <COMMAND>--config selects a kern.toml. Without it, Kern walks upward from the current directory and uses the nearest one. kern verify ignores this option and never reads kern.toml; it requires an explicit manifest path.
Commands
| Command | Purpose | GPU required |
|---|---|---|
kern verify <MANIFEST> | Verify a manifest and print its serving protocol | No |
kern run [TARGET] | Greedy single-sequence generation | Yes |
kern test [TARGET] | A/B a candidate manifest against a reference | Yes |
kern bench [TARGET] | Export raw program and call measurements | Yes |
kern kernels [TARGET...] | Build and collect modules pinned by targets | Depends on inputs |
Use kern <command> --help for all command-specific flags. That output is generated from the same option types the command parses.
Input precedence
For settings supported by both forms, an explicit command-line flag takes precedence over the selected target or section in kern.toml; configuration takes precedence over the built-in default.
Output and exit status
- Diagnostics and logs are written to stderr.
kern runwrites generated text to stdout.kern test --jsonwrites one JSON object to stdout.kern verifyexits with1when verification fails.kern verifylogsverifiedat INFO level only after both manifest and serving protocol checks pass. Failures are logged at ERROR level; both go to stderr. The serving protocol summary goes to stdout on success.kern testexits with0for PASS,1for FAIL, and2for INCONCLUSIVE.
Environment
RUST_LOG controls log filtering. Device selection is explicit through --gpu or the gpu field in kern.toml.