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

@tmegit/git-activity-tracer

v1.0.2

Published

Track your development activity across GitHub and GitLab. Fetch commits, pull/merge requests, and code reviews from your authenticated accounts.

Readme

Git Activity Tracer

Track your development activity across GitHub and GitLab. Fetch commits, pull/merge requests, and code reviews from your authenticated accounts.

Quick Start

# Try it now with npx
npx @tmegit/git-activity-tracer  # Fetch current week

First time setup:

  1. Get a token: GitHub or GitLab
  2. Set environment variable: export GH_TOKEN=your_token_here (or GITLAB_TOKEN)
  3. Run: npx @tmegit/git-activity-tracer

Install globally (optional):

npm install -g @tmegit/git-activity-tracer
git-activity-tracer  # Fetch current week
git-activity-tracer 2025-01-01 2025-01-31  # Specific range

Common Commands

# Current week activity
git-activity-tracer

# Specific date range
git-activity-tracer 2025-01-01 2025-01-31

# Export formats
git-activity-tracer --format json
git-activity-tracer --format csv

# All commits from all branches
git-activity-tracer all-commits

# Include URLs in output
git-activity-tracer --with-links

Environment Variables

| Variable | Required | Description | Default | | -------------- | --------- | ------------------------------------- | -------------------- | | GH_TOKEN | One of * | GitHub personal access token | - | | GITLAB_TOKEN | One of * | GitLab personal access token | - | | GITLAB_HOST | No | GitLab instance URL (for self-hosted) | https://gitlab.com |

*At least one token (GitHub or GitLab) is required. Both can be used simultaneously.

Command Options

| Option | Description | Default | | ------------------- | ---------------------------------------------- | ---------------------- | | <fromdate> | Start date (YYYY-MM-DD) | Monday of current week | | <todate> | End date (YYYY-MM-DD) | Today | | --with-links | Include URLs in console output | false | | --format <format> | Output format: console, json, or csv | console | | config | Display configuration file location | - | | project-id | Manage repository project ID mappings | - | | all-commits | Show all commits from all branches (see below) | - |

All Commits Command

Show all commits from all branches (including feature branches):

git-activity-tracer all-commits                        # Current week
git-activity-tracer all-commits 2025-12-01 2025-12-31  # Date range
git-activity-tracer all-commits --format csv           # Export

Difference from default:

  • Default: Commits from base branches (main/master/develop) + PRs + reviews
  • all-commits: ALL commits from ALL branches (including feature branches)

Project ID Mapping

Map repositories to project IDs for billing and time tracking:

git-activity-tracer project-id add owner/repository PROJECT-123
git-activity-tracer project-id list
git-activity-tracer project-id remove owner/repository

Project IDs automatically appear in all output formats (console, JSON, CSV).

Configuration

Configuration file: ~/.git-activity-tracer/config.json (auto-created on first run)

# View configuration location
git-activity-tracer config

Custom Base Branches

Note: Base branch configuration applies only to GitLab. GitHub automatically uses the default branch via the GraphQL API and does not require configuration.

Default branches tracked (GitLab only): main, master, develop, development

To add more branches for GitLab, edit the configuration file:

{
  "baseBranches": ["main", "master", "develop", "development", "trunk", "staging"],
  "repositoryProjectIds": {
    "owner/repository": "PROJECT-123"
  }
}

Platform differences:

  • GitHub: Uses GraphQL contributionsCollection API which automatically provides commits from the default branch. The baseBranches configuration is not used.
  • GitLab: Filters push events by the configured baseBranches to determine which commits to include in reports.
  • Both platforms: all-commits command ignores base branch configuration and returns commits from all branches.

Self-Hosted GitLab

export GITLAB_HOST=https://gitlab.your-company.com
export GITLAB_TOKEN=your_token_here

Development

pnpm install        # Install dependencies
pnpm start          # Run in development
pnpm test           # Run tests
pnpm run lint       # Lint code
pnpm run format     # Format code
pnpm build          # Build for distribution

Contributing

This project uses Conventional Commits for automated versioning:

  • feat: - New feature (minor bump: 1.0.0 → 1.1.0)
  • fix: - Bug fix (patch bump: 1.0.0 → 1.0.1)
  • feat!: or BREAKING CHANGE: - Breaking change (major bump: 1.0.0 → 2.0.0)
  • docs:, style:, refactor:, perf:, test:, chore: - No version bump

Commits to main trigger automated releases via semantic-release.

API Limitations

  • GitHub: Up to 50 repositories, 100 commits per repository
  • GitLab: Up to 1000 events and 1000 merge requests per query

License

Apache-2.0 License © Felix Anhalt