Skip to content

CLI Quick Start

All Drydock tools work directly from the command line. Install first:

pip install -e .

Then use the drydock command:

drydock --help
drydock list

The One-Shot Command

# Compile full project context (runs ALL analyzers)
drydock context /path/to/project -o context.json

# Human-readable version
drydock context /path/to/project --markdown -o context.md

Individual Tools

Boundary Detector (the killer feature)

drydock boundaries /path/to/project -o boundaries.json

Tells you exactly which clusters of files can be safely extracted, which files are bridges between components, and rates extraction risk.

Code Map

drydock codemap /path/to/project -o codemap.json

# Markdown for humans
drydock codemap /path/to/project --markdown

Interface Extractor

drydock interfaces /path/to/project -o interfaces.json

Dependency Analyzer

drydock dependencies /path/to/project -o deps.json

# See in markdown format
drydock dependencies /path/to/project --markdown

Structure Analyzer

drydock structure /path/to/project -o structure.json

# Markdown is more readable for structure
drydock structure /path/to/project --markdown

Platform Detector

drydock platforms /path/to/project -o platforms.json

Git Analyzer

# Requires a full clone (not --depth 1)
drydock git /path/to/project --days 180 -o git.json

Common Options

All analyzers accept these flags:

drydock <analyzer> <path> [options]

# Output options
--output, -o FILE         Write to FILE instead of stdout
--markdown, -m            Render as Markdown (default: JSON)
--compact, -c             Compact JSON, no indentation

# Scope options
--no-tests                Exclude test files from analysis
--max-files N             Stop after N files (partial results flagged)
--skip-dir NAME           Additional directory to skip (repeatable)
--follow-symlinks         Follow symlinked directories

Full Workflow

# 1. Analyze a project
drydock context /path/to/project -o context.json

# 2. Find extraction points
drydock boundaries /path/to/project -o boundaries.json

# 3. Inspect public interfaces
drydock interfaces /path/to/project --markdown

# 4. Understand dependencies
drydock dependencies /path/to/project -o deps.json

# 5. Check git history for stability
drydock git /path/to/project --days 180

Output Formats

All analyzers support two output modes:

Flag Format Best for
(default) JSON AI agents, programmatic consumption
--markdown Markdown Human review, documentation

Use -o filename to write to a file, or omit to print to stdout.