Skip to main content

CLI Reference

Complete reference for the blob command-line tool.

Global Flags​

These flags apply to all commands:

FlagDescriptionDefault
--configPath to config file~/.config/blob/config.yaml
--output, -oOutput format: table, json, plaintable
-v, --verboseEnable verbose outputfalse
-q, --quietSuppress non-essential outputfalse
--no-colorDisable colored outputfalse
--plain-httpUse HTTP instead of HTTPS for registriesfalse

Core Commands​

blob push​

Push a directory to an OCI registry as a blob archive.

Synopsis:

blob push [flags] <reference> <directory>

Arguments:

ArgumentDescription
referenceOCI reference with tag (e.g., ghcr.io/org/repo:v1)
directorySource directory to archive

Flags:

FlagDescriptionDefault
--compression, -cCompression: none, zstdnone
--tag, -tAdditional tags to apply (repeatable)
--annotation, -aAdd annotation key=value (repeatable)
--max-filesMaximum file count (0 = unlimited)200000
--signSign the archive after pushingfalse

Examples:

# Basic push
blob push ghcr.io/myorg/archive:v1 ./src

# With compression
blob push --compression=zstd ghcr.io/myorg/archive:v1 ./src

# Multiple tags
blob push -t latest -t stable ghcr.io/myorg/archive:v1.0.0 ./src

# With annotations
blob push -a "org.opencontainers.image.source=https://github.com/myorg/repo" \
ghcr.io/myorg/archive:v1 ./src

# Push and sign (keyless, requires OIDC environment)
blob push --sign ghcr.io/myorg/archive:v1 ./src

See Also: OCI Client - Push Operations


blob pull​

Pull an archive from a registry and extract to a directory.

Synopsis:

blob pull [flags] <reference> <directory>

Arguments:

ArgumentDescription
referenceOCI reference (e.g., ghcr.io/org/repo:v1)
directoryDestination directory for extraction

Flags:

FlagDescriptionDefault
--prefix, -pExtract only files under this prefix. (all)
--overwriteOverwrite existing filesfalse
--preserve-modePreserve file permission modesfalse
--preserve-timesPreserve file modification timesfalse
--cleanRemove destination before extractingfalse
--workersParallel extraction workers (0 = auto)0
--skip-cacheBypass all cachesfalse
--verifyRequire signature verificationfalse
--policyPath to verification policy file

Examples:

# Basic pull
blob pull ghcr.io/myorg/archive:v1 ./dest

# Extract specific directory
blob pull --prefix=config ghcr.io/myorg/archive:v1 ./dest

# With metadata preservation
blob pull --preserve-mode --preserve-times ghcr.io/myorg/archive:v1 ./dest

# Clean extraction (removes existing files)
blob pull --clean ghcr.io/myorg/archive:v1 ./dest

# With signature verification
blob pull --verify ghcr.io/myorg/archive:v1 ./dest

See Also: Extracting Files


blob cp​

Copy specific files from an archive to a local directory.

Synopsis:

blob cp [flags] <source>... <directory>

Arguments:

ArgumentDescription
sourceArchive file reference: <ref>:<path>
directoryDestination directory

Flags:

FlagDescriptionDefault
--overwriteOverwrite existing filesfalse
--preserve-modePreserve file permission modesfalse
--preserve-timesPreserve file modification timesfalse

Examples:

# Copy single file
blob cp ghcr.io/myorg/archive:v1:config.json ./local/

# Copy multiple files
blob cp ghcr.io/myorg/archive:v1:config.json \
ghcr.io/myorg/archive:v1:src/main.go \
./local/

# With overwrite
blob cp --overwrite ghcr.io/myorg/archive:v1:config.json ./local/

blob cat​

Print file contents to stdout.

Synopsis:

blob cat [flags] <reference> <path>

Arguments:

ArgumentDescription
referenceOCI reference
pathFile path within the archive

Examples:

# Print file contents
blob cat ghcr.io/myorg/archive:v1 config.json

# Pipe to other commands
blob cat ghcr.io/myorg/archive:v1 data.json | jq '.items[]'

Inspection Commands​

blob ls​

List files in an archive.

Synopsis:

blob ls [flags] <reference> [prefix]

Arguments:

ArgumentDescription
referenceOCI reference
prefixOptional path prefix to filter files

Flags:

FlagDescriptionDefault
--long, -lShow detailed file informationfalse
--human, -hHuman-readable sizesfalse
--sortSort by: name, size, timename
--reverse, -rReverse sort orderfalse

Examples:

# List all files
blob ls ghcr.io/myorg/archive:v1

# List with details
blob ls -lh ghcr.io/myorg/archive:v1

# List specific directory
blob ls ghcr.io/myorg/archive:v1 src/

# Sort by size
blob ls -l --sort=size ghcr.io/myorg/archive:v1

blob tree​

Display archive contents as a tree.

Synopsis:

blob tree [flags] <reference> [prefix]

Arguments:

ArgumentDescription
referenceOCI reference
prefixOptional path prefix

Flags:

FlagDescriptionDefault
--depth, -dMaximum tree depth (0 = unlimited)0
--dirs-onlyShow only directoriesfalse

Examples:

# Full tree
blob tree ghcr.io/myorg/archive:v1

# Limited depth
blob tree -d 2 ghcr.io/myorg/archive:v1

# Specific subtree
blob tree ghcr.io/myorg/archive:v1 src/

blob inspect​

Show archive metadata and statistics.

Synopsis:

blob inspect [flags] <reference>

Arguments:

ArgumentDescription
referenceOCI reference

Flags:

FlagDescriptionDefault
--referrersList referrer artifacts (signatures, attestations)false
--skip-cacheBypass all cachesfalse

Examples:

# Basic inspection
blob inspect ghcr.io/myorg/archive:v1

# Include referrers (signatures, attestations)
blob inspect --referrers ghcr.io/myorg/archive:v1

Output (table format):

Digest:             sha256:abc123...
Created: 2024-01-15T10:30:00Z
Files: 42
Data blob size: 1.2 MB
Index blob size: 8.5 KB
Uncompressed size: 3.4 MB
Compression ratio: 0.35

Annotations:
org.opencontainers.image.source https://github.com/myorg/repo
org.opencontainers.image.created 2024-01-15T10:30:00Z

See Also: OCI Client - Inspect Operations


blob open​

Open interactive TUI file browser.

Synopsis:

blob open [flags] <reference>

Arguments:

ArgumentDescription
referenceOCI reference

Keyboard Shortcuts:

KeyAction
j/k or ↑/↓Navigate files
EnterOpen file / expand directory
h or ←Go to parent directory
l or →Expand / preview
/Search
n/NNext / previous search result
yCopy file path
qQuit

Examples:

# Browse archive
blob open ghcr.io/myorg/archive:v1

Security Commands​

blob sign​

Sign an archive manifest with Sigstore.

Synopsis:

blob sign [flags] <reference>

Arguments:

ArgumentDescription
referenceOCI reference (must exist)

Flags:

FlagDescriptionDefault
--keyPath to private key PEM file(keyless)
--fulcioFulcio server URLhttps://fulcio.sigstore.dev
--rekorRekor transparency log URLhttps://rekor.sigstore.dev
--oidc-issuerOIDC issuer URL(auto-detect)
--oidc-tokenOIDC identity token(ambient)

Examples:

# Keyless signing (GitHub Actions with OIDC)
blob sign ghcr.io/myorg/archive:v1

# With private key
blob sign --key private.pem ghcr.io/myorg/archive:v1

See Also: Provenance & Signing - Signing Archives


blob verify​

Verify archive signature and attestations.

Synopsis:

blob verify [flags] <reference>

Arguments:

ArgumentDescription
referenceOCI reference

Flags:

FlagDescriptionDefault
--policyPath to policy YAML file
--issuerRequired OIDC issuer
--identityRequired signer identity (subject)
--repoGitHub repo for GitHub Actions policy (owner/repo)
--branchesAllowed branches (comma-separated, supports wildcards)
--tagsAllowed tags (comma-separated, supports wildcards)

Examples:

# Verify with GitHub Actions policy
blob verify --repo=myorg/myrepo ghcr.io/myorg/archive:v1

# Verify with branch/tag restrictions
blob verify --repo=myorg/myrepo --branches=main --tags="v*" \
ghcr.io/myorg/archive:v1

# Verify with policy file
blob verify --policy=policy.yaml ghcr.io/myorg/archive:v1

