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

@codecommentsai/cli

v0.2.0

Published

CodeComments CLI — review a git diff from your terminal.

Downloads

42

Readme

@codecommentsai/cli

Run a CodeComments review against a local git diff. Same engine as the GitHub App — just pointed at whatever you have checked out.

Install

curl -fsSL https://codecomments.ai/install.sh | sh

The script runs npm install -g @codecommentsai/cli and points you at the installed launcher. Requires Node.js ≥ 20 and npm. If npm's global bin directory isn't on your PATH, the installer prints the exact line to add to your shell rc.

Or install directly with npm:

npm install -g @codecommentsai/cli

Pin to a specific version with CODECOMMENTS_VERSION=1.2.3 before running the curl command, or use npm install -g @codecommentsai/[email protected].

Authenticate

Interactive (recommended for laptops)

codecomments login

Opens your browser, asks you to sign in if needed, and shows an approval page where you name the device. The new token is written to ~/.config/codecomments/config.json with 0600 permissions — you never see or paste the plaintext.

Options:

  • --api-url <url> — point at a self-hosted backend; persisted in the config.
  • --timeout <minutes> — how long to wait for browser approval (default: 5).

Headless (CI, containers, SSH)

Generate a token at codecomments.ai/dashboard/settings/cli, then save it locally:

# as a positional argument (convenient locally)
codecomments auth ccmt_xxxxxxxxxxxxxxxxxxxxxxxx

# or piped on stdin (safer — never appears in process listings)
printf '%s' "$CODECOMMENTS_TOKEN" | codecomments auth

The token is written to ~/.config/codecomments/config.json with 0600 permissions.

Review

From the root of a git repo:

# Review HEAD vs origin/main (default)
codecomments review

# Against a different base
codecomments review --base origin/develop

# Review a pre-generated patch file
codecomments review --diff my.patch

# Pipe a diff on stdin
git diff main...feature | codecomments review --stdin

# Machine-readable output
codecomments review --json

Exit code is 1 when any P1 (blocking) finding is present, 0 otherwise — safe to drop into CI.

Commands

| Command | What it does | | ----------------------------- | -------------------------------------------------------------- | | codecomments login | Browser-based auth. Use on laptops. | | codecomments auth [<token>] | Save a pasted token. Use in CI / headless. Omit for stdin. | | codecomments review | Review the current branch against a base. | | codecomments whoami | Print the saved token fingerprint. |

Env vars

  • XDG_CONFIG_HOME — respected when resolving the config path.

Pointing at a non-default backend

Pass --api-url when running either codecomments login or codecomments auth. The URL is persisted in the config and reused by every subsequent review call. To switch backends, rerun the same command with a new URL.