Add your description here
Project description
OSS Sustain Guard
Multi-language package sustainability analyzer - Evaluate your dependencies' health with 9 key metrics including Bus Factor, Maintainer Activity, and Security Posture.
โจ No API tokens required - Fast, cache-based evaluation for Python, JavaScript, Go, Rust, PHP, Java, C#, and Ruby packages.
๐ Important Notes:
- For cached packages: Instant evaluation without API calls
- For uncached packages: GitHub API queries are required (requires
GITHUB_TOKENenvironment variable)- GitHub rate limiting: GitHub API has rate limits; cached data helps avoid hitting these limits
- GitHub unavailable packages: Cannot be evaluated (non-GitHub repositories or private packages not accessible via GitHub API)
- SSL verification: Use
--insecureflag to disable SSL verification for development/testing only- Package resolution: If a package cannot be resolved to a GitHub repository, it will be skipped with a notification
๐ก Project Philosophy
OSS Sustain Guard is designed to spark thoughtful conversations about open-source sustainability, not to pass judgment on projects. Our mission is to raise awareness about the challenges maintainers face and encourage the community to think together about how we can better support the open-source ecosystem.
We believe that:
- ๐ฑ Sustainability matters - Open-source projects need ongoing support to thrive
- ๐ค Community support is essential - For community-driven projects, we highlight funding opportunities to help users give back
- ๐ Transparency helps everyone - By providing objective metrics, we help maintainers and users make informed decisions
- ๐ฏ Respectful evaluation - We distinguish between corporate-backed and community-driven projects, recognizing their different sustainability models
- ๐ Supporting maintainers - When available, we display funding links for community projects to encourage direct support
This tool is meant to be a conversation starter about OSS sustainability, not a judgment. Every project has unique circumstances, and metrics are just one part of the story.
๐ฏ Key Features
- 9 Sustainability Metrics - Bus Factor, Maintainer Drain, Release Cadence, Security, and more
- Multi-Language Support - Python, JavaScript, Go, Rust, PHP, Java, C#, Ruby
- Community Support Awareness - Displays funding links for community-driven projects
- Fast & Cache-Based - Pre-computed data for instant results
- CI/CD Integration - GitHub Actions, Pre-commit hooks
- Zero Configuration - Works out of the box
๐ Quick Start
# Install
pip install oss-sustain-guard
# Check a package
oss-guard check requests
# Check multiple ecosystems
oss-guard check python:django npm:react rust:tokio
# Auto-detect from lock files
oss-guard check --include-lock
๐ Usage
Command Line
# Single package
oss-guard check flask
# Multiple packages
oss-guard check django requests numpy
# From requirements.txt
oss-guard check requirements.txt
# Verbose output
oss-guard check flask -v
# Clear cache
oss-guard check --clear-cache
Community Funding Support:
When analyzing community-driven projects, OSS Sustain Guard displays funding links to help you support the maintainers:
$ oss-guard check go:gorm
OSS Sustain Guard Report
โโโโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Package โ Score โ Health Statusโ Details โ
โโโโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ go-gorm/gorm โ 89/100 โ Healthy โ Analyzed: Healthy: 58 active contributors. โ
โโโโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ go-gorm/gorm is a community-driven project. Consider supporting:
โข GITHUB: https://github.com/jinzhu
โข PATREON: https://patreon.com/jinzhu
โข OPEN_COLLECTIVE: https://opencollective.com/gorm
Corporate-backed projects (e.g., maintained by organizations) do not display funding links, as they typically have different sustainability models.
Multi-Language Support
# Specify ecosystem with prefix
oss-guard check npm:react # JavaScript
oss-guard check rust:tokio # Rust
oss-guard check ruby:rails # Ruby
oss-guard check go:github.com/gin-gonic/gin # Go
oss-guard check php:symfony/console # PHP
oss-guard check java:com.google.guava:guava # Java
oss-guard check csharp:Newtonsoft.Json # C#
# Mix multiple ecosystems
oss-guard check requests npm:express rust:tokio
# Auto-detect from manifest files in current directory
oss-guard check
# Analyze a specific manifest file
oss-guard check --manifest package.json
oss-guard check --manifest requirements.txt
oss-guard check -m Cargo.toml
# Auto-detect from specific directory
oss-guard check --root-dir /path/to/project
# Auto-detect with lock files
oss-guard check --include-lock
Supported Ecosystems:
| Ecosystem | Format | Example |
|---|---|---|
| Python | python:package or package |
requests, python:flask |
| JavaScript | npm:package, js:package |
npm:react, js:vue |
| Go | go:path |
go:github.com/golang/go |
| Ruby | ruby:gem, gem:gem |
ruby:rails, gem:devise |
| Rust | rust:crate |
rust:tokio |
| PHP | php:vendor/package |
php:symfony/console |
| Java | java:groupId:artifactId |
java:com.google.guava:guava |
| C# | csharp:package, nuget:package |
csharp:Serilog |
GitHub Actions
Add to your workflow:
- uses: onukura/oss-sustain-guard@main
with:
packages: 'requests django'
verbose: 'true'
Or auto-detect from lock files:
- uses: onukura/oss-sustain-guard@main
with:
include-lock: 'true'
Multi-language example:
- uses: onukura/oss-sustain-guard@main
with:
packages: 'requests npm:express ruby:rails rust:tokio'
verbose: 'true'
See GitHub Actions Guide for details.
Pre-Commit Hooks
Add to .pre-commit-config.yaml:
repos:
- repo: https://github.com/onukura/oss-sustain-guard
rev: 'main'
hooks:
- id: oss-sustain-guard
args: ['--include-lock']
Install and run:
pip install pre-commit
pre-commit install
pre-commit run oss-sustain-guard --all-files
See Pre-Commit Integration Guide for details.
๐พ Cache Management
Caches analysis data locally (default: ~/.cache/oss-sustain-guard, 7-day TTL).
# Custom cache directory
oss-guard check requests --cache-dir /path/to/cache
# Custom TTL (seconds)
oss-guard check requests --cache-ttl 86400
# Disable cache
oss-guard check requests --no-cache
# Clear cache
oss-guard check --clear-cache
# View cache statistics
oss-guard cache-stats
Configure in .oss-sustain-guard.toml:
[tool.oss-sustain-guard.cache]
directory = "~/.cache/oss-sustain-guard"
ttl_seconds = 604800 # 7 days
enabled = true
๐ Score Explanation
Scores are evaluated in the range of 0-100:
- 80-100: ๐ข Excellent - Healthy project
- 50-79: ๐ก Monitor - Areas to consider supporting
- 0-49: ๐ด Needs Attention - Needs support and improvement
Metrics Details
| Metric | Max Score | Description |
|---|---|---|
| Bus Factor | 20 | Single maintainer dependency |
| Maintainer Drain | 10 | Long-inactive maintainers |
| Zombie Check | 20 | Repository activity assessment |
| Merge Velocity | 10 | Merge processing speed |
| CI Status | 5 | Automated test coverage |
| Funding | 10 | Sponsorship status (more important for community-driven projects) |
| Release Cadence | 10 | Release frequency |
| Security Posture | 15 | Security configuration and alerts |
| Community Health | 5 | Issue response time |
Note on Funding Metric: This metric is scored differently based on project type:
- Community-driven projects (max 10 points): Funding sources are essential for sustainability. Projects with active funding (GitHub Sponsors, Patreon, Open Collective, etc.) score higher.
- Corporate-backed projects (max 5 points): Funding is less important as corporate backing provides sustainability. The metric acknowledges organizational support.
โ๏ธ Configuration
Exclude Packages
Create .oss-sustain-guard.toml:
[tool.oss-sustain-guard]
exclude = ["internal-package", "legacy-dependency"]
See Exclude Packages Guide for details.
GitHub Token (Required for Uncached Packages)
When analyzing packages not in the cache, the tool requires GitHub API access. Set your GitHub token:
# Using Personal Access Token
export GITHUB_TOKEN=ghp_your_personal_access_token
# Then run the analysis
oss-guard check requests django
When is GITHUB_TOKEN needed?
- โ Not needed: Packages already in cache (pre-computed data)
- โ Required: First-time analysis of packages not in the cache
Getting a GitHub Token:
- Go to GitHub Settings โ Developer settings โ Personal access tokens
- Create a token with
public_reposcope (read-only access to public repositories) - Set environment variable:
export GITHUB_TOKEN=your_token
Example with uncached package:
# This package might not be in cache and will require GITHUB_TOKEN
$ export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
$ oss-guard check my-private-package
SSL Verification
For development/testing, you can disable SSL verification:
oss-guard check requests --insecure
โ ๏ธ Warning: Only use
--insecurein development environments. Never disable SSL verification in production.
๐ค Contributing
See CONTRIBUTING.md for development setup, testing, code style, and architecture documentation.
๐ Documentation
- Database Schema - JSON database format
- Pre-Commit Integration - Hook configuration
- GitHub Actions Guide - CI/CD setup
- Exclude Packages Guide - Package filtering
๐ License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oss_sustain_guard-0.3.0.tar.gz.
File metadata
- Download URL: oss_sustain_guard-0.3.0.tar.gz
- Upload date:
- Size: 199.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
453c516d2cfcf03e9f5d22fe32ec598019b69bb1ab930b0860bc7fc35e730162
|
|
| MD5 |
5e2d5b0908b30bfe92f9ccf02cee63c1
|
|
| BLAKE2b-256 |
61f42aa49c93dd336d0a7180029e0f96833725978201affe50d374efc8ac54dd
|
Provenance
The following attestation bundles were made for oss_sustain_guard-0.3.0.tar.gz:
Publisher:
publish.yml on onukura/oss-sustain-guard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oss_sustain_guard-0.3.0.tar.gz -
Subject digest:
453c516d2cfcf03e9f5d22fe32ec598019b69bb1ab930b0860bc7fc35e730162 - Sigstore transparency entry: 757824204
- Sigstore integration time:
-
Permalink:
onukura/oss-sustain-guard@bb19b09c7adcf4ffd1e76c5ced68627945ca521c -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/onukura
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bb19b09c7adcf4ffd1e76c5ced68627945ca521c -
Trigger Event:
push
-
Statement type:
File details
Details for the file oss_sustain_guard-0.3.0-py3-none-any.whl.
File metadata
- Download URL: oss_sustain_guard-0.3.0-py3-none-any.whl
- Upload date:
- Size: 56.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50f694948cad20d8011a29b23d6233862adceea89653665ae3ba3897b79497bb
|
|
| MD5 |
82f599e80198cbd94ffe7a501358cbbf
|
|
| BLAKE2b-256 |
729648cd087eff5f7b65e40c29597ff7e8db530b01874f1bc1b62f13e68fddc1
|
Provenance
The following attestation bundles were made for oss_sustain_guard-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on onukura/oss-sustain-guard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oss_sustain_guard-0.3.0-py3-none-any.whl -
Subject digest:
50f694948cad20d8011a29b23d6233862adceea89653665ae3ba3897b79497bb - Sigstore transparency entry: 757824205
- Sigstore integration time:
-
Permalink:
onukura/oss-sustain-guard@bb19b09c7adcf4ffd1e76c5ced68627945ca521c -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/onukura
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bb19b09c7adcf4ffd1e76c5ced68627945ca521c -
Trigger Event:
push
-
Statement type: