Repository navigation
Home
Welcome to z-oci!
If you need registry metadata from Zig, start here. z-oci reads OCI and Docker image references, resolves manifests to verified digests, and keeps the choice between library and CLI use clear.
z-oci is read-only. It can parse references, authenticate through the OCI Bearer flow when configured, fetch and verify manifests, validate exact digests, inspect metadata, and select platforms from multi-arch indexes. It does not pull layers, push images, build images, or run containers.
- Use the library when your program should own its allocator, I/O, HTTP client, credentials, and result lifetime.
- Use the CLI when you want
resolve,validate, orinspectfrom a shell, script, or CI job.
Both paths use the same public resolver implementation. The library keeps process credential discovery opt-in. The CLI wires process sources for its own invocation. See Credentials before adding authenticated access.
- Installation explains dependency and checkout builds.
-
Library shows a complete
resolvecall and cleanup paths. - CLI covers command grammar, output, streams, and exit codes.
- Examples separates offline fixture flows from the live resolver example.
- Troubleshooting covers command, credential, HTTPS, and platform failures.
-
Referenceparses and normalizes Docker and OCI image references. -
resolvereturns a verified digest-pinned result. -
validatechecks whether an exact digest exists without returning a manifest. -
getManifestreturns a parsed manifest document. -
inspectreturns top-level manifest or index metadata and an optional selected leaf. -
resolveManyresolves references sequentially with caller-owned results. -
pingRegistrychecks registry/v2/reachability independently of resolution.
The platform selector handles OCI image indexes and Docker manifest lists. The Platform and limits page describes matching rules, nested-index limits, HTTPS boundaries, and Config defaults.
The package requires Zig 0.16.0 or later, has no external package dependencies, and is released under the MIT License. The current package and latest tagged release are v0.7.0.
For registry evidence and known boundaries, see Registry compatibility. The documentation pages are the maintained starting point for using the package.