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

02_git

v0.3.0

Published

A Git implementation in TypeScript — supports init, add, commit, log, status, branching, checkout, and three-way merge

Readme

02_git

A Git implementation written in TypeScript from scratch. Supports core Git operations including init, add, commit, log, status, branching, checkout, and three-way merge with conflict detection.

Install

npm install -g 02_git

Usage

There are two ways to use 02_git:

With global install

If you installed globally with npm install -g 02_git, you get the ts-git command:

ts-git init
ts-git add .
ts-git commit -m "initial commit"
ts-git log

With npx (no install needed)

All commands also work via npx — just prefix with npx 02_git:

npx 02_git init
npx 02_git add .
npx 02_git commit -m "initial commit"
npx 02_git log

Commands

ts-git init                        Initialize a new repository
ts-git add <path>                  Stage a file (use . to stage all)
ts-git commit -m "message"         Commit staged changes
ts-git log                         Show commit history
ts-git status                      Show working tree status
ts-git branch <name>               Create a new branch
ts-git checkout <name>             Switch to a branch
ts-git curr-branch                 Show the current branch
ts-git merge <branch> -m "msg"     Merge a branch into current
ts-git c-merge <branch>            Check for merge conflicts without merging
ts-git help                        Show help message

How it works

02_git stores data in a .tsgit directory with the same conceptual structure as Git:

  • Objects — content-addressed blobs, trees, and commits stored by SHA-1 hash
  • Refs — branch pointers stored as files under refs/heads/
  • HEAD — symbolic ref pointing to the current branch
  • Index — staging area mapping file paths to blob hashes

Merges use a three-way merge algorithm that finds the common ancestor and detects conflicts when both branches modify the same file differently.

License

MIT