strata

command module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 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.

From the same index it lists images safe to delete with the storage that frees after shared layers, plus ECR lifecycle policies to match (Cleanup).

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.

Three ways in

The web UI, the CLI and the MCP server all answer from the same index, so they give the same answers.

Web UI. strata ui opens it on your own index; strata serve shares it with a team behind your auth proxy. Overview, lineage, search, cleanup and image pages, built into the binary and fast at millions of images. Every view is a URL you can paste into a ticket, and each shows the command that reproduces it.


Lineage: bases, repos and images with verdict bars and drift
Search: the query language with live facets
Image: the verdict's reasons, ancestry and layers

CLI. Tables and trees in a terminal; JSON, CSV or NDJSON for scripts and CI; Mermaid, DOT, SVG or an offline HTML explorer for graphs.

MCP. Seven read-only tools (explain, ancestry, descendants, query, stale, roots and cleanup) for agents. The query tool teaches the filter language, so an agent can answer "which payments images are drifting?" by writing its own filter.

claude mcp add strata -- strata mcp

Install

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

Or download a signed archive for Linux or macOS 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
strata mcp                                        # MCP over stdio for a local agent

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.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
acr
Package acr lists Azure Container Registry through its /acr/v1 API instead of the distribution API.
Package acr lists Azure Container Registry through its /acr/v1 API instead of the distribution API.
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.
ecr
Package ecr lists Amazon ECR registries through the ECR API instead of the distribution API.
Package ecr lists Amazon ECR registries through the ECR API instead of the distribution API.
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.
gar
Package gar lists Google Artifact Registry Docker repositories through the Artifact Registry API instead of the distribution API.
Package gar lists Google Artifact Registry Docker repositories through the Artifact Registry API instead of the distribution API.
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.
harbor
Package harbor lists a Harbor registry through Harbor's v2 API instead of the distribution API.
Package harbor lists a Harbor registry through Harbor's v2 API instead of the distribution API.
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.
regapi
Package regapi is the HTTP client the registry API listers share: JSON GETs with authentication, paging through Link headers, and a count of calls for the crawl's request totals.
Package regapi is the HTTP client the registry API listers share: JSON GETs with authentication, paging through Link headers, and a count of calls for the crawl's request totals.
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