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

@askenaz-dev/fdh

v0.4.1

Published

Forge Development Hub CLI — npm wrapper for the Go binary. Zero runtime dependencies.

Readme

@askenaz-dev/fdh

npm wrapper for the Forge Development Hub CLI. The published package contains a thin TypeScript/JavaScript layer that downloads the right Go binary for the developer's platform at install time and dispatches to it at runtime.

npx @askenaz-dev/fdh init           # zero-install
npm i -g @askenaz-dev/fdh           # persistent

How it works

       ┌────────────────────────────────────────────┐
       │  npm i (or npx) @askenaz-dev/fdh           │
       └─────────────────┬──────────────────────────┘
                         │
                         ▼
       ┌────────────────────────────────────────────┐
       │  postinstall.js (sync)                      │
       │  ─────────────────                          │
       │  1. detect process.platform + arch          │
       │  2. resolve GitHub Releases asset URL       │
       │     (or FDH_RELEASES_BASE override)         │
       │  3. download tarball + SHA-256 (via proxy   │
       │     if configured)                          │
       │  4. verify SHA-256                          │
       │  5. extract to node_modules/.../bin/        │
       └─────────────────┬──────────────────────────┘
                         │
                         ▼
       ┌────────────────────────────────────────────┐
       │  user runs `fdh <cmd>`                      │
       │  npm bin shim → dist/cli.js (wrapper)       │
       │  wrapper spawn() bin/fdh<.exe> w/ argv      │
       │  exit code propagated                       │
       └────────────────────────────────────────────┘

Repo layout

npm/
├── package.json           # name=@askenaz-dev/fdh, bin maps fdh + forge-installer
├── tsconfig.json          # strict TS 5+, ES2022, Node16 modules
├── vitest.config.ts       # tests in tests/*.test.ts
├── .npmignore             # only dist/ ships
├── src/
│   ├── lib.ts             # helpers: targets, proxy, download, sha256, extract
│   ├── cli.ts             # entry for `fdh` binary
│   ├── cli-alias.ts       # entry for `forge-installer` (deprecation alias)
│   └── postinstall.ts     # downloads the Go binary into bin/
├── scripts/
│   └── post-build-fixup.mjs   # adds shebang + chmod +x to dist/*.js
└── tests/
    ├── lib.test.ts
    ├── cli.test.ts
    └── postinstall.test.ts

Zero runtime dependencies

The published tarball depends on node >= 18 and that's it. The wrapper uses only Node stdlib:

  • node:fs, node:path (filesystem)
  • node:https, node:url (download)
  • node:crypto (SHA-256)
  • node:child_process (spawn the binary + delegate tar extraction)
  • node:os (platform/arch detection)

System binaries required at install/runtime:

  • tar (built into Windows 10 1809+; standard on macOS/Linux).

Versioning

The npm package version always equals the underlying Go binary version. A single git tag vX.Y.Z on the repo triggers an atomic release: Go cross-compile → upload binaries + SHA-256 to GitHub Releases → npm versionnpm publish. No independent cycles.

Configuration

The postinstall script and CLI wrapper honor these env vars:

| Variable | Default | Purpose | |----------|---------|---------| | FDH_RELEASES_BASE | https://github.com/askenaz-dev/forge-development-hub-cli/releases | Base URL for binary downloads. Override to point at a private mirror following the same release-asset layout. | | FDH_SKIP_POSTINSTALL | (unset) | Set to 1 or true to skip the postinstall binary download (useful in CI when you only need the wrapper). | | HTTPS_PROXY / HTTP_PROXY / NO_PROXY | (env) | Standard proxy env vars. Also reads npm_config_https_proxy / npm_config_proxy from .npmrc. | | NODE_EXTRA_CA_CERTS | (env) | Standard Node CA bundle override for corporate cert-inspection proxies. |

Local development

cd C:/forge/fdh/npm

# Install dev deps
npm install --ignore-scripts   # skip postinstall on dev install

# Build (TypeScript → JS in dist/, adds shebang)
npm run build

# Run unit tests
npm test

# Smoke test the wrapper without publishing
node dist/postinstall.js
./dist/cli.js --version

Publishing to an alternate registry

Default publish target is https://registry.npmjs.org/ (public, set via publishConfig.registry). To publish to a private registry instead, override at publish time:

npm publish --registry https://npm.pkg.github.com/
# or
NPM_CONFIG_REGISTRY=https://npm.askenaz.dev/ npm publish

See .npmrc.template for the per-scope configuration pattern.

See also

  • Hub-side spec: openspec/specs/fdh-npm-wrapper/spec.md in the forge-development-hub.
  • Hub-side spec: openspec/specs/fdh-cli-distribution/spec.md (channel ordering).
  • Release process: ../docs/release-process.md.
  • Troubleshooting (proxies, cert inspection): ../docs/troubleshooting.md.