# Verify with explicit identity
blob verify --issuer="https://token.actions.githubusercontent.com" \
--identity="https://github.com/myorg/repo/.github/workflows/release.yml@refs/heads/main" \
ghcr.io/myorg/archive:v1

Policy File Format:

# policy.yaml
signature:
issuer: https://token.actions.githubusercontent.com
subject_regex: "^https://github.com/myorg/.*"

provenance:
builder: https://github.com/slsa-framework/slsa-github-generator
source_repo: https://github.com/myorg/myrepo
branches:
- main
tags:
- "v*"

See Also: Provenance & Signing - Verification


blob tag​

Create or update a tag pointing to an existing manifest.

Synopsis:

blob tag [flags] <reference> <new-tag>

Arguments:

ArgumentDescription
referenceSource reference (tag or digest)
new-tagNew tag name

Examples:

# Tag v1.0.0 as latest
blob tag ghcr.io/myorg/archive:v1.0.0 latest

# Tag by digest
blob tag ghcr.io/myorg/archive@sha256:abc123... stable

Management Commands​

blob alias​

Manage registry aliases.

Synopsis:

blob alias <subcommand>

Subcommands:

blob alias add​

blob alias add <name> <registry-prefix>

Examples:

blob alias add prod ghcr.io/myorg/production
blob alias add staging ghcr.io/myorg/staging

blob alias rm​

blob alias rm <name>

blob alias list​

blob alias list

Output:

NAME     REGISTRY PREFIX
prod ghcr.io/myorg/production
staging ghcr.io/myorg/staging

blob cache​

Manage local caches.

Synopsis:

blob cache <subcommand>

Subcommands:

blob cache status​

Show cache statistics.

blob cache status

Output:

CACHE     SIZE      MAX       ENTRIES
refs 1.2 KB 5 MB 15
manifests 45 KB 10 MB 12
indexes 2.1 MB 50 MB 8
content 89 MB 100 MB 1,247
blocks 12 MB 50 MB 892

blob cache clear​

Clear caches.

blob cache clear [layer]

Arguments:

ArgumentDescription
layerOptional: refs, manifests, indexes, content, blocks

Examples:

# Clear all caches
blob cache clear

# Clear only content cache
blob cache clear content

blob config​

Manage configuration.

Synopsis:

blob config <subcommand>

Subcommands:

blob config show​

Display current configuration.

blob config show

blob config get​

Get a configuration value.

blob config get <key>

blob config set​

Set a configuration value.

blob config set <key> <value>

Examples:

blob config set output json
blob config set cache.dir ~/.cache/blob
blob config set cache.ref_ttl 10m

blob version​

Print version information.

Synopsis:

blob version [flags]

Flags:

FlagDescription
--shortPrint version number only

Output:

blob version 1.0.0
commit: abc1234
built: 2024-01-15T10:30:00Z
go: go1.21.5

Configuration​

Config File Format​

The configuration file is located at ~/.config/blob/config.yaml (or $XDG_CONFIG_HOME/blob/config.yaml).

# Output format: table, json, plain
output: table

# Disable colored output
no_color: false

# Use HTTP for all registries
plain_http: false

# Cache configuration
cache:
# Cache directory (empty = caching disabled)
dir: ~/.cache/blob

# Reference cache TTL
ref_ttl: 5m

# Cache size limits (bytes, supports K/M/G suffixes)
content_max: 100M
blocks_max: 50M
refs_max: 5M
manifests_max: 10M
indexes_max: 50M

# Registry aliases
aliases:
prod: ghcr.io/myorg/production
staging: ghcr.io/myorg/staging

# Default verification policy
verify:
enabled: false
policy: ~/.config/blob/policy.yaml

Environment Variables​

VariableDescriptionEquivalent Flag
BLOB_CONFIGConfig file path--config
BLOB_OUTPUTOutput format--output
BLOB_CACHE_DIRCache directorycache.dir
BLOB_NO_COLORDisable colors (any value)--no-color
BLOB_PLAIN_HTTPUse HTTP (any value)--plain-http

Environment variables override config file values. Flags override both.


Exit Codes​

CodeMeaning
0Success
1General error
2Invalid arguments or usage
3Archive not found
4Authentication failed
5Network error
6Verification failed (signature or policy)
7Hash mismatch (integrity error)

See Also​