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

@rkokilan2002/git-pilot

v1.0.10

Published

Local-first Git collaboration CLI for file locking, safe staging, and team activity sync.

Readme

GitPilot

GitPilot is a local-first Git collaboration assistant for teams. It helps prevent merge conflicts before they happen, tracks file ownership, blocks unsafe actions, and improves visibility into team activity.

GitPilot runs in two modes:

  • Local only (no server required)
  • Optional MongoDB sync for team collaboration

GitPilot CLI commands:

  • gitpilot
  • gtp (alias)

Project Overview

GitPilot adds a lightweight coordination layer on top of Git. It is designed for fast, daily use in real repositories.

With GitPilot, teams can:

  • Prevent merge conflicts early
  • Track who is working on which files
  • Block unsafe commits and pushes
  • See recent file-level activity

Core Features

1) File Locking

  • Lock files before editing to signal ownership
  • Only the lock owner can unlock
  • Reduce accidental overlap on critical files

2) Safe Add

GitPilot blocks staging when:

  • Your branch is behind remote
  • A changed file is locked by another user

3) Activity Tracking

  • Records added and removed lines per file
  • Shows recent collaboration history
  • Maintains practical history limits for speed

4) Status Command

The status view shows:

  • Modified files
  • Lock status per modified file
  • Other active locks in the repository

5) Who Command

The who view shows:

  • Active locks
  • Recent activity

6) Git Hooks

  • Pre-commit blocks commits when locked files are modified by non-owners
  • Pre-push blocks push when branch is behind remote
  • Pre-push also runs state sync

7) Auto Sync (Hybrid)

  • Local-first by default
  • Optional MongoDB sync
  • Sync happens during command execution (no daemon)
  • Sync runs automatically before commit and before push, and on relevant read and lock operations

Installation

Install globally:

npm install -g @rkokilan2002/git-pilot

Setup

Initialize GitPilot in your repository:

gtp init

This will:

  • verify you are in a Git repository
  • set your user name (interactive)
  • optionally configure MongoDB
  • install Git hooks

Setup with defaults (non-interactive):

gtp init --yes

This skips prompts and uses defaults where possible.

Usage

Lock a file:

gtp lock <file>

Unlock a file:

gtp unlock <file>

View team activity and locks:

gtp who

Repository status:

gtp status

Safe add (with lock and remote checks):

gtp add <path>

Manual sync with MongoDB:

gtp sync

Doctor (check GitPilot setup):

gtp doctor

Configuration

View current configuration:

gtp config list

Set your user name:

gtp config set-user <name>

Remove user configuration:

gtp config unset-user

Set MongoDB for team sync:

gtp config set-mongo <uri>

Remove MongoDB configuration:

gtp config unset-mongo

Reset all configuration:

gtp config reset

MongoDB Setup

For team sync, set up MongoDB Atlas:

  1. Create a MongoDB cluster at MongoDB Atlas
  2. Create a database user and copy the connection URI
  3. Whitelist your IP in Network Access
  4. Share the URI securely (not in Git or public channels)
  5. Configure on each machine:
gtp config set-mongo <mongo-uri>

After setup, locks and activity are shared across team members.

Hooks

Install hooks in the repository:

gtp install

Remove GitPilot hooks:

gtp uninstall

(Only removes GitPilot-managed hooks, preserves others)

Advanced

State Storage

Local state is stored in:

.git/gitpilot/state.json

User configuration is stored in:

~/.gitpilot/config.json

Emergency (Bypass hooks)

In critical situations, bypass hooks temporarily:

git commit --no-verify
git push --no-verify

Warning: Using --no-verify may cause merge conflicts or overwrite another developer's work.

Example Output

Status view:

[OK] GitPilot Repository Status

Modified Files
  src/auth.ts         -> locked by kokilan
  src/utils.ts        -> unlocked

Other Active Locks
  src/config.ts       -> alex

Who view:

[OK] GitPilot Status

Active Locks
  src/auth.ts         -> kokilan

Recent Activity
  src/auth.ts         -> kokilan (+20 / -5)
  src/utils.ts        -> alex (+10 / -2)

Design Principles

  • Local-first
  • No background processes
  • Fast CLI execution
  • Fail-safe offline behavior
  • Minimal friction for daily Git workflows

How It Works

GitPilot maintains state separately from Git. Each repository is identified by its Git remote URL, ensuring that all team members working on the same repository share the same locks and activity data, regardless of their local folder names.

When MongoDB is configured, state is synced automatically during relevant operations. Without MongoDB, GitPilot works entirely locally within .git/gitpilot/.

Why GitPilot

Git is excellent at version control, but it does not coordinate active file ownership before conflicts happen. GitPilot adds that coordination layer so teams can avoid overwriting each other and reduce review and merge friction.

Roadmap

  • Cloud version
  • VS Code extension
  • Web dashboard
  • Conflict prediction

License

MIT

Repository

  • Source: https://github.com/rkokilan2002/gitpilot
  • Issues: https://github.com/rkokilan2002/gitpilot/issues