Observed since 21 Oct, 11:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@0xshariq/timeline
Generate beautiful commit timeline charts for GitHub, GitLab, Bitbucket, and SourceHut repositories with an interactive CLI - supports multiple chart types
Generate beautiful commit timeline charts for your Git repositories across multiple platforms.
Beautiful CLI • Multi-Platform • Interactive • Analytics
📊 Detailed Chart Documentation: See docs/CHARTS.md for comprehensive information about all chart types, including visual examples, use cases, and best practices.
Install system dependencies for canvas rendering:
Ubuntu/Debian:
sudo apt update
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
macOS:
brew install pkg-config cairo pango libpng jpeg giflib librsvg
Fedora/RHEL:
sudo dnf install gcc-c++ cairo-devel pango-devel libjpeg-turbo-devel giflib-devel
# Install globally
npm install -g @0xshariq/timeline
# If you get canvas errors, rebuild it:
npm rebuild canvas -g
# Run anywhere
timeline
Or with pnpm:
pnpm add -g @0xshariq/timeline
# If you get canvas errors:
pnpm rebuild canvas -g
timeline
Or with yarn:
yarn global add @0xshariq/timeline
# If you get canvas errors:
yarn global rebuild canvas
timeline
Note: Canvas automatically rebuilds on every run to ensure compatibility. This takes a few seconds initially. If you still encounter issues, see the Troubleshooting Guide.
# Clone the repository
git clone https://github.com/0xshariq/timeline.git
cd timeline
# Install dependencies
pnpm install
# Run the CLI
pnpm start
# Or link globally
pnpm link --global
timeline # Now you can use it anywhere!
npx @0xshariq/timeline
🔧 Having issues? Check the Troubleshooting Guide for solutions to common problems including canvas errors and rate limits.
GitHub API has strict rate limits:
public_repo (required for public repositories)repo (only if you want to access private repos)Option A: Temporary (Current Session Only)
export GITHUB_TOKEN=ghp_your_token_here
timeline -p github -u 0xshariq
Option B: Permanent (Recommended)
For Bash users (~/.bashrc):
echo 'export GITHUB_TOKEN=ghp_your_token_here' >> ~/.bashrc
source ~/.bashrc
For Zsh users (~/.zshrc):
echo 'export GITHUB_TOKEN=ghp_your_token_here' >> ~/.zshrc
source ~/.zshrc
For Fish users:
set -Ux GITHUB_TOKEN ghp_your_token_here
# Check if token is set
echo $GITHUB_TOKEN
# Test with timeline
timeline -p github -u 0xshariq --verbose
If you still see "403: rate limit exceeded":
echo $GITHUB_TOKENtimeline -p github -u username -r "repo1,repo2"Security Tips:
# Interactive mode (recommended for beginners)
timeline
# Or with npx (no installation)
npx @0xshariq/timeline
Timeline supports powerful command-line flags for automation:
timeline [options]
timeline <command> [options]
| Flag | Alias | Description | Example |
|---|---|---|---|
-p, --platform <name> | Git platform | -p github | |
-u, --username <name> | Username | -u octocat | |
-r, --repos <list> | Comma-separated repos | -r "repo1,repo2" | |
-a, --all | Analyze all repos | --all | |
-t, --type <type> | -c, --chart | Chart type | -t line |
-v, --verbose | Show detailed output | --verbose | |
-q, --quiet | Minimal output | --quiet | |
--no-merge | Exclude merge commits | --no-merge | |
-o, --open | Open chart after generation | --open | |
-V, --version | Show version | --version | |
-h, --help | Show help | --help |
Colors & Gradients:
| Flag | Description | Example |
|---|---|---|
--colors <colors> | Custom colors (hex, comma-separated) | --colors "#FF5733,#33FF57,#3357FF" |
--gradient | Enable gradient colors | --gradient |
--gradient-start <color> | Gradient start color | --gradient-start "#667eea" |
--gradient-end <color> | Gradient end color | --gradient-end "#764ba2" |
Borders:
| Flag | Description | Example |
|---|---|---|
--border-width <width> | Border width (number) | --border-width 3 |
--border-color <color> | Border color (hex) | --border-color "#000000" |
Animations:
| Flag | Description | Example |
|---|---|---|
--no-animate | Disable animations | --no-animate |
--animation-duration <ms> | Animation duration | --animation-duration 2000 |
--animation-easing <easing> | Easing function | --animation-easing "easeInOutCubic" |
Scales:
| Flag | Description | Example |
|---|---|---|
--scale-type <type> | Scale type (linear, logarithmic, time) | --scale-type logarithmic |
--no-zero | Don't begin Y-axis at zero | --no-zero |
--no-grid | Hide grid lines | --no-grid |
Labels & Text:
| Flag | Description | Example |
|---|---|---|
--no-labels | Hide labels | --no-labels |
--label-size <size> | Label font size | --label-size 14 |
--label-color <color> | Label color (hex) | --label-color "#333333" |
Tooltips:
| Flag | Description | Example |
|---|---|---|
--no-tooltips | Disable tooltips | --no-tooltips |
--tooltip-bg <color> | Tooltip background color | --tooltip-bg "rgba(0,0,0,0.9)" |
Legend:
| Flag | Description | Example |
|---|---|---|
--no-legend | Hide legend | --no-legend |
--legend-position <pos> | Position (top, bottom, left, right) | --legend-position right |
Refer customization guide CUSTOMIZATION.md
quick - Quick generationtimeline quick -p <platform> -u <username> [options]
# Examples
timeline quick -p github -u octocat
timeline quick -p gitlab -u johndoe -t pie
timeline quick -p bitbucket -u alice --no-merge
Required options:
-p, --platform - Platform name-u, --username - UsernameOptional:
-t, --type - Chart type (default: line)--no-merge - Exclude merge commitsplatforms - List platformstimeline platforms
# Output:
# 📦 Supported Platforms:
# 🐙 github - GitHub
# 🦊 gitlab - GitLab
# 🪣 bitbucket - Bitbucket
# 🎯 sourcehut - SourceHut
charts - List chart typestimeline charts
# Output:
# 📊 Available Chart Types:
# 📈 line - Timeline of commits over time
# 📊 bar - Compare commits across repositories
# 🥧 pie - Repository contribution percentage
# 🍩 doughnut - Like pie chart with center hole
# 📡 radar - Multi-dimensional comparison
# 🔥 heatmap - Activity calendar (GitHub-style)
config - Show configurationtimeline config
# Shows package version, Node version, etc.
examples - Show usage examplestimeline examples
# Displays common usage patterns
# Full interactive experience
timeline
You'll be prompted for:
You'll be prompted for:
# GitHub user with line chart (default)
timeline quick -p github -u octocat
# GitLab user with pie chart
timeline quick -p gitlab -u johndoe -t pie
# Bitbucket with bar chart, no merge commits
timeline quick -p bitbucket -u alice -t bar --no-merge
# Specific platform and user
timeline -p github -u octocat
# All repos with verbose output
timeline -p github -u octocat --all --verbose
# Specific repos with heatmap
timeline -p gitlab -u johndoe -r "project1,project2,project3" -t heatmap
# Pie chart, open automatically
timeline -p bitbucket -u bob --all -t pie --open
# Bar chart without merge commits, quiet mode
timeline -p github -u charlie --all -t bar --no-merge --quiet
# Custom colors (3 repositories with specific colors)
timeline -p github -u octocat -t bar --colors "#FF5733,#33FF57,#3357FF"
# Gradient colors for line chart
timeline -p github -u octocat -t line --gradient --gradient-start "#667eea" --gradient-end "#764ba2"
# Thick borders with custom color
timeline -p github -u octocat -t pie --border-width 5 --border-color "#FF0000"
# No animations for faster generation
timeline -p github -u octocat -t bar --no-animate
# Logarithmic scale for large value differences
timeline -p github -u octocat -t line --scale-type logarithmic
# Large labels with custom color
timeline -p github -u octocat -t bar --label-size 16 --label-color "#FF6B6B"
# No grid lines, no legend for clean look
timeline -p github -u octocat -t line --no-grid --no-legend
# Right-positioned legend
timeline -p github -u octocat -t pie --legend-position right
# Combine multiple customizations
timeline -p github -u octocat -t bar \
--colors "#FF6B6B,#4ECDC4,#45B7D1,#FFA07A,#98D8C8" \
--border-width 3 \
--label-size 14 \
--no-grid \
--animation-duration 2000
# Perfect for presentations (clean, no tooltips)
timeline -p github -u octocat -t pie \
--colors "#667eea,#764ba2,#f093fb,#4facfe" \
--no-tooltips \
--label-size 16 \
--border-width 0
# Heatmap with custom colors
timeline -p github -u octocat -t heatmap \
--gradient \
--gradient-start "#9be9a8" \
--gradient-end "#216e39"
# Perfect for scripts and automation
timeline quick -p github -u $GIT_USERNAME -t line
# Generate multiple charts
for type in line bar pie; do
timeline quick -p github -u octocat -t $type
done
# Environment variables
export TIMELINE_PLATFORM=github
export TIMELINE_USER=octocat
timeline quick -p $TIMELINE_PLATFORM -u $TIMELINE_USER
When you run timeline in interactive mode:
Step 1: Platform
Step 4: Chart Type
? Select chart type: (Use arrow keys)
❯ 📈 Line Chart - Timeline of commits over time
📊 Bar Chart - Compare commits across repositories
🥧 Pie Chart - Repository contribution percentage
🍩 Doughnut Chart - Like pie chart with center hole
📡 Radar Chart - Multi-dimensional repository comparison
🔥 Heatmap - Activity calendar (GitHub-style)
Step 5: Options
Step 5: Options
? Select options: (Press space to select)
❯ ◉ Show detailed progress
◉ Include merge commits
◯ Open chart after generation
Step 6: Processing
Step 6: Processing
──────────────────────────────────────────────────
⠼ Processing awesome-project (3/12)
ℹ Found 12 repositories
✓ my-library: 89 commits
✓ cli-tool: 143 commits
⚠ Skipped empty-repo: No commits found
✓ awesome-project: 67 commits
...
Step 7: Results
Statistics Summary:
📊 Statistics Summary
─────────────────────
Total Commits: 847
Repositories: 12
Date Range: 2023-01-15 to 2024-11-02 (657 days)
Average per Repo: 70 commits
Average per Day: 1.29 commits
🏆 Top Repositories:
1. cli-tool: 143 commits
2. my-library: 89 commits
3. awesome-project: 67 commits
4. web-app: 58 commits
5. api-server: 52 commits
Success Message:
╭─────────────────────────────────────────────╮
│ │
│ ✨ Chart saved as timeline.png ✨ │
│ │
│ You can find it in the current directory │
│ │
╰─────────────────────────────────────────────╯
| Platform | Support | API Version | Rate Limit |
|---|---|---|---|
| GitHub 🐙 | ✅ Full | REST v3 | 60/hour |
| GitLab 🦊 | ✅ Full | REST v4 | 10/sec |
| Bitbucket 🪣 | ✅ Full | API 2.0 | Varies |
| SourceHut 🎯 | ✅ Full | GraphQL | Check docs |
Add authentication tokens to provider files for higher limits:
GitHub (src/providers/github.js):
async fetchRepos() {
const res = await fetch(`${this.baseUrl}/users/${this.username}/repos`, {
headers: { 'Authorization': 'token YOUR_GITHUB_TOKEN' }
});
// ...
}
GitLab (src/providers/gitlab.js):
headers: { 'PRIVATE-TOKEN': 'YOUR_GITLAB_TOKEN' }
| Chart Type | Best For | Output |
|---|---|---|
| 📈 Line | Timeline trends, activity patterns | timeline-line.png |
| 📊 Bar | Repository comparison, totals | timeline-bar.png |
| 🥧 Pie | Contribution percentages | timeline-pie.png |
| 🍩 Doughnut | Modern contribution breakdown | timeline-doughnut.png |
| 📡 Radar | Multi-metric comparison | timeline-radar.png |
| 🔥 Heatmap | Daily activity calendar | timeline-heatmap.png |
| 🎯 Polar Area | Radial visualization | timeline-polarArea.png |
| ⚡ Scatter | Pattern detection | timeline-scatter.png |
| � Bubble | Multi-dimensional data | timeline-bubble.png |
| 🎨 Mixed | Combined line + bar | timeline-mixed.png |
| Chart Type | Best For | Output | Status |
|---|---|---|---|
| � Bar 3D | Impressive presentations | timeline-bar3d.png | ✅ Available |
| 📈 Line 3D | 3D trend visualization | timeline-line3d.png | 🚧 Coming Soon |
| 🔮 Scatter 3D | Multi-dimensional patterns | timeline-scatter3d.png | 🚧 Coming Soon |
| 🌊 Surface 3D | Activity landscapes | timeline-surface3d.png | 🚧 Coming Soon |
| � Bubble 3D | Four-dimensional data | timeline-bubble3d.png | 🚧 Coming Soon |
📚 Full Documentation: For detailed information about each chart type, including visual characteristics, features, and usage examples, see docs/CHARTS.md
# 2D Line chart (default)
timeline -p github -u octocat
# 3D Bar chart
timeline -p github -u octocat -t bar3d
# Heatmap for daily patterns
timeline -p github -u octocat -t heatmap
# Pie chart with custom colors
timeline -p github -u octocat -t pie --colors "#FF6B6B,#4ECDC4,#45B7D1"
repo-timeline/
├── src/
│ ├── index.js # CLI entry point (styled prompts)
│ ├── timeline.js # Core logic & orchestration
│ ├── chart.js # Chart.js configuration
│ ├── config.default.js # Default settings
│ ├── providers/ # Platform-specific APIs
│ │ ├── github.js # GitHub integration
│ │ ├── gitlab.js # GitLab integration
│ │ ├── bitbucket.js # Bitbucket integration
│ │ └── sourcehut.js # SourceHut integration
│ └── utils/ # Helper utilities
│ ├── colors.js # Color schemes
│ └── stats.js # Statistics calculations
├── index.js # Entry point
├── package.json # Dependencies & scripts
└── README.md # Documentation
| Feature | Description |
|---|---|
| 🎨 Gradient Banners | Eye-catching startup screen |
| 🌈 Colored Prompts | Cyan questions, gray feedback |
| ⏳ Progress Spinners | Real-time animated feedback |
| 📦 Styled Boxes | Important messages in frames |
| ✓ Status Icons | Success (✓), Info (ℹ), Warning (⚠) |
| 🎯 Emoji Indicators | Visual context throughout |
// Available configurations
{
verbose: true, // Show detailed progress
includeMerges: true, // Include merge commits
openChart: false // Auto-open after generation
}
pnpm run dev # Auto-reload on file changes
src/providers/newplatform.js):export class NewPlatformProvider {
constructor(username) {
this.username = username;
this.baseUrl = "https://api.newplatform.com";
}
async fetchRepos() {
// Return array of repo names
}
async fetchAllCommits(repo, config) {
// Return array of commits
// Format: [{ date, author, message }, ...]
}
}
src/timeline.js):import { NewPlatformProvider } from "./providers/newplatform.js";
const providers = {
// ...existing
newplatform: NewPlatformProvider,
};
src/index.js):choices: [
// ...existing
{ name: "🎯 NewPlatform", value: "newplatform" },
];
| Package | Purpose |
|---|---|
@inquirer/prompts | Interactive CLI prompts |
chalk | Terminal styling |
ora | Progress spinners |
boxen | Terminal boxes |
gradient-string | Gradient text |
chart.js | Chart generation |
canvas | Node canvas renderer |
node-fetch | HTTP requests |
Refer the troubleshooting guide TROUBLESHOOTING.md
# For users
npm install -g @0xshariq/timeline # Install globally
npx @0xshariq/timeline # Run without installing
timeline # Run if installed globally
# For developers
pnpm start # Run the CLI
pnpm run dev # Run with auto-reload
node index.js # Direct execution
For maintainers:
# Login to npm
npm login
# Bump version
npm version patch # or minor, or major
# Publish (scoped package)
npm publish --access public
# Verify
npm view @0xshariq/timeline
ISC License - Feel free to use and modify!
Contributions welcome! Ideas:
Built with amazing open-source tools:
Made with ❤️ and ☕
Happy Analyzing! 🚀
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
@inquirer/promptsEnvironment{
"local_name": "@inquirer/prompts",
"alias": false,
"peer_metadata": null
} | ^7.0.1 | runtime |
@types/threeEnvironment{
"local_name": "@types/three",
"alias": false,
"peer_metadata": null
} | 0.181.0 | runtime |
boxenEnvironment{
"local_name": "boxen",
"alias": false,
"peer_metadata": null
} | ^8.0.1 | runtime |
canvasEnvironment{
"local_name": "canvas",
"alias": false,
"peer_metadata": null
} | ^3.2.0 | runtime |
chalkEnvironment{
"local_name": "chalk",
"alias": false,
"peer_metadata": null
} | ^5.3.0 | runtime |
chart.jsEnvironment{
"local_name": "chart.js",
"alias": false,
"peer_metadata": null
} | ^4.4.7 | runtime |
chartjs-chart-matrixEnvironment{
"local_name": "chartjs-chart-matrix",
"alias": false,
"peer_metadata": null
} | ^2.0.1 | runtime |
chartjs-node-canvasEnvironment{
"local_name": "chartjs-node-canvas",
"alias": false,
"peer_metadata": null
} | 5.0.0 | runtime |
chartjs-plugin-datalabelsEnvironment{
"local_name": "chartjs-plugin-datalabels",
"alias": false,
"peer_metadata": null
} | ^2.2.0 | runtime |
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ^12.1.0 | runtime |
date-fnsEnvironment{
"local_name": "date-fns",
"alias": false,
"peer_metadata": null
} | ^4.1.0 | runtime |
gradient-stringEnvironment{
"local_name": "gradient-string",
"alias": false,
"peer_metadata": null
} | ^3.0.0 | runtime |
node-fetchEnvironment{
"local_name": "node-fetch",
"alias": false,
"peer_metadata": null
} | ^3.3.2 | runtime |
oraEnvironment{
"local_name": "ora",
"alias": false,
"peer_metadata": null
} | ^9.0.0 | runtime |
threeEnvironment{
"local_name": "three",
"alias": false,
"peer_metadata": null
} | 0.181.0 | runtime |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | 5.9.3 | runtime |
@types/gradient-stringEnvironment{
"local_name": "@types/gradient-string",
"alias": false,
"peer_metadata": null
} | 1.1.6 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | 24.9.2 | development |
Source distribution
{
"integrity": "sha512-PHJhdnXAJ89OYHUzpVsoWR+LNutarJthVvOpJJJj7cadKm0SHgJh2BqfX33uU0aQ9LiH/VZl32VRhurTI7Sp+A==",
"shasum": "80a8c6a63fcac33d18be93c09838ea92d2e68f6e",
"tarball": "https://registry.npmjs.org/@0xshariq/timeline/-/timeline-3.1.1.tgz",
"fileCount": 67,
"unpackedSize": 202616,
"signatures": [
{
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
"sig": "MEUCIQD5TWoqAEKtr+NFW7aMhkwZdszcjrk78U+GbOHId3Jv6wIgM3xw7zKf01G66HGVwnv43KAcDfTF/T/H14sWFhVDI9A="
}
]
}Observed since 21 Oct, 11:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:f3a61ef8a6564df16be5955b4e364181ca88f3fe573e30d8632257941c8526f5