GitHub

CLI Reference

kov has 17 commands. here's what each does.

kov build

compile to binary.

text
kov build blink.kov -o firmware.elf
kov build blink.kov -o firmware.bin
kov build hello.kov -o hello --target x86-64

kov run

compile and execute in the built-in emulator.

text
kov run blink.kov
kov run blink.kov -c 50000

-c sets max cycles. default is 10,000.

kov asm

show generated RISC-V assembly with labels.

text
kov asm blink.kov

kov trace

output per-cycle JSON trace for the time-travel debugger.

text
kov trace blink.kov -c 500

kov wcet

worst-case execution time, stack depth, loop bounds, and energy analysis.

text
kov wcet blink.kov

kov check

type check without compiling. supports JSON error output.

text
kov check blink.kov
kov check blink.kov --error-format=json

kov test

run functions marked with #[test].

text
kov test tests.kov

kov repl

interactive compile and evaluate.

text
kov repl
kov> 3 + 4
  = 7 (0x7)

kov flash

compile and flash to hardware via probe-rs.

text
kov flash blink.kov --chip esp32c3

kov boards

list supported board targets.

kov init

create a new project with kov.toml and main.kov.

text
kov init myproject --board esp32c3

kov add

add a dependency to kov.toml.

text
kov add esp32c3-hal --git https://github.com/example/hal

kov svd

generate board definitions from SVD files.

text
kov svd esp32c3.svd --name esp32c3

kov import-c

generate extern declarations from C headers.

text
kov import-c hal.h

kov wcet-elf

analyze any RISC-V ELF binary for WCET and stack depth.

text
kov wcet-elf firmware.elf

kov lsp

start the language server for editor integration.

kov lex

dump tokens for debugging.