@askenaz-dev/forge-cli
v0.1.5
Published
Forge developer CLI — install governed Forge skills into your agent (Claude Code, Copilot, Codex, Cursor, Gemini CLI, …).
Readme
@askenaz-dev/forge-cli (npm distribution)
This directory builds and publishes the forge CLI to npm under the @askenaz-dev scope using the
optionalDependencies-per-platform pattern (same approach used by esbuild, biome, swc).
Layout
bin/forge.js— committed JS shim shipped inside the@askenaz-dev/forge-cliparent package; resolves and execs the platform-specific binary.publish.mjs— release-time orchestrator. Readscli/forge/dist/(produced by goreleaser), generates one prebuilt npm package per platform, then publishes the parent.
How it works
Installing @askenaz-dev/forge-cli lets npm/pnpm/yarn/bun pick the matching @askenaz-dev/forge-cli-<platform>-<arch> optional dependency (skipping the others). The parent's bin/forge.js then spawnSync's the binary from that sub-package.
@askenaz-dev/[email protected]
├─ optionalDependencies
│ ├─ @askenaz-dev/[email protected]
│ ├─ @askenaz-dev/[email protected]
│ ├─ @askenaz-dev/[email protected]
│ ├─ @askenaz-dev/[email protected]
│ └─ @askenaz-dev/[email protected]
└─ bin/forge.js → resolves & execs the matching sub-package's binaryRelease flow
- Tag the repo with
vX.Y.Z. .github/workflows/cli-release.ymlruns goreleaser → producescli/forge/dist/, the GitHub release, and the Homebrew formula inaskenaz-dev/homebrew-tap.- The same workflow runs
node cli/forge/npm/publish.mjswithVERSION=$GITHUB_REF_NAMEto publish all 5 platform packages + the parent.
Local dry-run
cd cli/forge
goreleaser release --snapshot --clean
cd npm
VERSION=v0.0.0-dev DIST=../dist DRY_RUN=1 node publish.mjsSecrets required in CI
| Secret | Purpose |
|---|---|
| NPM_TOKEN | Automation token for the npm account/org that owns the @askenaz-dev scope |
| HOMEBREW_TAP_GITHUB_TOKEN | PAT with repo scope on askenaz-dev/homebrew-tap |
