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

termpeek

v1.0.2

Published

Beautiful SVG visualizations for git repositories — contribution heatmaps, repo cards, language donuts, and more

Downloads

278

Readme

termpeek

Beautiful SVG visualizations for git repositories — contribution heatmaps, repo cards, language breakdowns, branch trees, and more.

npm install -g termpeek
termpeek card --open

🎨 Live Preview — facebook/react

Cards generated with termpeek card --repo facebook/react --theme <name>

🌑 Dark

🧛 Dracula

🔥 Monokai

🏔️ Nord

🌿 Gruvbox

🐱 Catppuccin


✨ Features

| Command | Description | Output | |---------|-------------|--------| | termpeek card | Repository health card with all key stats | SVG | | termpeek graph | GitHub-style contribution heatmap | SVG | | termpeek langs | Language breakdown donut chart | SVG | | termpeek branches | Branch tree with last commits | SVG | | termpeek badge | Individual stat badges | SVG |

6 themes — Dark, Dracula, Monokai, Nord, Gruvbox, Catppuccin.

Pure SVG — no canvas, no puppeteer, no external services. Reads directly from your .git directory.


📦 Install

npm install -g termpeek

Or via npx (no install needed):

npx termpeek card

🚀 Quick Start

# Generate a repo health card
termpeek card

# Open the SVG in your browser automatically
termpeek card --open

# Full-year contribution heatmap
termpeek graph --weeks 52

# Language breakdown
termpeek langs

# Branch tree
termpeek branches

# Specific theme
termpeek card --theme dracula

# Output to a file
termpeek graph --output my-heatmap.svg

# Any git repository
termpeek card --repo /path/to/project

🎨 Themes

--theme dark       # GitHub-inspired deep navy (default)
--theme dracula    # Dark purple with vibrant accents
--theme monokai    # Classic warm orange
--theme nord       # Cool arctic blue
--theme gruvbox    # Retro earthy tones
--theme catppuccin # Modern pastel palette

📊 Commands

termpeek card

Repository health card — a single SVG with everything your README needs.

termpeek card --repo . --open

Shows:

  • Total commits, active branches, contributor count
  • Last commit with relative time
  • 14-week commit sparkline
  • Language breakdown bars
  • Top contributor avatars

termpeek graph

GitHub-style contribution heatmap.

termpeek graph --weeks 52 --theme nord --open

Shows:

  • Day-by-day contribution cells (color intensity)
  • Month column labels
  • Current streak and longest streak
  • Total contributions count

termpeek langs

Language breakdown as a donut chart.

termpeek langs --size 300 --theme catppuccin

Shows:

  • Top languages by line count
  • Percentage per language
  • Color-coded legend

termpeek branches

All local branches with last commit info.

termpeek branches --theme dracula --remote

Shows:

  • Branch name with type indicator (feature, bugfix, main, etc.)
  • Last commit hash and message
  • Time since last commit
  • Current branch highlighted

termpeek badge <type>

Individual stat badges — perfect for embedding in other documents.

termpeek badge commits --period month       # "47 commits (month)"
termpeek badge contributors                 # "3 contributors"
termpeek badge branches                    # "12 branches"
termpeek badge languages                   # "8 languages"
termpeek badge last-commit                 # "2h ago"

Custom label and color:

termpeek badge commits --label "This Week" --color "#f97316"

🔧 Programmatic API

import { renderCard, renderHeatmap, renderDonut, renderBadge } from 'termpeek';

const svg = await renderCard({
  repoPath: '/path/to/repo',
  theme: 'dracula',
  showSparkline: true,
  showLanguages: true,
});

🎯 All Options

Global

| Option | Description | Default | |--------|-------------|---------| | --repo, -r | Path to git repository | . (current dir) | | --theme, -t | Color theme | dark | | --output, -o | Output file path | termpeek-{timestamp}.svg | | --open | Open in browser after generation | false |

Heatmap

| Option | Description | Default | |--------|-------------|---------| | --weeks, -w | Number of weeks to show | 52 | | --cell-size | Cell size in pixels | 11 | | --cell-gap | Gap between cells | 3 | | --no-month-labels | Hide month labels | false | | --no-day-labels | Hide day labels | false | | --no-legend | Hide legend | false |

Card

| Option | Description | Default | |--------|-------------|---------| | --no-sparkline | Hide sparkline | false | | --no-languages | Hide language bars | false | | --no-contributors | Hide contributor avatars | false | | --width | Card width in pixels | 620 |


🏗️ Architecture

src/
  cli.ts              # Commander.js CLI (5 commands)
  types.ts            # All TypeScript interfaces
  themes.ts           # 6 theme definitions + language colors
  git/
    parser.ts         # git log, branch, ls-files, show parsing
  svg/
    renderer.ts       # Core SVG primitives (rect, text, path, etc.)
    card.ts           # Repo health card renderer
    heatmap.ts        # Contribution graph renderer
    donut.ts          # Language donut chart
    badge.ts          # Individual stat badges
    branches.ts       # Branch tree renderer

🤝 Contributing

Issues and PRs welcome. Please read the SPEC.md before making significant changes.


📜 License

MIT © Serghei Pogor