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

@clare-codex/green-year

v1.0.1

Published

A CLI tool to fill your GitHub contribution graph with fake commits.

Readme

Green Year CLI 🌳

A command-line tool to fill your GitHub contribution graph with fake commits. Make every day look like a productive day!

Ever wanted to paint your GitHub contribution graph a solid green? Or maybe you're testing tools that interact with Git history? green-year is a simple CLI tool that allows you to generate a commit history for any given date range, with a randomized number of commits per day to make it look more authentic.

Green Year CLI

🤔 Why?

  • Aesthetics: For developers who love seeing a fully green contribution graph.
  • Testing: Create repositories with a dense commit history for testing Git-related tools or scripts.
  • Privacy: If you work in a private repository, your contributions don't show up. This tool can help you maintain a green public profile without exposing proprietary work.

✨ Features

  • Custom Date Ranges: Specify any start and end date.
  • Randomized Commit Frequency: Creates a variable number of commits each day to look more natural.
  • Configurable Intensity: You can control the minimum and maximum number of commits per day.
  • Easy to Use: A simple, straightforward command-line interface.
  • Safe: Operates in a specific directory, preventing accidental changes to other projects.

⚠️ Important Warning

This tool rewrites Git history. It is highly recommended to use it only on a new, empty repository created specifically for this purpose. Using it on an existing repository with important history can lead to data loss. The final step requires a force push, which is a destructive action. Use with caution!

📦 Installation

You can install green-year globally using npm, which will make the green-year command available in your terminal.

npm install -g green-year

(Note: You need to publish your package to npm for this to work. The package name green-year might already be taken.)

🚀 Usage

The basic command requires a start date and an end date in YYYY-MM-DD format.

Command

green-year <startDate> <endDate> [options]

Arguments

  • <startDate>: The start date for generating commits (e.g., 2024-01-01).
  • <endDate>: The end date for generating commits (e.g., 2024-12-31).

Options

  • --repo, -r: Path to the local Git repository. (Default: current directory .)
  • --min: The minimum number of commits per day. (Default: 1)
  • --max: The maximum number of commits per day. (Default: 5)
  • --help, -h: Display the help menu.
  • --version, -v: Display the package version.

Examples

1. Fill the entire year of 2024 with default activity (1-5 commits/day):

# First, create and navigate to a new directory
mkdir my-green-year
cd my-green-year
git init

# Run the command
green-year 2024-01-01 2024-12-31

2. Create a more intense commit history for a specific quarter:

green-year 2025-01-01 2025-03-31 --min 5 --max 15

3. Create subtle activity, allowing for days with no commits:

green-year 2024-07-01 2024-09-30 --min 0 --max 2

After Running the Command

Once the script finishes, you need to push the history to your GitHub repository.

# 1. Add your GitHub repository as the remote origin
git remote add origin https://github.com/your-username/your-repo-name.git

# 2. Force push the new history to the main branch
git push -u origin main --force

🛠️ How It Works

The script iterates through each day in your specified date range. For each day, it:

  1. Generates a random number of commits based on your --min and --max settings.
  2. For each commit, it creates a unique message and content.
  3. It then uses the GIT_AUTHOR_DATE and GIT_COMMITTER_DATE environment variables to set the commit's timestamp to the correct historical date.
  4. Finally, it runs git commit with the backdated information.

💻 Development

Interested in contributing? Here’s how to get started.

  1. Clone the repository:

    git clone https://github.com/clare-codex/green-year.git
    cd green-year
  2. Install dependencies:

    npm install
  3. Link the package for local testing: npm link creates a global symlink to your local project directory. This allows you to run the green-year command anywhere on your system and have it execute your local development code.

    npm link
  4. Make your changes and test them! You can now open a new terminal window, navigate to a test repository, and run the green-year command with your changes.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.