KnowledgeAsCode.Tool 0.26.0

dotnet tool install --global KnowledgeAsCode.Tool --version 0.26.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local KnowledgeAsCode.Tool --version 0.26.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=KnowledgeAsCode.Tool&version=0.26.0
                    
nuke :add-package KnowledgeAsCode.Tool --version 0.26.0
                    

kac: knowledge as code

kac reads a folder of Markdown documents kept in git and checks each one against a schema. The folder a document sits in names its type. The corpus's own .schema/ holds one file per type, saying what fields and rules that type has. A repository of those documents, with the schema it runs, is a corpus.

What the structure buys you: indexes built from the documents themselves, and a broken cross-reference that fails CI. An agent contributing to the corpus can be told where a document goes.

kac has no rules about any particular type. It reads what to enforce from the schema the corpus holds, so you add a knowledge type by writing a YAML file.

Install

dotnet tool install --global KnowledgeAsCode.Tool

Start a corpus

kac new turns the folder you are standing in into one. It takes the framework from the repository below, writes what a corpus is made of, and stops short of committing so you can read what it staged.

mkdir my-corpus && cd my-corpus
kac new          # asks a few short questions, each with a default

Use

kac finds a corpus by walking up from the working directory for a .corpus.yaml, the descriptor that names the corpus, so run it from anywhere inside one.

kac validate     # frontmatter, links, structure, clauses and the graph
kac generate     # regenerate the indexes and the generated blocks in each type page
kac update       # take a newer framework from the template this corpus was made from
kac restore      # fetch the corpora this one consumes into .imports/
kac export       # write the corpus to .dist/export/ as data a consumer reads instead of cloning
kac bundle       # assemble that export and .plugin/ into an installable plugin
kac pack         # zip that export into a versioned package a registry can hold
kac checks       # list every check the validator can report

kac update writes into the working tree and commits nothing, so git diff is where you read what arrived. kac update --check reports the same and writes nothing, which is the form a pipeline runs.

kac --help lists them, and every command takes its own --help.

Exit codes

Code Meaning
0 No errors. Warnings may still have been printed.
1 A corpus error, or a bad invocation.
2 A command found no corpus. new, --version and --help need none and answer anyway.

Where to go next

The repository this tool is built from has the framework's documentation, a page for each record type, and a reference for every command:

https://github.com/paul80nd/knowledge-as-code

It also holds worked corpora you can read before you write your own.

Released under the MIT licence.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.26.0 44 9/13/2026
0.25.0 90 9/9/2026
0.24.0 88 9/8/2026
0.23.0 95 9/7/2026
0.22.0 96 9/7/2026
0.21.0 96 9/7/2026
0.20.0 97 9/1/2026
0.19.0 90 8/31/2026
0.18.0 84 8/31/2026
0.17.0 102 8/29/2026
0.16.0 95 8/28/2026
0.15.0 92 8/28/2026
0.14.0 98 8/27/2026
0.13.0 98 8/26/2026
0.12.0 93 8/26/2026
0.11.0 92 8/26/2026
0.10.0 105 8/25/2026
0.9.0 99 8/25/2026
0.8.0 97 8/25/2026
0.7.0 116 8/25/2026
Loading failed