npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

repotimemachine

v0.1.0

Published

A CLI time machine for your GitHub repos. Forecast future maintenance risks before they break production.

Downloads

143

Readme

  ██████╗ ███████╗██████╗  ██████╗     ████████╗██╗███╗   ███╗███████╗
  ██╔══██╗██╔════╝██╔══██╗██╔═══██╗    ╚══██╔══╝██║████╗ ████║██╔════╝
  ██████╔╝█████╗  ██████╔╝██║   ██║       ██║   ██║██╔████╔██║█████╗
  ██╔══██╗██╔══╝  ██╔═══╝ ██║   ██║       ██║   ██║██║╚██╔╝██║██╔══╝
  ██║  ██║███████╗██║     ╚██████╔╝       ██║   ██║██║ ╚═╝ ██║███████╗
  ╚═╝  ╚═╝╚══════╝╚═╝      ╚═════╝        ╚═╝   ╚═╝╚═╝     ╚═╝╚══════╝

See your repo's future before it breaks.

RepoTimeMachine is a global npm CLI that scans GitHub and local repositories to forecast future maintenance risks using git history, file complexity, test gaps, ownership patterns, and dependency centrality.

npm version License: MIT Node Version


Quick Install

npm install -g repotimemachine

Then run:

# Scan local repo
rtm scan .

# Scan any public GitHub repo
rtm scan https://github.com/user/repo

# Quick health score
rtm score .

# Explain a specific file
rtm explain src/auth/session.ts

# Generate issue drafts
rtm issues . --output issues.md

# CI mode with thresholds
rtm ci . --max-risk 75 --fail-on-critical

# AI summaries (optional)
export GROQ_API_KEY="gsk_your_key"
rtm scan . --ai

Commands

| Command | Description | |---------|-------------| | rtm scan [repo] | Full analysis with future-risk forecast | | rtm score [repo] | Quick health score only | | rtm explain <file> | Detailed risk breakdown for a file | | rtm issues [repo] | Generate GitHub issue drafts | | rtm timeline [repo] | Historical risk timeline with ASCII chart | | rtm compare <base> <target> [repo] | Compare risk between git refs | | rtm watch [repo] | Watch mode — re-analyze on file changes | | rtm ci [repo] | CI mode with exit codes (GitHub Actions) | | rtm badge [repo] | Generate README health badge | | rtm doctor | Check environment readiness | | rtm init | Create .repotimemachine.json config |

Scan Options

| Option | Default | Description | |--------|---------|-------------| | --horizon | 6m | Forecast horizon: 3m, 6m, 12m | | --format | text | Output: text, markdown, json | | --output | — | Save report to file | | --max-files | 1500 | Max files to analyze | | --since | 180d | Git history window | | --ai | — | Enable AI summaries (requires GROQ_API_KEY) | | --model | llama-3.1-8b-instant | AI model | | --no-banner | — | Hide ASCII banner | | --debug | — | Show debug logs |

Scoring Methodology

RepoTimeMachine computes risk using five deterministic signals:

| Signal | Weight | What It Measures | |--------|--------|-----------------| | Churn | 28% | How often files change | | Complexity | 22% | Lines, imports, functions | | Test Gap | 20% | Missing tests for high-risk files | | Ownership | 15% | Single-contributor concentration | | Centrality | 15% | Import dependency bottlenecks |

Risk Categories

| Score | Category | |-------|----------| | 0–30 | Low | | 31–55 | Moderate | | 56–75 | High | | 76–100 | Critical |

AI with Groq (Optional)

Set GROQ_API_KEY for natural-language summaries:

export GROQ_API_KEY="gsk_your_key"
rtm scan . --ai

What AI provides:

  • Executive Summary — natural-language health overview
  • Failure Mode Prediction — what will break first
  • Smarter Recommendations — context-aware next steps
  • Suggested Issue Wording — draft GitHub issues

AI only sends compact risk metadata — never source code.

CI Usage (GitHub Actions)

name: RepoTimeMachine
on: [pull_request]
jobs:
  repo-risk:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - run: npm install -g repotimemachine
      - run: rtm ci . --max-risk 75 --fail-on-critical

Configuration

Create .repotimemachine.json (use rtm init):

{
  "horizon": "6m",
  "since": "180d",
  "maxFiles": 1500,
  "exclude": ["node_modules/**", "dist/**", "build/**"],
  "weights": {
    "churn": 0.28,
    "complexity": 0.22,
    "testGap": 0.20,
    "ownership": 0.15,
    "centrality": 0.15
  }
}

Example Output

╭─ Forecast ─────────────────────────────────────────╮
│ Repository       my-app                             │
│ Horizon          6 months                           │
│ Health Score     64/100                             │
│ Future Risk      High                               │
│ Failure Mode     Test gaps around high-churn code   │
╰────────────────────────────────────────────────────╯

Top Future Risks
┌────┬───────────────────────────────┬──────┬──────────────┐
│ #  │ File                          │ Risk │ Main Reason  │
├────┼───────────────────────────────┼──────┼──────────────┤
│ 1  │ src/auth/session.ts           │ 87   │ Test Gap     │
│ 2  │ src/billing/stripe.ts         │ 82   │ Churn        │
│ 3  │ src/lib/router.ts             │ 78   │ Centrality   │
└────┴───────────────────────────────┴──────┴──────────────┘

Supported Languages

TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, PHP, Ruby, C#, C/C++, Swift

Security

See SECURITY.md for details on privacy and data handling.

Publishing

See PUBLISHING.md for npm publishing instructions.

License

MIT