Getting Started¶
Build a bundle from a repository, then inspect and query it from the CLI or MCP.
Install¶
Download the platform-specific kl4a binary from the
latest release. It is
the supported entry point for CodeKB in this release; there is no separate
codekb download. Put the binary on your PATH; on macOS or Linux, make it
executable first:
chmod +x kl4a-<platform>
Verify the CLI resolves:
kl4a --use codekb --help
CodeKB currently parses Python and COBOL source. Other languages are inventoried and reported as unsupported, but do not yet produce parsed modules or symbols.
Build A Bundle In One Command¶
codekb build runs the whole pipeline — create, scan, parse, resolve, detect,
mine, render, validate — against a repository folder:
kl4a --use codekb build /path/to/repo --bundle ./my-code-bundle --mining static
--mining static is deterministic and offline. Use it first: it needs no
provider configuration and gives you a complete bundle to look at.
When it finishes you have:
my-code-bundle/
manifest.yaml profile: code-knowledge-bundle
.codekb/ pipeline state, one file per stage
code/ rendered module and symbol pages
reports/ validation, coverage, relation resolution
overview.md the human entry point
Build It Step By Step Instead¶
codekb build is the composition of commands you can also run individually — useful
when you want to re-run one stage without redoing the rest:
kl4a --use codekb init ./my-code-bundle --repo /path/to/repo
kl4a --use codekb scan /path/to/repo --bundle ./my-code-bundle
kl4a --use codekb parse ./my-code-bundle
kl4a --use codekb relations ./my-code-bundle
kl4a --use codekb architecture ./my-code-bundle
kl4a --use codekb mine ./my-code-bundle
kl4a --use codekb render ./my-code-bundle
kl4a --use codekb validate ./my-code-bundle
Verify It¶
kl4a --use codekb validate ./my-code-bundle
kl4a --use codekb repo describe ./my-code-bundle
validate reports errors and warnings; the full report is written to
reports/validation.md.
Unresolved relations are warnings, not errors. A call to something outside the parsed repository is a fact about the repository, not a defect — see Relation resolution.
Ask It Something¶
The point of a bundle is what an agent gets back from it:
kl4a --use codekb context ./my-code-bundle --task explain --query "batch processing"
Use the result to verify that the bundle returns relevant, grounded context.
Next¶
- Pipeline & Mining — static versus hybrid, and what hybrid adds
- Knowledge & Review — why some claims need a decision
- MCP Server — handing the bundle to an agent
- CLI Reference — every command and flag