Skip to content

lllm.hub

Package manifests, validation, local hubs, and static catalogs. Import from lllm.hub. Guides: Packages, The hub; metadata: Hub metadata.

Manifests

load_manifest

load_manifest(path: str | Path) -> PackageManifest

manifest_path

manifest_path(path: str | Path) -> Path

PackageManifest

Bases: BaseModel

Machine-readable lllm.toml package contract.

One file serves both readers: the hub reads [package] identity and named resources such as [tactics.echo]; the native runtime reads [dependencies] and folder discovery ([prompts] paths = [...], [tactics] paths = [...], and custom sections). Discovery sections are collected into :attr:discovery, keyed by section name.

init_package

init_package(path: str | Path = '.', *, name: str | None = None, org: str = 'local', kind: str = 'mixed', force: bool = False) -> Path

Validation

validate_package

validate_package(path: str | Path) -> ValidationReport

ValidationReport

Bases: BaseModel

ValidationIssue

Bases: BaseModel

PublishValidationError

PublishValidationError(report: ValidationReport)

Bases: ValueError

Raised when validated publish receives an invalid package.

Hubs and catalogs

LocalHub

LocalHub(root: str | Path = '.lllm/hub')

A deterministic local package hub.

build_catalog

build_catalog(hub: LocalHub, output_dir: str | Path, *, generated_at: str | None = None, bundle: dict[str, Any] | None = None) -> dict[str, Any]

Write data/catalog.json and package zips for every package in hub.

create_app

create_app(*, hub: LocalHub | None = None, hub_root: str | Path = '.lllm/hub')

Create a local package-hub API over a disk-backed hub.

Cards

render_package_card

render_package_card(record: PackageRecord) -> str

render_agent_card

render_agent_card(record: PackageRecord) -> str

Render concise package instructions for coding agents.

render_config_template

render_config_template(record: PackageRecord) -> str