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

@mokoconsulting/mokogit-cli

v1.3.0

Published

gh-style command-line interface for MokoGit (/api/v1) — repos, PRs, issues, releases, and browser-based OAuth2 authentication

Readme

mokogit-cli

Language License Platform

A gh-style command-line interface for MokoGit (the git server at git.mokoconsulting.tech). It mirrors the GitHub CLI's command system — auth, repo, pr, issue, release, api, browse — but speaks MokoGit's /api/v1, which gh cannot. Authentication is browser-based via OAuth2 (PKCE), so tokens can be requested and stored without ever leaving the terminal.

Why this exists

gh assumes every non-github.com host is GitHub Enterprise and validates tokens against /api/v3. MokoGit serves /api/v1, so gh's API commands 404 against MokoGit. mokogit-cli fills that gap with the same ergonomics.

Install

npm install -g @mokoconsulting/mokogit-cli

Or from source:

git clone https://git.mokoconsulting.tech/MokoConsulting/mokogit-cli.git
cd mokogit-cli
npm install
npm run build
npm link

Authenticate

Browser login (recommended) — opens MokoGit, you approve, the token is captured automatically:

mokogit auth login --web

Other options:

mokogit auth login                 # opens the token page, prompts you to paste a PAT
echo "$TOKEN" | mokogit auth login --with-token
mokogit auth status                # show who you are and token health
mokogit auth token                 # print the token (refreshed) for scripts/git
mokogit auth logout

The browser flow uses OAuth2 Authorization-Code + PKCE against a pre-registered public client. The CLI listens on an ephemeral http://127.0.0.1:<port>/callback, receives the authorization code, and exchanges it for an access + refresh token. Access tokens are refreshed automatically when they near expiry. Credentials live in ~/.config/mokogit/hosts.json (owner-readable). MOKOGIT_TOKEN overrides the store, and MOKOGIT_HOST overrides the default host — mirroring GH_TOKEN / GH_HOST.

Usage

mokogit repo list --org MokoConsulting
mokogit repo view MokoConsulting/mokogit-cli
mokogit repo create my-project --org MokoConsulting --private
mokogit repo clone MokoConsulting/mokogit-cli

mokogit pr list -R MokoConsulting/mokogit-cli
mokogit pr view 12 -R MokoConsulting/mokogit-cli
mokogit pr create --head feature/x --base main --title "Add x"

mokogit issue list -R MokoConsulting/mokogit-cli
mokogit issue create --title "Bug" --body "…" -R MokoConsulting/mokogit-cli

mokogit release list -R MokoConsulting/mokogit-cli
mokogit release create v1.2.0 --title "1.2.0" --notes "…"

mokogit api /user
mokogit api -X POST /repos/OWNER/REPO/issues -f title="Bug" -f body="…"

mokogit browse -R MokoConsulting/mokogit-cli

Inside a MokoGit clone, -R/--repo is inferred from the origin remote. Add --json to any command for raw JSON output.

Requirements

  • Node.js 20.0.0 or later
  • git on PATH (for repo clone)

License

GNU General Public License v3.0 or later — see LICENSE.


Moko Consulting · MokoCLI