Publish a scoped CLI package:
- npm package:
@eric8810/section
That gives Section two real install surfaces from the same package:
npm install -g @eric8810/section
section --help
sectiond inspectnpx --package @eric8810/section section --help- npm is an install surface, not just a JS ecosystem channel
- it gives a low-friction CLI install story for users already living in Node tooling
- it gives an
npxentry for one-shot use - it does not force Section to promise a JavaScript SDK
Official references:
- npm scoped public packages: https://docs.npmjs.com/creating-and-publishing-scoped-public-packages/
- npm package.json
binbehavior: https://docs.npmjs.com/cli/v11/configuring-npm/package-json
The npm package is a thin distribution layer:
- publish the npm package once
- on install, download the matching GitHub Release binary archive
- expose
sectionandsectiondthrough npm bin shims
This keeps the product line clear:
- Rust binaries remain the real product artifacts
- npm remains an install surface
- Section still does not become a JS SDK by accident
The first npm package should support these release archives:
section-<version>-darwin-arm64.tar.gzsection-<version>-darwin-x64.tar.gzsection-<version>-linux-arm64.tar.gzsection-<version>-linux-x64.tar.gz
Each archive should extract to:
bin/sectionbin/sectiond
- PUBLISH_FLOW.md
- ../../../packaging/npm/package.json
- ../../../packaging/npm/README.md
- ../../../packaging/npm/bin/section.js
- ../../../packaging/npm/bin/sectiond.js
- ../../../packaging/npm/lib/runtime.js
- ../../../packaging/npm/scripts/postinstall.js
This task prepares the npm install surface and publishable package skeleton.
It does not yet:
- publish the package to npm
- build or attach the release archives automatically
- promise a Windows npm install path before Windows binaries exist
- promise a JavaScript or TypeScript SDK