Skip to main content
Version: 0.4.0

kq fmt

Rewrites each .kq file you wrote in canonical form: two-space indents, one statement per line, aligned columns, and every reference in its shortest form. Comments and blank lines are kept. Each file is read with the rest of its model, so references across files are understood, but nothing moves between files. <name>.g.kq is left alone.

kq fmt [options] <path>...

Arguments

ArgumentIs
<path>...A .kq file, or a folder of them.

Options

OptionDoes
--checkWrite nothing; exit 1 if a file would change.

Environment

VariableDoes
KANONIQ_TELEMETRYoff, 0 or false stops kq reporting the run; so does DO_NOT_TRACK=1.

Exit codes

CodeMeans
0Done
1Failed: the model has an error, a check found a change, or a file could not be read or written
2Usage error: an unknown command or option, a missing or extra argument, a path that does not exist, or an output folder kq will not clear

The Kanoniq extension for VS Code does the same on save.

© 2026 Extenza Works. All rights reserved.