Skip to main content

suphm — Supply Chain Health Metrics

License Python 3.10+ PyPI version

A command-line tool that scores OSS package health, maintainer sustainability, and supply-chain risk across npm, PyPI, Cargo, Maven, Go, and direct GitHub repositories. Pulls metrics from registry APIs, GitHub, and the source repository itself; outputs structured JSON for downstream consumption.

Features

  • Multi-Ecosystem Support: Analyze packages from npm, PyPI, Cargo, Maven, and Go
  • Health Scoring: Comprehensive package health assessment (0-100 score)
  • Burnout Detection: Identify maintainer sustainability risks
  • CHAOSS Metrics: Bus factor, pony factor, elephant factor analysis
  • Company Affiliation Enrichment: Automatic contributor company detection via GitHub API (when token provided)
  • Tarball Inspection: License detection (via osslili), copyright extraction, binary-file detection by extension and magic bytes, hardened against zip-slip and decompression bombs
  • GitHub Integration: Stars, forks, issues, PRs, and release metrics
  • Flexible Output: JSON reports for integration with other tools

How It Works

suphm runs a comprehensive 7-step analysis pipeline:

  1. Discovery - Fetch package metadata from deps.dev, ecosyste.ms, and package registries
  2. Clone - Download the source repository for deep analysis
  3. Git Metrics - Calculate CHAOSS metrics (bus factor, contributors, companies)
  4. GitHub API - Gather community health indicators (stars, forks, issues, PRs)
  5. Tarball Scan - Analyze package contents for licenses, copyrights, and binary files
  6. Health Score - Compute overall package health across multiple dimensions
  7. Burnout Score - Assess maintainer sustainability and stress indicators

Installation

Requirements

  • Python 3.10+
  • The git command-line binary on PATH (used to clone source repositories for git-history analysis)
  • Optional: a GitHub personal access token (GITHUB_TOKEN or SUPHM_GITHUB_TOKEN) to lift the unauthenticated 60 req/hr cap to 5 000 req/hr.

From PyPI

pip install suphm

From source

git clone https://github.com/SemClone/suphm.git
cd suphm
pip install -e ".[dev]"

Quick Start

# Analyze a package
suphm analyze pkg:npm/express

# Save results to file
suphm analyze pkg:pypi/requests --output report.json

# Analyze different ecosystems
suphm analyze pkg:cargo/serde
suphm analyze pkg:maven/org.opensearch/opensearch
suphm analyze pkg:go/github.com/hashicorp/terraform

# Discovery only (no deep analysis)
suphm discover pkg:npm/lodash

Usage

CLI Commands

# Full package analysis
suphm analyze pkg:npm/express --output analysis.json

# Metadata discovery only
suphm discover pkg:pypi/requests

# View cache information
suphm cache info

# Clear cache
suphm cache clear --all

# Check version
suphm --version

Supported Package URL (PURL) Formats

# npm packages
pkg:npm/express
pkg:npm/@babel/core@7.24.0

# PyPI packages
pkg:pypi/requests
pkg:pypi/requests@2.31.0

# Cargo (Rust) packages
pkg:cargo/serde
pkg:cargo/tokio@1.32.0

# Maven packages
pkg:maven/org.opensearch/opensearch
pkg:maven/org.apache.commons/commons-lang3@3.12.0

# Go modules
pkg:go/github.com/hashicorp/terraform

# GitHub repositories
pkg:github/expressjs/express

Output Format

The tool outputs JSON reports with the following metrics:

Health Score (0-100)

  • Commit activity and release frequency
  • Contributor diversity (bus factor, pony factor)
  • Issue/PR responsiveness
  • License compliance
  • Branch protection and security

Burnout Score (0-100)

  • Issue backlog pressure
  • Response time gaps
  • Triage overhead
  • Workload concentration
  • Activity decline trends

Additional Metrics

  • CHAOSS metrics (bus/pony/elephant factors)
  • GitHub community health (stars, forks, issues, PRs)
  • License information
  • Binary file detection (by extension and magic bytes)

Using as a Python Library

suphm can also be used as a library in your Python applications:

from pathlib import Path
from suphm.metrics.git import GitMetricsAnalyzer

# Analyze a git repository
analyzer = GitMetricsAnalyzer(Path("/path/to/repo"))
result = analyzer.analyze()

# Access metrics for different time windows
metrics_90d = result.time_windows["90_days"]
print(f"Commits (90d): {metrics_90d.total_commits}")
print(f"Bus factor: {metrics_90d.bus_factor}")
print(f"License: {result.license_changes.current_license}")

Configuration

Set up a GitHub token for higher rate limits:

export GITHUB_TOKEN=ghp_your_token_here

Cache Configuration

# Via environment variable
export SUPHM_CACHE_DIR=/custom/path

# Or in ~/.suphm/config.yaml
cache:
  directory: /custom/path

Documentation

Support

License

GNU Affero General Public License v3.0. See the LICENSE file in the source repository for the full text.


Part of the SEMCL.ONE ecosystem for comprehensive OSS compliance and code analysis.

Metadata

Release files for suphm 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suphm 0.4.4
File Size Uploaded
suphm-0.4.4.tar.gz 273.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for suphm 0.4.4
File Interpreter ABI Platform
suphm-0.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 412.9 kB

Release files / suphm-0.4.4.tar.gz

Download URL suphm-0.4.4.tar.gz
Size 273.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0c7567e7cef3baea9a3e0099277fe331973bd09b375984ac089a6c0bb57912fb
BLAKE2b-256 checksum
How to use checksums
0a9aefa7ce759e832517ae380aec3405ccd6ff0d31c37c0862678535c2a3c067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / suphm-0.4.4-py3-none-any.whl

Download URL suphm-0.4.4-py3-none-any.whl
Size 139.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba289d016a271b35587be529531517805aed79dc52468b94d16a5babecca220b
BLAKE2b-256 checksum
How to use checksums
62c4bc79330da06853b5638cbed437a720fa6c42a0bf1a91d3a65fcf621d00b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.4 This release

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page