strata

command module
v0.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

CI Go Report Card Release Docs

strata indexes a container registry into one local DuckDB file and answers three questions about any image:

  • What is it? Labels, annotations, config, layers with the build step behind each, size and referrers.
  • Where did it come from? Its ancestry back to the root base, with parents found from exact layer-prefix matches and confirmed by OCI base annotations or labels.
  • Is it stale? An explainable verdict, fresh, drifting, stale or abandoned, built from base drift, supersession, tag status and policy, with the reasons spelled out.

It needs registry read access and nothing else: no source repos, no CI, no database server. It reads manifests and configs and never pulls a layer blob.

Install

go install github.com/rossedman/strata@latest   # needs a C compiler: DuckDB links through cgo

Or download a signed archive for Linux, macOS or Windows from Releases. Verifying releases shows how to check the signature and provenance.

Quick start

strata index --registry reg.example.com          # credentials come from your Docker config
strata stale --group-by label.team               # where are the stale images?
strata explain reg.example.com/payments/api:1.8.2
strata descendants reg.example.com/base/go:1.22 --all-versions --depth 0
strata query 'label.team = "payments" and age > 180d and not has:sbom'
strata ui                                         # the web UI on 127.0.0.1:7878
strata serve                                      # web UI, JSON API and MCP for a team

No registry handy? go run ./examples/demo-registry starts one seeded with realistic images; the getting-started guide walks through it.

Configuration

Settings resolve flag first, then STRATA_* environment variables, then strata.yaml, then defaults. The config file is found at $XDG_CONFIG_HOME/strata/strata.yaml, ~/.config/strata/strata.yaml, ~/.strata.yaml or ./strata.yaml. See Configuration for every key.

Documentation

Everything else is at rossedman.github.io/strata: how lineage and staleness work, the query language, graphs, serving and MCP, and the generated command and API reference.

Contributing

See CONTRIBUTING.md. make check runs everything CI runs. Security issues go through SECURITY.md.

strata is licensed under Apache-2.0.

Documentation

Overview

Command strata indexes a container registry into a queryable lineage graph.

Directories

Path Synopsis
Package cmd defines strata's commands, one per file.
Package cmd defines strata's commands, one per file.
examples
demo-registry command
Command demo-registry runs an in-memory OCI registry seeded with a realistic organization's images, so strata can be tried without access to a real registry:
Command demo-registry runs an in-memory OCI registry seeded with a realistic organization's images, so strata can be tried without access to a real registry:
internal
api
Package api serves strata's HTTP API.
Package api serves strata's HTTP API.
chain
Package chain computes OCI layer chain IDs.
Package chain computes OCI layer chain IDs.
cli
Package cli holds what strata's commands share: configuration loading through viper, opening the index, and output helpers.
Package cli holds what strata's commands share: configuration loading through viper, opening the index, and output helpers.
config
Package config defines strata's configuration file, strata.yaml.
Package config defines strata's configuration file, strata.yaml.
crawl
Package crawl walks a registry over the OCI Distribution API and writes what it finds to the index: repos, then tags, then manifests and image configs.
Package crawl walks a registry over the OCI Distribution API and writes what it finds to the index: repos, then tags, then manifests and image configs.
fixture
Package fixture builds synthetic images and indexes for tests, so lineage, staleness and query tests can describe a registry in a few lines instead of crawling one.
Package fixture builds synthetic images and indexes for tests, so lineage, staleness and query tests can describe a registry in a few lines instead of crawling one.
graph
Package graph is the lineage graph strata renders: nodes for images, external roots and phantom ancestors, edges with their provenance, and the budget rules that keep a descendant tree of a popular base readable.
Package graph is the lineage graph strata renders: nodes for images, external roots and phantom ancestors, edges with their provenance, and the budget rules that keep a descendant tree of a popular base readable.
lineage
Package lineage derives parent edges between images from their layer stacks, adds the parents images declare in annotations and labels, and materializes ancestry facts for fast queries.
Package lineage derives parent edges between images from their layer stacks, adds the parents images declare in annotations and labels, and materializes ancestry facts for fast queries.
mcpserver
Package mcpserver exposes strata's questions as Model Context Protocol tools, so an agent can ask "which prod images are on an EOL base?" and get an answer from the index directly.
Package mcpserver exposes strata's questions as Model Context Protocol tools, so an agent can ask "which prod images are on an EOL base?" and get an answer from the index directly.
model
Package model holds the records strata indexes: images, tags, layers, referrers and lineage edges.
Package model holds the records strata indexes: images, tags, layers, referrers and lineage edges.
query
Package query parses strata's filter language and compiles it to SQL, so every filter runs inside DuckDB rather than in application memory.
Package query parses strata's filter language and compiles it to SQL, so every filter runs inside DuckDB rather than in application memory.
render
Package render writes strata's answers as tables, trees, JSON, CSV, NDJSON, Mermaid, DOT, SVG and self-contained HTML.
Package render writes strata's answers as tables, trees, JSON, CSV, NDJSON, Mermaid, DOT, SVG and self-contained HTML.
service
Package service answers strata's questions over an index: what an image is, where it came from, what is built on it, and whether it is stale.
Package service answers strata's questions over an index: what an image is, where it came from, what is built on it, and whether it is stale.
stale
Package stale gives every image an explainable staleness verdict.
Package stale gives every image an explainable staleness verdict.
store
Package store keeps strata's index in a local DuckDB file.
Package store keeps strata's index in a local DuckDB file.
testenv
Package testenv builds an indexed test registry for tests of the interfaces on top of the service: the API, MCP server, CLI and commands.
Package testenv builds an indexed test registry for tests of the interfaces on top of the service: the API, MCP server, CLI and commands.
testreg
Package testreg runs an in-memory OCI registry seeded with a small, realistic image graph, for crawler, CLI and API tests.
Package testreg runs an in-memory OCI registry seeded with a small, realistic image graph, for crawler, CLI and API tests.
ui
Package ui holds every terminal style strata uses, built from the brand palette with adaptive colors that read on light and dark terminals, and the slog setup.
Package ui holds every terminal style strata uses, built from the brand palette with adaptive colors that read on light and dark terminals, and the slog setup.
web
Package web serves strata's web UI: a few static files embedded in the binary that read the JSON API.
Package web serves strata's web UI: a few static files embedded in the binary that read the JSON API.
pkg
client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
tools
doccheck command
Command doccheck fails if any function or method in the given packages lacks a doc comment, or any package lacks a package comment.
Command doccheck fails if any function or method in the given packages lacks a doc comment, or any package lacks a package comment.
gendocs command
Command gendocs writes one Markdown reference page per strata command into docs/reference/commands, so the docs never drift from the CLI.
Command gendocs writes one Markdown reference page per strata command into docs/reference/commands, so the docs never drift from the CLI.
generated command
Command generated prints the import-path-qualified names of generated Go files (those with a "Code generated ...
Command generated prints the import-path-qualified names of generated Go files (those with a "Code generated ...
internal/gofiles
Package gofiles walks the Go packages named by command-line patterns and parses their files, for the repo's check tools.
Package gofiles walks the Go packages named by command-line patterns and parses their files, for the repo's check tools.

Jump to

Keyboard shortcuts

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