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

@anys/gerrit-cli

v1.4.0

Published

A safe local Git workflow CLI for Gerrit Code Review.

Readme

@anys/gerrit-cli

A safe local Git workflow CLI for Gerrit Code Review.

Unofficial community project. It is not affiliated with or endorsed by the Gerrit project.

Documentation

Install

npx @anys/gerrit-cli --help

Or add it to a project:

pnpm add -D @anys/gerrit-cli

The CLI supports Node.js 14.17 or newer. Node.js 14 and 16 are legacy compatibility targets; use a maintained Node.js release when the host project allows it.

Every invocation checks npm's latest tag. When a newer release exists, the CLI prints a concise upgrade notice to stderr. Registry failures and timeouts stay silent and never block the requested Gerrit operation; --json stdout remains a single machine-readable envelope.

Quick example

# On first use, the CLI asks for the Gerrit base URL and can save it globally.
gerrit clone team/app --dry-run
gerrit clone team/app

gerrit --json doctor --offline
gerrit setup --dry-run
gerrit status
gerrit amend --dry-run
gerrit merge feature/login --dry-run
gerrit review alice,bob --dry-run

The first interactive gerrit clone team/app asks for the clone base URL and whether to save it in ~/.config/gerrit-cli/config.json. Later clones only need the project name. When run inside an existing Gerrit repository, the CLI first tries to infer the base from that repository's remote. --dry-run may prompt for a base but never writes the configuration.

The same setting can also be managed manually:

{
  "cloneBaseUrl": "ssh://[email protected]:29418",
  "webUrl": "https://gerrit.example.com"
}

cloneBaseUrl also accepts HTTP or HTTPS. The CLI never stores a password, access token, or refresh token; SSH and Git credential helpers remain responsible for authentication. OAuth refresh tokens are provider-specific and are not a portable Gerrit authentication mechanism. Use --base-url for a one-off override without changing configuration.

Repository commands reject ordinary Git remotes before planning or changing anything. The shared offline gate recognizes an explicit Gerrit SSH port (29418); configure webUrl for HTTPS, custom SSH ports, and SCP-like remotes. doctor reports this as a diagnostic and can verify live SSH connectivity; hook run only executes an already installed Gerrit hook and does not inspect the remote.

gerrit setup respects core.hooksPath. When Husky or another manager already owns the active commit-msg hook, setup preserves its commands and appends an idempotent managed bridge to the official Gerrit hook. The bridge resolves Git's common directory at commit time, so it also works in linked worktrees and does not require a globally installed gerrit command. For current Husky layouts, setup updates the project-owned .husky/commit-msg file rather than the generated .husky/_ dispatcher.

The CLI defaults to previews, explicit synchronization strategies, and interactive confirmation before a live merge or review push. Run gerrit merge in a terminal to refresh the remote and choose the source branch. Remote refresh is the default; pass --no-fetch to use existing refs. Merge always uses --no-ff --log so branch integration remains an explicit, reviewable commit whose message summarizes the source commits; use gerrit sync for fast-forward synchronization. Use explicit commands and --json in automation. Review preflight stops before pushing when HEAD is already known on another remote-tracking branch.

Use gerrit amend after staging changes to preserve HEAD's Change-Id and upload a new Patch Set for the same Gerrit Change. For a merge commit, gerrit amend --merge-log automatically regenerates the body from the commits reachable from its second parent but not its first parent. It preserves the existing Change-Id and uploads the result as a new Patch Set. The command never stages files automatically; pass --edit-message for a manual message-only update or --no-review to keep the amendment local.

License

MIT