registry-cli

module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: BSD-2-Clause

README

registry-cli

CI Security Go Report Card License

A CLI tool for building TS11-compliant Catalogue of Attestations sites from credential schemas discovered across GitHub repositories.

Overview

registry-cli discovers credential type metadata (VCTMs) from configured source repositories, validates them against the TS11 schema-meta model, and produces a static site with:

  • Per-credential detail pages with TS11 metadata
  • Rendered rulebooks (from co-located rulebook.md)
  • A JSON API (/api/v1/schemas.json) with per-schema endpoints
  • An OpenAPI specification
  • Optional JWS signing of all API responses

Installation

go install github.com/sirosfoundation/registry-cli/cmd/registry-cli@latest

Usage

Build a site
registry-cli build \
  --sources sources.yaml \
  --output dist \
  --base-url https://registry.siros.org \
  --templates templates-go \
  --static static
Sign API responses (requires PKCS#11 or dev key)
registry-cli sign \
  --input dist/api/v1 \
  --key-mode dev

Sources manifest

The sources.yaml file declares where to find credential repositories:

defaults:
  branch: vctm

sources:
  # Auto-discover by GitHub topic
  - "github:topic/vctm?org=sirosfoundation"

  # Explicit repository
  - "git:https://github.com/org/repo.git"

  # Local directory with explicit organization label
  - url: "file:///path/to/local/credentials"
    organization: "MyOrg"

  # Remote repo with custom org label
  - url: "git:https://github.com/other/repo.git"
    organization: "CustomLabel"

Source entries can be plain strings or structs with url and optional organization fields. Local (file://) sources default to organization "Local" if no label is provided.

Schema-meta

Each credential can have a co-located .schema-meta.yaml file providing TS11 metadata:

attestation_los: substantial
binding_type: cnf
version: "1.0"

These are discovered automatically from the vctm branch of each repository.

Packages

Package Purpose
pkg/discovery Source resolution, GitHub topic search, repo cloning
pkg/schemameta TS11 schema-meta parsing, inference, validation
pkg/render HTML template rendering, markdown conversion
pkg/jwssign JWS signing (dev, SoftHSM, YubiHSM) via PKCS#11
pkg/apihandler TS11 REST API with filtering, pagination, JWS-signed responses
pkg/ts11compliance TS11 specification compliance test suite
pkg/mdcred Markdown-based credential conversion

Serve (development)

registry-cli serve --sources sources.yaml --output dist --port 8080

Docker

# Build and run with docker compose
docker compose up --build

# Or build the image directly
docker build -t registry-cli:latest .
docker run -p 8080:8080 -v ./sources:/data/sources:ro registry-cli:latest

Testing

make test              # Unit tests
make test-softhsm      # Include SoftHSM PKCS#11 integration tests
make coverage           # Coverage report
make lint               # Run linter

License

See LICENSE.

Directories

Path Synopsis
cmd
registry-cli command
pkg
attributes
Package attributes implements the TS11 §2 Catalogue of Attributes.
Package attributes implements the TS11 §2 Catalogue of Attributes.
jwssign
Package jwssign implements JWS compact serialization signing.
Package jwssign implements JWS compact serialization signing.
mdcred
Package mdcred converts markdown credential definitions to VCTM format files.
Package mdcred converts markdown credential definitions to VCTM format files.
mtcvctm/config
Package config provides configuration handling for mtcvctm
Package config provides configuration handling for mtcvctm
mtcvctm/formats
Package formats provides the interface and registry for credential metadata format generators
Package formats provides the interface and registry for credential metadata format generators
mtcvctm/formats/mddl
Package mddl provides the MDDL format generator for mso_mdoc credentials (ISO 18013-5)
Package mddl provides the MDDL format generator for mso_mdoc credentials (ISO 18013-5)
mtcvctm/formats/vctmfmt
Package vctmfmt provides the VCTM format generator for SD-JWT VC credentials
Package vctmfmt provides the VCTM format generator for SD-JWT VC credentials
mtcvctm/formats/w3c
Package w3c provides the W3C VC format generator for W3C VCDM 2.0 credentials
Package w3c provides the W3C VC format generator for W3C VCDM 2.0 credentials
mtcvctm/parser
Package parser provides markdown parsing and VCTM generation
Package parser provides markdown parsing and VCTM generation
mtcvctm/rules
Package rules provides an extensible rules engine for normalizing VCTM data.
Package rules provides an extensible rules engine for normalizing VCTM data.
mtcvctm/vctm
Package vctm provides data structures and utilities for Verifiable Credential Type Metadata as specified in Section 6 of draft-ietf-oauth-sd-jwt-vc-12.
Package vctm provides data structures and utilities for Verifiable Credential Type Metadata as specified in Section 6 of draft-ietf-oauth-sd-jwt-vc-12.
render
Package render handles HTML template rendering and markdown-to-HTML conversion for the registry site.
Package render handles HTML template rendering and markdown-to-HTML conversion for the registry site.
schemameta
Package schemameta handles parsing, inference, and validation of TS11 SchemaMeta objects.
Package schemameta handles parsing, inference, and validation of TS11 SchemaMeta objects.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL