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

gitcard

v1.0.0

Published

Generate beautiful visual snapshot cards of git repositories

Readme

⚡ gitcard

Generate beautiful visual snapshot cards of any git repository — in one command.

CI npm version npm downloads License: MIT Node.js


gitcard turns any git repository into a shareable 1200×630 PNG card — perfect for social media, README headers, release notes, or Discord/Slack previews. It automatically pulls language stats, GitHub metadata, recent commits, and more.

npx gitcard

Features

  • Language breakdown — colored bar with percentages, GitHub-style palette
  • GitHub stats — stars, forks, open issues, contributors (auto-detected from remote)
  • Repo metadata — file count, total size, commit count, repo age
  • Recent commits — last 3 commits with short hash, message, and relative time
  • Activity sparkline — 24-week commit frequency bar chart embedded in the card
  • Package info — detected package manager + dependency count (npm, cargo, go modules, pip, pub)
  • Topics/tags — GitHub topics displayed as chips
  • Two layoutsdefault (modern card) and terminal (macOS window with shell aesthetic)
  • Two themesdark (default) and light
  • Three formatspng, pdf, svg
  • --open flag — auto-opens the generated image after saving
  • Zero config — works on any git repo, no setup required
  • Offline mode--no-github skips API calls entirely

Quick Start

# No install needed — run on current directory
npx gitcard

# Snapshot a specific repo
npx gitcard /path/to/my-project

# Light theme
npx gitcard --theme light

# PDF output
npx gitcard --format pdf

# Skip GitHub API (faster, works offline)
npx gitcard --no-github

# Terminal layout (macOS window aesthetic)
npx gitcard --layout terminal

# Open the image automatically after saving
npx gitcard --open

# Custom output path
npx gitcard --output ./cards/my-project

Installation

# Global install
npm install -g gitcard

# Or use without installing
npx gitcard

Requirements: Node.js ≥ 18, git


Options

| Flag | Default | Description | |---|---|---| | [repo-path] | . | Path to the git repository | | -f, --format <fmt> | png | Output format: png · pdf · svg | | -o, --output <path> | gitcard-output | Output filename (no extension) | | -t, --theme <theme> | dark | Card theme: dark · light | | -l, --layout <layout> | default | Card layout: default · terminal | | --no-github | — | Skip GitHub API calls | | --open | — | Open generated image automatically | | --width <px> | 1200 | Card width in pixels | | --height <px> | 630 | Card height in pixels | | --token <token> | — | GitHub personal access token |


GitHub Authentication

For public repos, gitcard works unauthenticated (60 req/hr). For higher limits or private repos:

# Recommended: environment variable
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
npx gitcard

# Or pass directly
npx gitcard --token ghp_xxxxxxxxxxxx

Token lookup order: --token flag → GITHUB_TOKEN env → GH_TOKEN env


Card Layout

┌────────────────────────────────────────────────────────────┐
│  [Avatar]  owner / repo-name                       v1.2.3  │
│            A short description of the project              │
├────────────────────────────────────────────────────────────┤
│  ████████████████████░░░░░░░░  Language bar                │
│  TypeScript 62%  JavaScript 21%  CSS 12%  Other 5%         │
├────────────────────────────────────────────────────────────┤
│  ★ 1,234   ⑂ 234   ● 42 issues   👤 18 contributors      │
├────────────────────────────────────────────────────────────┤
│  📁 342 files  │  💾 14.2 MB  │  📝 1,847 commits          │
│  🕐 2 years ago  │  📦 npm · 47 deps                       │
├────────────────────────────────────────────────────────────┤
│  Recent: a1b2c3d  Fix auth middleware        (3h ago)      │
│          e4f5g6h  Add rate limiting          (yesterday)   │
│          d7e8f9i  Bump deps                  (3 days ago)  │
├────────────────────────────────────────────────────────────┤
│  topics:  react   typescript   api   open-source           │
└──────────────────── Generated by gitcard ─────────────────┘

Dark theme colors: bg #0d1117 · surface #161b22 · accent #58a6ff Light theme colors: bg #ffffff · surface #f6f8fa · accent #0969da


Supported Package Managers / Languages

Package detection: npm · yarn · pnpm · bun · cargo · go modules · pip · poetry · pub (Flutter)

Language colors: TypeScript · JavaScript · Python · Rust · Go · Java · Kotlin · C/C++/C# · Ruby · PHP · Swift · Shell · Vue · Svelte · Dart · Elixir · Haskell · Lua · R · Julia · HCL · SQL · and more (~50 total)


How It Works

npx gitcard [repo-path]
       │
       ▼
 ┌─────────────────────────────────────────┐
 │  Promise.allSettled (parallel)          │
 │  ├── scanRepo()     ← git ls-files      │
 │  ├── parsePackages() ← manifest files   │
 │  └── fetchGithub()  ← octokit REST      │
 └─────────────────────────────────────────┘
       │
       ▼
  normalize() → RepoSnapshot
       │
       ▼
  renderCard() → Handlebars → HTML
       │
       ▼
  takeScreenshot() → Puppeteer → file
       │
       ▼
  ✓ Saved to gitcard-output.png

Collectors run in parallel with Promise.allSettled — GitHub failures never block output.


Development

git clone https://github.com/MdAbdullahAlMahmud/gitcard
cd gitcard
npm install

# Run CLI in dev mode
npx tsx src/cli.ts . --no-github

# Build
npm run build

# Test
npm test

# Test with coverage
npm run test:coverage

# Lint
npm run lint

# Format
npm run format

Contributing

Contributions are very welcome! Please read CONTRIBUTING.md for guidelines.


License

MIT — free to use, modify, and distribute.