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
postinstalland forwards your CLI args to it.
npm install -g codescan-cli
codescan --help| 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.
postinstall (scripts/install.js) does the following:
- Detect OS + CPU arch → asset name like
codescan-linux-x64.tar.gz. - Fetch
https://github.com/psmon/CodeScan/releases/download/v<version>/<asset>. - Fetch
checksums.txtfrom the same release and verify SHA256. - Extract into
vendor/codescan/inside this package. bin/codescan.jscalls that binary with your args.
| 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 |
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 codescan-cli only removes the vendored
binary inside this package.
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 --versionMIT — same as CodeScan upstream.