Skip to main content

kb-artifacts

CI PyPI Python: >=3.10 License: MIT

kb-artifacts is a small Python library and CLI for inspecting, filtering, selecting, and reproducibly exporting records from JSONL evidence collections.

What it does

  • Reads newline-delimited JSON without modifying the source files.
  • Accepts common fields including title, text, content, summary, tags, timestamps, and nested meta values.
  • Filters records by tags, fields, dates, text, family, and maturity.
  • Writes the same selection as JSONL, CSV, readable Markdown, and a provenance manifest.

Install

python -m pip install kb-artifacts
kb-artifact --help

Python 3.10 or newer is required.

60-second example

Create a two-record JSONL collection:

cat > evidence.jsonl <<'EOF'
{"title":"Deploy app","text":"Build and deploy the service","tags":["runbook","ops"]}
{"title":"Buy groceries","text":"Milk and bread","tags":["personal"]}
EOF

Select the runbook record:

kb-artifact select \
  --chunk-glob evidence.jsonl \
  --tag runbook \
  --output selected

The command reports selected=1 and creates:

selected/
├── selected.jsonl
├── selected.csv
├── artifact.md
└── manifest.json

selected.jsonl is the machine-readable selection, selected.csv is convenient for spreadsheets, artifact.md is readable output, and manifest.json records the request, input checksum, counts, and generated files.

Python API

from kb_artifacts import SelectionRequest, select

request = SelectionRequest(
    chunk_globs=("evidence.jsonl",),
    tags=("runbook",),
)

result = select(request, output="selected-python")
print(result["counts"]["selected"])  # 1

The supported public API for 0.1 is EvidenceRecord, SourceReference, SelectionDecision, SelectionRequest, inspect_source(), and select(). See the Python API documentation for signatures and the 0.x stability boundary.

CLI

Inspect bounded source metadata without including record bodies:

kb-artifact inspect source \
  --chunk-glob evidence.jsonl \
  --output source-report.json

Use kb-artifact --help, kb-artifact select --help, or kb-artifact inspect source --help for all options. Repeated tags use OR semantics; different filter types must all match.

Documentation / development

The documentation covers selection, provenance, operational guarantees, and interoperability. Runnable examples live in examples/.

For a development checkout:

python -m pip install -e '.[dev,docs]'
make test
make smoke
make distribution-test

make distribution-test builds both distribution formats, installs the wheel into an isolated temporary environment, verifies the public imports, runs the installed CLI help, and selects the minimal example outside the source checkout.

Source code and issues are hosted on GitHub. See CONTRIBUTING.md before proposing a change, CHANGELOG.md for user-visible changes, and SECURITY.md for private vulnerability reporting.

Metadata

Release files for kb-artifacts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kb-artifacts 0.1.0
File Size Uploaded
kb_artifacts-0.1.0.tar.gz 27.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kb-artifacts 0.1.0
File Interpreter ABI Platform
kb_artifacts-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.9 kB

Release files / kb_artifacts-0.1.0.tar.gz

Download URL kb_artifacts-0.1.0.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7c259b9b6ec94e3230a9b347b1177880836553ef2b858b52b37995769f362d64
BLAKE2b-256 checksum
How to use checksums
d6d6486fa6a8e69f36a643bdf75f8542a8233f8f7ad0678bf9c95fde73689581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / kb_artifacts-0.1.0-py3-none-any.whl

Download URL kb_artifacts-0.1.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59a621dae4f1ea99baea4239081735b88b7a2387f3932b406b5100296a8108f4
BLAKE2b-256 checksum
How to use checksums
f41bf90113852d1c2111dd2e065560ff3ec62d92975eaa8f25d84bf65d36d06b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page