lmok
lmok embeds tree-sitter 0.27.1 (12 languages), SQLite FTS5 code indexing, JSON and lmcode lint packs, SARIF output, and a REST server in one static CLI.
Quick reference
lmscript install github:lmctl-ai/lmok@latest
lmok --version
lmok --lmcode-schema --json
lmok --lmcode-signatures
lmok parse examples/data/sample.json
lmok lint rules/c-tier1.json examples/data/sample.c
| Item | Kind | Purpose |
|---|---|---|
| parse / query [--pattern] | CLI verbs | Print concrete syntax trees or match S-expression and code-shaped patterns. |
| lint / check / ci | CLI verbs | Run 18 JSON rule packs, compiled @NODE_KIND lmcode rules, or project CI gates. |
| facts / index / symbols / refs / find | CLI verbs | Extract definitions/references and query the SQLite + FTS5 trigram code database. |
| metrics / dup / outline | CLI verbs | Measure function counts and nesting, find duplicate tokens, or rank symbol outlines. |
| serve / remote | CLI verbs | Serve all analysis commands over a caching local REST API and remote client. |
| ts.parse* / query* / reparse* / report* and Rule | Host API | Incremental tree-sitter parsing, querying, findings sink, and @NODE_KIND SAM rules. |
p = _lmcode_ cli="lmok" install="github:lmctl-ai/lmok@latest";
let tree = ts.parse("{\"name\": \"lmok\", \"tags\": [\"tree-sitter\", \"json\"]}");
println(tree.sexp());
println("has_error -> " + str(tree.has_error()));
println("nodes -> " + str(tree.node_count()));
end _lmcode_
r = run_lmcode(p);
assert(r.ok);