termpeek
v1.0.2
Published
Beautiful SVG visualizations for git repositories — contribution heatmaps, repo cards, language donuts, and more
Downloads
278
Maintainers
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 termpeekOr 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 . --openShows:
- 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 --openShows:
- 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 catppuccinShows:
- Top languages by line count
- Percentage per language
- Color-coded legend
termpeek branches
All local branches with last commit info.
termpeek branches --theme dracula --remoteShows:
- 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
