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

@webnori/codescan-cli

v0.11.2

Published

CLI/TUI/GUI source-code scanner with FTS5 search and git blame. (npm wrapper around the prebuilt CodeScan binary.)

Downloads

1,041

Readme

@webnori/codescan-cli

npm install entry point for CodeScan. CodeScan itself is a .NET 10 single-binary tool — this package is a thin wrapper that downloads the right prebuilt binary on postinstall and forwards your CLI args to it.

Install

# Windows / macOS / nvm-managed Node (no sudo needed)
npm install -g @webnori/codescan-cli

# Linux with system Node (apt/dnf/.pkg) — root-owned npm prefix
sudo npm install -g @webnori/codescan-cli

codescan --help

Heads up — the unscoped codescan-cli name is NOT us. An unrelated third party registered the bare codescan-cli name on npm first. That package is broken (its own ESM/CJS mismatch crashes on launch) and has nothing to do with CodeScan. Always install the scoped name @webnori/codescan-cli. If you previously installed the wrong one, remove it with npm uninstall -g codescan-cli.

Why sudo on Linux? System-Node distros put npm's global prefix at /usr/local/lib/node_modules/ (root-owned), so a non-root npm install -g fails with EACCES before postinstall can run. sudo is the simplest answer; if you'd rather not, use nvm/fnm to put Node in your home dir, or skip npm entirely with Script/install.sh (installs to ~/.local/bin/). Either way, ~/.codescan/{db,logs,config} user data is never touched.

Supported platforms (v1)

| OS | Architectures | |----|---------------| | Linux (glibc) | x64, arm64 | | macOS | arm64 (Apple Silicon) | | Windows | x64 |

All four shipped binaries (win-x64, linux-x64, linux-arm64, osx-arm64) are reachable from the npm wrapper — the postinstall picks the right one automatically.

On Windows, winget install psmon.CodeScan is still the recommended path (no Node.js required), but if you already have Node installed and prefer a single npm install -g line for your toolchain, this package works too.

musl/Alpine Linux and Intel Mac are v2 candidates.

How it works

postinstall (scripts/install.js) does the following:

  1. Detect OS + CPU arch → asset name like codescan-linux-x64.tar.gz.
  2. Fetch https://github.com/psmon/CodeScan/releases/download/v<version>/<asset>.
  3. Fetch checksums.txt from the same release and verify SHA256.
  4. Extract into vendor/codescan/ inside this package.
  5. bin/codescan.js calls that binary with your args.

Environment overrides

| Variable | Default | Purpose | |----------|---------|---------| | CODESCAN_VERSION | package.json version | Pin a different release | | CODESCAN_REPO | psmon/CodeScan | Use a fork | | CODESCAN_SKIP_DOWNLOAD | unset | If 1, skip the binary download (e.g. for CI where you preinstall manually) | | HTTPS_PROXY, HTTP_PROXY | — | Detected and warned about; v1 does not auto-route through proxy |

User data

CodeScan stores its DB, logs, and config under ~/.codescan/. That directory is never modified by install or uninstall — it survives upgrades and package removal. npm uninstall -g @webnori/codescan-cli only removes the vendored binary inside this package.

Manual install (if postinstall is blocked)

If your environment blocks postinstall network access:

# 1. Download the matching asset:
curl -LO https://github.com/psmon/CodeScan/releases/download/v<version>/codescan-linux-x64.tar.gz

# 2. Verify checksum:
curl -LO https://github.com/psmon/CodeScan/releases/download/v<version>/checksums.txt
sha256sum -c checksums.txt --ignore-missing

# 3. Extract somewhere on your PATH:
tar -xzf codescan-linux-x64.tar.gz -C ~/.local/bin --strip-components=1
~/.local/bin/codescan --version

License

MIT — same as CodeScan upstream.