dobbe

dobbe metrics

DORA and velocity metrics for GitHub repositories.

Subcommands

Subcommand Description
metrics velocity PR velocity metrics - merge cadence, review turnaround, cycle time
metrics dora DORA metrics - deploy frequency, lead time, failure rate, MTTR

metrics velocity

Show PR velocity metrics - merge cadence, review turnaround, cycle time.

Synopsis

dobbe metrics velocity [OPTIONS]

Description

metrics velocity analyzes pull request activity for a GitHub repository over a configurable time period. It computes merge cadence (how often PRs land), average review turnaround (time from open to first review), and end-to-end cycle time (time from first commit to merge). Results can be rendered as a table, JSON, or markdown, and optionally sent to Slack or Jira.

Flowchart

┌─────────────────────────────────────────────┐
│    dobbe metrics velocity --target org/repo  │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Resolve target                              │
│  --target flag > CWD auto-detect > config    │
│  default_org                                 │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Validate target format                      │
│  Must be OWNER/REPO (contains "/")           │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Generate velocity report                    │
│  - Fetch PR data via GitHub API              │
│  - Compute merge cadence                     │
│  - Compute review turnaround                 │
│  - Compute cycle time                        │
│  - Period: 30d / 90d / 1y                    │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Build MetricsReport (velocity section)      │
│  - Captures velocity data or error           │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Render output                               │
│  --format table (default) / json / markdown  │
│  --output file (optional)                    │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Optional: Notify                            │
│  --notify slack -> post to --channel         │
│  --notify jira  -> create tickets            │
└─────────────────────────────────────────────┘

Options

Option Type Default Description
--target / -t str - Org/repo to analyze (OWNER/REPO). Env: DOBBE_ORG
--period / -p str 30d Time period: 30d, 90d, 1y
--format / -f str table Output format: table, json, markdown. Env: DOBBE_FORMAT
--output str - Write output to file instead of stdout
--notify str - Send report to platform (slack, jira)
--channel str - Notification channel (e.g., #engineering)
--quiet / -q bool False Suppress progress output, only show final result

CWD Auto-detect

When --target is not provided, metrics velocity attempts to detect the repository from the current working directory by reading the git remote. If detection fails (e.g., you are not inside a git repo), it falls back to the default_org value in your configuration file.

The resolved target must be in OWNER/REPO format. Org-only values are rejected.

Examples

Velocity for a specific repo over the last 30 days

dobbe metrics velocity --target acme/web-app

90-day velocity from inside the repo directory

cd ~/projects/api
dobbe metrics velocity --period 90d

JSON output to file

dobbe metrics velocity --target acme/web-app --format json --output velocity.json

Send velocity report to Slack

dobbe metrics velocity --target acme/web-app --notify slack --channel "#engineering"

Quiet mode for CI pipelines

dobbe metrics velocity --target acme/web-app --quiet --format json --output velocity.json

metrics dora

Show DORA metrics - deploy frequency, lead time, change failure rate, MTTR.

Synopsis

dobbe metrics dora [OPTIONS]

Description

metrics dora computes the four key DORA (DevOps Research and Assessment) metrics for a GitHub repository: deployment frequency, lead time for changes, change failure rate, and mean time to recovery (MTTR). These are the industry-standard indicators of software delivery performance. Results can be rendered as a table, JSON, or markdown, and optionally sent to Slack or Jira.

Flowchart

┌─────────────────────────────────────────────┐
│     dobbe metrics dora --target org/repo     │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Resolve target                              │
│  --target flag > CWD auto-detect > config    │
│  default_org                                 │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Validate target format                      │
│  Must be OWNER/REPO (contains "/")           │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Generate full metrics report                │
│  - Fetch PR + deployment data via GitHub API │
│  - Deploy frequency                          │
│  - Lead time for changes                     │
│  - Change failure rate                       │
│  - Mean time to recovery (MTTR)              │
│  - Period: 30d / 90d / 1y                    │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Build MetricsReport (velocity + dora)       │
│  - Includes both velocity and DORA sections  │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Render output                               │
│  --format table (default) / json / markdown  │
│  --output file (optional)                    │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Optional: Notify                            │
│  --notify slack -> post to --channel         │
│  --notify jira  -> create tickets            │
└─────────────────────────────────────────────┘

Options

Option Type Default Description
--target / -t str - Org/repo to analyze (OWNER/REPO). Env: DOBBE_ORG
--period / -p str 30d Time period: 30d, 90d, 1y
--format / -f str table Output format: table, json, markdown. Env: DOBBE_FORMAT
--output str - Write output to file instead of stdout
--notify str - Send report to platform (slack, jira)
--channel str - Notification channel (e.g., #engineering)
--quiet / -q bool False Suppress progress output, only show final result

CWD Auto-detect

When --target is not provided, metrics dora attempts to detect the repository from the current working directory by reading the git remote. If detection fails (e.g., you are not inside a git repo), it falls back to the default_org value in your configuration file.

The resolved target must be in OWNER/REPO format. Org-only values are rejected.

Examples

DORA metrics for a specific repo

dobbe metrics dora --target acme/web-app

1-year DORA metrics from inside the repo directory

cd ~/projects/api
dobbe metrics dora --period 1y

Markdown output for a report

dobbe metrics dora --target acme/web-app --format markdown --output dora-report.md

Send DORA report to Slack

dobbe metrics dora --target acme/web-app --notify slack --channel "#engineering"

Internal Architecture

Target Resolution

Both subcommands follow the same resolution order:

  1. Explicit --target flag (or DOBBE_ORG environment variable)
  2. CWD auto-detect via auto_detect_repo() (reads the git remote of the current directory)
  3. default_org from config file

If none of these produce a value, the command exits with an error. If the resolved value does not contain / (i.e., is not OWNER/REPO format), the command exits with a format error.

Output Format Resolution

The output format follows a similar cascade:

  1. Explicit --format flag (or DOBBE_FORMAT environment variable)
  2. default_format from config file
  3. Falls back to table

Notification

When --notify is specified, the command discovers available MCP servers and extra tools from the configuration, serializes the report as JSON, and delegates delivery to the notifier module. Supported platforms are slack and jira.

See Also