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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tool3/restory

v2.0.0

Published

rewrite git history

Downloads

195

Readme

restory 2.0

✅ Rewritten in TypeScript.
✅ Added quiet mode.
✅ super fast (uses git-filter-repo instead of git filter branch).
✅ simple and intuitive api.
✅ standalone - no 3rd party requirements (git-filter-repo included).

[!CAUTION] THIS WILL REWRITE YOUR GIT HISTORY! THIS OPERATION CANNOT BE REVERTED! USE AT YOUR OWN RISK!

install

npm install -g @tool3/restory

or

npx @tool3/restory <cmd> [args] [options]

things to know:

  • restory uses it's own dist of git-filter-repo
    and therefore doesn't rely on you having it.
  • by default it does NOT remove origin when done rewriting. (unless run with --safe).
  • every restory command recreates the commit|s shas.
  • you need to have a clean working directory.
  • you will have to force push if using the same origin.
  • when run without commit filter flag (-s || -n || -r - see options) - the command will rewrite ALL commits with given input.

api

every command in restory can either set a new value or replace an existing value.
restory <cmd> [optional-subject-to-replace] <value>
see more details for each command below
| Command | Description | Alias | |-----------|-------------------------------------------------------------------------------------------------------|-------| | list | list all commits | ls | | redate | rewrite commit(s) date | rd | | reauthor| rewrite commit(s) author name | ra | | remail | rewrite commit(s) author email | re | | remsg | rewrite commit(s) message | rm | | rewrite | rewrite multiple commit fields. This command is a combination of all of the commands above, and is controlled with flags | rw |

options

| Option | Alias | Description | Default | | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | | sha | s | rewrite a specific commit sha. | | | quiet | q | don't log every commit change. | | | safe | S | remove origin when done rewriting. | | | range | r | range of commits to operate on. | | | truncate | t | truncate output to minimum width. | | | number | n | number of commits. | 0 (all commits) | | committer | c | include committer fields. For example: author_date will also include committer_date in the rewrite. | true | | git-filter-repo | g | use git filter-repo instead of git filter-branch. This method is extremely fast compared to filter-branch. | true |

commands

ls

list all commits

restory ls

list last 5 commits

restory ls -n 5

list range of commits

restory ls -r 'c884ca6' '0b4be21'

redate

rewrite all commits that has 2021 to year to 1987

restory redate 2021 1987

[!NOTE]
this will also automagically update the day and month

rewrites a specific commit's day

restory redate 'Jan 23' 'Jan 24' -s '0b4be21'

rewrites the last 5 commits date to now

restory redate "$(echo `date`)" -n 5

reauthor

rewrite all commit author names to The Devil

restory reauthor 'The Devil'

rewrite last 5 commits author to Jebediah Kerman

restory reauthor 'Jebediah Kerman' -n 5

remail

rewrite all commit author and committer email to thedevil@666.com

restory remail 'thedevil@666.com'

remsg

rewrite specific commit message

restory remsg 'this is the new commit msg' -s '620a83b'

rewrite Moon to Mun in all commit messages

restory remsg 'Moon' 'Mun'

rewrite

rewrite commit message and replace date year 1987 to 1988 for the last 3 commits

restory rewrite -m 'this is the new commit msg' -d '1987' '1988' -n 3

rewrite Moon to Mun in all commit messages

restory rewrite -m 'Moon' 'Mun'

rewrite commit message, replace t to z in author name and set email to new_value@world.com in a range of commits

restory rewrite -m 'new message' -a 't' 'z' -e 'new_value@world.com' -r '8381e6a' '4110655'