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

generate-commit

v2.0.1

Published

CLI tool to generate backdated Git commit commands

Readme

Generate Commit

Generate Commit is a CLI tool that allows you to easily create backdated Git commits. You can specify the commit date and time, or let the tool generate a random time for you. This tool automates the process of creating commits with custom timestamps, which is useful for projects where you need to backdate commits.


Features

  • Backdate commits: Allows you to specify a custom commit date and time.
  • Random time generation: Automatically generates a random time if no time is provided.
  • Interactive CLI: Prompts the user to enter commit details and generates a commit command.
  • Non-interactive CLI: Supports flags that allow you to pass the date, time, and commit message directly.
  • Custom commit messages: You can provide a unique commit message for each generated commit.
  • Seamless Git integration: Generates a commit command that you can directly run in your terminal.

Flags

  • y: Generate everything randomly (date, time, and message).
  • -d "<date>": Specify the date (in YYYY-MM-DD format).
  • -t "<time>": Specify the time (in HH:MM:SS format).
  • -m "<message>": Specify the commit message.

Behavior

  • If -y is used, it overrides everything and generates random values.
  • If specific flags like -d, -t, or -m are provided, they are used. Missing fields are filled with random values.
  • If no flags are used, the script enters an interactive prompt.
  • If no inputs are provided, it generates missing values randomly.

Installation

You can install the generate-commit package globally via npm to use it across all your projects:

npm install -g generate-commit

Usage

Once installed, you can run the tool interactively. The tool will prompt you to input the commit date, time, and message. This mode is useful if you prefer to input commit details step-by-step.

To use it, simply run the following command in your terminal:

generate-commit

or

npx generate-commit

When you run this command, the tool will prompt you to:

  • Enter the commit date: If no date is provided, it will default to today's date.
  • Enter the commit time: If no time is provided, the tool will generate a random time for you.
  • Enter the commit message: You will be prompted to enter a custom commit message.

For example, the prompt will look like this:

Enter the date (YYYY-MM-DD) [Leave blank for random]: 2025-01-15
Enter the time (HH:MM:SS) [Leave blank for random]: 15:30:23
Enter the commit message [Leave blank for random]: Initial commit

Enter commit date (YYYY-MM-DD): 2025-01-15 Enter commit time (HH:MM): 15:30 Enter commit message: Initial commit

Once you are done you will get a commit command that you can now run to commit your changes, you can press ENTER to copy to clipboard or ESC to cancle

Here’s the Git command you can use to create the commit:

GIT_AUTHOR_DATE="2025-01-15 15:30:23" GIT_COMMITTER_DATE="2025-01-15 15:30:23" git commit --amend -m "Initial commit"

Press Enter to copy the command to your clipboard, or Press Esc to cancel...

You can now copy the command and use it to create your git commit

Built with ❤ by: Chisom Joseph Njoku, follow me on GitHub

Feel free to contribute on GitHub