knowledge-base-cli
knowledge-base-cli provides the knowledge-base command for checking, reading, searching, and updating a file-based knowledge base.
Installation and setup
Install the executable from crates.io:
Set KNOWLEDGE_BASE_PATH to the directory that contains your knowledge base:
Every knowledge base needs an extensions.yaml file, even when it uses no extensions:
version: 1
extensions:
Commands that read or change the knowledge base check this file before they run. --help, --version, and knowledge-base ingestion retrieval fetch do not need KNOWLEDGE_BASE_PATH or an extension manifest.
Extensions
Use these commands to inspect the configured extensions:
extension list prints a deterministic YAML summary of extensions declared by the repository and extensions included in the executable. extension check verifies the manifest, extension dependencies, configured ontology bindings, and ontology contracts.
Common commands
Validate the complete knowledge base:
Read stored resources by identifier:
Search entities or query statement values:
Apply statements from a YAML manifest, using --dry-run to preview the result first:
Each statement needs an entity, property, typed value, and at least one reference. A batch is applied completely or not at all.
Register a source reference or preview the result:
Fetch a webpage into a retrieval bundle, then register its source reference:
Validate an ingestion candidate inventory:
The inventory must use that exact filename and its declared page.html file must be beside it.
Output and exit status
Read commands write the stored file exactly as written. Query, mutation, and extension inspection commands write deterministic YAML. Diagnostics and command errors are written to standard error.
Commands exit unsuccessfully when configuration is missing, the manifest or extension set is invalid, input is invalid, a resource cannot be read, validation finds a problem, or a mutation cannot be applied.