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

gitrepublic-cli

v1.0.0

Published

Command-line tools for GitRepublic: git wrapper with enhanced error messages, credential helper, commit signing hook, and API access

Downloads

100

Readme

GitRepublic CLI

Command-line tools for GitRepublic: git wrapper with enhanced error messages, credential helper, commit signing hook, and API access.

Note: This CLI is part of the gitrepublic-web monorepo but can also be used and published independently. See SYNC.md for information about syncing to a separate repository.

Quick Start

# Install
npm install -g gitrepublic-cli

# Set your Nostr private key
export NOSTRGIT_SECRET_KEY="nsec1..."

# Setup (configures credential helper and commit hook)
gitrep-setup

# Use gitrepublic (or gitrep) for git operations
gitrep clone https://your-domain.com/api/git/npub1.../repo.git gitrepublic-web
gitrep push gitrepublic-web main

# Use gitrep for API commands too
gitrep push-all main              # Push to all remotes
gitrep repos list                 # List repositories
gitrep publish repo-announcement myrepo

# Note: "gitrep" is a shorter alias for "gitrepublic" - both work the same way.
# We suggest using "gitrepublic-web" as the remote name instead of "origin"
# because "origin" is often already set to GitHub, GitLab, or other services.

Commands

  • gitrepublic or gitrep - Unified command for both git operations and API access
    • Git commands: gitrep clone, gitrep push, gitrep pull, etc.
    • API commands: gitrep push-all, gitrep repos list, gitrep publish, etc.
  • gitrepublic-setup or gitrep-setup - Automatic setup script
  • gitrepublic-uninstall or gitrep-uninstall - Remove all configuration

Note: gitrep-api and gitrepublic-api are still available for backward compatibility but are now aliases to gitrep/gitrepublic.

Run any command with --help or -h for detailed usage information.

Uninstall

# Remove all configuration
gitrep-uninstall

# See what would be removed (dry run)
gitrep-uninstall --dry-run

# Keep environment variables
gitrep-uninstall --keep-env

Features

  • Git Wrapper: Enhanced error messages for GitRepublic operations
  • Credential Helper: Automatic NIP-98 authentication
  • Commit Signing: Automatically sign commits for GitRepublic repos
  • API Access: Full command-line access to all GitRepublic APIs

Requirements

  • Node.js 18+
  • Git
  • Nostr private key (nsec format or hex)

Commit Signing

The commit hook automatically signs all commits by default (GitHub, GitLab, GitRepublic, etc.). The signature is just text in the commit message and doesn't interfere with git operations.

To only sign GitRepublic repositories (skip GitHub/GitLab):

export GITREPUBLIC_SIGN_ONLY_GITREPUBLIC=true

To cancel commits if signing fails:

export GITREPUBLIC_CANCEL_ON_SIGN_FAIL=true

By default, the full event JSON is stored in nostr/commit-signatures.jsonl (JSON Lines format) for each signed commit. Events are organized by type in the nostr/ folder for easy searching.

To also include the full event JSON in the commit message (base64 encoded):

export GITREPUBLIC_INCLUDE_FULL_EVENT=true

To publish commit signature events to Nostr relays:

export GITREPUBLIC_PUBLISH_EVENT=true
export NOSTR_RELAYS="wss://relay1.com,wss://relay2.com"  # Optional, has defaults

Documentation

For detailed documentation, run:

  • gitrep --help or gitrepublic --help - General help and git commands
  • gitrep push-all --help - Push to all remotes
  • gitrep repos --help - Repository management
  • gitrep publish --help - Publish Nostr events
  • gitrep-setup --help or gitrepublic-setup --help - Setup options
  • gitrep-uninstall --help or gitrepublic-uninstall --help - Uninstall options

Links

License

MIT