Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Dive

$ dive Community Low Risk
Alex Goodman · Cloud & Infra · MIT · macos / linux / windows

Dive (dive) inspects Docker and OCI container image layers, file trees, and wasted bytes caused by duplicated or overwritten files. While its default invocation opens an interactive TUI, passing --ci (CI=true) or --json <path> turns it into a non-interactive image efficiency gate.

FCRS-1.0 Score
79 /100
Good
Medium Confidence
Zero-Friction Install
brew install dive
CLI vs MCP Decision CLI Only

dive analyzes local image tarballs and daemon layers directly on disk; MCP adds no value.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

--ci and --json <file> enable clean non-TTY execution and structured output, though bare dive <image> hangs in an interactive TUI and --json writes to a file rather than stdout.

  • --ci bypasses TUI and returns pass/fail exit codes
  • --json <file> writes structured report to disk instead of stdout
Trust & Safety 23 / 25

Strictly analyzes image layers without mutating images or containers (only writes an optional JSON report file).

  • Read-only image layer inspection
Setup & Portability 14 / 15

Single Go binary across macOS, Linux, and Windows via Homebrew and GitHub Releases.

  • Cross-platform binary via brew install dive
Utility & Efficiency 11 / 15

Uniquely surfaces wasted bytes from multi-stage leaks and layer overwrites, speeding up Dockerfile optimization.

  • Calculates exact efficiency score and wasted file bytes per layer
Maintenance & Lineage 6 / 10

Community MIT project (wagoodman/dive) with slower release cadence in recent years.

  • Maintained at wagoodman/dive under MIT license
Docs & Verifiability 7 / 10

Concise README covering --ci thresholds and .dive-ci config, plus --help.

  • CI flags documented in upstream README

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Reads local Docker daemon or Podman socket (--source docker|podman|docker-archive) with no Dive-specific credentials.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and open-source (MIT).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Dive Agent Rules
- NEVER invoke bare `dive <image>` without `--ci` or `--json <path>`—the default mode opens a blocking interactive TUI.
- Prefer `--source docker-archive` when analyzing local `.tar` exports without a running daemon.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run headless CI efficiency check on an image
dive app:dev --ci --highestUserWastedPercent 0.15

Evaluates image layer efficiency without launching the TUI and exits non-zero if wasted space exceeds 15%.

Export layer-by-layer analysis to a JSON file
dive app:dev --json dive-report.json

Writes layer sizes, efficiency score, and inefficient file paths to dive-report.json non-interactively.

Strengths for Agents

  • + --ci and --json <file> transform an interactive TUI into an automated image-bloat gate.
  • + Identifies exact duplicate/deleted files across layers that inflate image size.
  • + Supports docker, podman, and docker-archive tarball sources.

Caveats & Pitfalls

  • ! Calling dive <image> without --ci or --json launches a blocking interactive TUI.
  • ! --json <path> writes to a file on disk rather than streaming JSON to stdout.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI