OpenKB CLI & SDK Reference

Technical reference for OpenKB CLI commands, options, and programmatic APIs.

APISTABLE

OpenKB CLI API Reference

Command line interface specifications for @todo-labs/openkb.

openkb init [dir]

Scaffolds a complete OpenKB documentation repository in the target directory.

dirstringpathoptionaldefault: .

The directory path where starter documentation files should be created.


openkb dev

Starts the local Astro live-reloading preview server.

portnumberqueryoptionaldefault: 3000

Port number to listen on. Defaults to 3000.


openkb build

Compiles documentation into 100% static HTML/CSS/JS and builds the Pagefind search index.

dist/directoryrequired

Contains all static HTML files, JavaScript bundles, CSS stylesheets, and precomputed search indexes.


openkb generate

Synthesizes evidence-backed OKF concept documentation with a read-only OpenCode research agent.

initbooleanqueryoptionaldefault: false

Performs full initial codebase analysis and documentation creation.

updatebooleanqueryoptionaldefault: false

Refreshes generated documentation with fresh repository research.