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

git-xopen

v0.1.0

Published

Open a git remote's web page. Resolves SSH aliases (ssh.github.com, altssh.bitbucket.org, ...) and lets you pick between multiple remotes/URLs.

Readme

git-xopen

Open a git remote's web page in your browser. Smart about SSH host aliases, and interactive when a repo has multiple remotes or push URLs.

CI npm

Why

The popular paulirish/git-open works great — until your ~/.ssh/config rewrites github.com to ssh.github.com (the common port-443 workaround), at which point it happily opens https://ssh.github.com/…. Or until your repo has a fork wired up as a second push URL, where it silently picks the wrong one.

git-xopen fixes both:

  1. Smart SSH resolution. Host aliases like ssh.github.com, altssh.bitbucket.org, vs-ssh.visualstudio.com, and ssh.<provider> are mapped back to the canonical web host. Self-hosted GitLab / Gitea / Azure instances are left as-is.
  2. Multi-remote selection. When a repo has more than one remote (or a remote with multiple url / pushurl entries), git-xopen shows an interactive picker — and you can pin a default with --set-default.

Install

npm install -g git-xopen

Or run without installing:

npx git-xopen

Once installed, Git picks up git-<subcommand> executables on PATH automatically, so you invoke it as:

git xopen

Usage

git xopen [options] [remote] [branch]

Options:
  -p, --print          Print the URL instead of opening it
      --pick           Force the selection prompt (ignore saved default)
      --set-default    Save the chosen target as the per-repo default
      --clear-default  Remove the saved default for this repo
  -h, --help           Show this help
  -v, --version        Show version

Common commands:

# Open the current branch's page
git xopen

# Open a specific branch on a specific remote
git xopen origin feat/login

# Just print the URL (useful in scripts / shell pipes)
git xopen --print

# Forget the default and pick again
git xopen --pick --set-default

Supported hosts

| Provider | Branch URL shape | | ------------------ | ---------------------------------- | | GitHub | /tree/<branch> | | GitLab (hosted & self-hosted) | /tree/<branch> | | Bitbucket Cloud | /src/<branch> | | Azure DevOps | ?version=GB<branch> | | Gitea / Codeberg | /src/branch/<branch> | | sourcehut | /src/branch/<branch> | | Unknown hosts | Falls back to /tree/<branch> |

How SSH aliases are resolved

git-xopen reads remote.<name>.url and remote.<name>.pushurl directly from git config, so it does not pick up url.<base>.insteadOf rewrites (which is what causes ssh.github.com to leak into web URLs in the first place).

It then normalises known SSH aliases:

| As seen in your SSH config | Resolved to | | ------------------------------ | ------------------ | | ssh.github.com | github.com | | ssh.gitlab.com | gitlab.com | | altssh.bitbucket.org | bitbucket.org | | vs-ssh.visualstudio.com | dev.azure.com | | ssh.dev.azure.com | dev.azure.com | | ssh.<anything-else> for a known provider | stripped |

Self-hosted hosts (gitlab.internal.corp, git.example.com, …) are preserved verbatim.

Persisting a default

The saved default is per-repo and lives in your local git config:

[xopen]
    default = origin::github.com/OWNER/REPO

Inspect or edit directly:

git config --get xopen.default
git config --unset xopen.default

Development

npm install
npm run typecheck
npm test
npm run build
node dist/index.js --help

License

MIT