CLI and documentation
CLI
The published npm package and executable are both named napikit. bunup bundles the CLI's JavaScript dependencies into dist/index.js, so the published manifest has no runtime dependency downloads. The CLI exposes:
new [name]to scaffold a project.buildandbuild --releaseto build addons.bump [version]to version generated packages.publishto publish packages to npm.npm-initto initialize npm trusted publishing.
The CLI workspace lives at packages/cli/. Keep bunup as its bundler. The published bundle requires Node.js >=20.19.0; repository development uses Bun 1.3.14, and generated Zig projects use Zig 0.16.0. Validate TypeScript with bun run typecheck, behavior with bun test, and the distributable plus its node dist/index.js --help smoke check with bun run build.
packages/cli/bunup.config.ts embeds the checked-out repository's exact 40-character Git commit into the CLI bundle. The scaffolder uses only that immutable revision for zig fetch; runtime environment variables cannot redirect it. Generated projects record npm 11.18.0, pnpm 10.34.5, Yarn 4.17.1, or Bun 1.3.14 and use the corresponding frozen install in their pinned-action publication workflow.
Keep command files focused on orchestration:
src/build/targets.tsowns target discovery and CLI target parsing.src/build/dev-outputs.tsowns development output snapshots, compare-and-swap writes, and recovery.src/build/reconcile.tsowns release package reconciliation.src/scaffold/owns templates, writes, project validation, and Zig fingerprints.src/internal/validation.tsowns npm name/version, GitHub repository, workflow filename, and containment checks.src/npm.tsowns publishable package discovery and the one-version invariant;src/utils.tsowns the canonical npmjs registry argument boundary.
Documentation
Rspress serves skills/ at https://napi.teakit.org, following the teakit/arith content model. The root contains only the overview, compact LLM contract, and teakit-napi package guidance. Detailed public pages live beside this file and are mapped back to stable routes by the canonical rspress.routes.ts inventory, which rspress.config.ts consumes, including /quick-start, /async/workers, and /reference/env.
- Put detailed public tutorials, reference pages, and package guidance in
skills/teakit-napi/references/. - Put durable implementation knowledge in
docs/knowledge/. - Put decisions and invariants in
docs/memory/. - Put design options in
docs/proposals/. - Put accepted implementation contracts in
docs/specs/. - Update
skills/_meta.json,skills/teakit-napi/references/_meta.json, andrspress.routes.tstogether when public pages move;tests/docs/verify-routes.tsenforces that they remain synchronized. - Keep Rspress itself at the repository root: root dependency, root scripts, root configuration, root
skills/content, and rootdoc_build/output. - Run
bun run docs:buildto detect broken links and verify generated routes.
Repository automation and hosting boundary
.github/workflows/quality.ymlruns the canonicalcheck,typecheck,test,build, anddocs:buildgate. Repository CI and the tag-driven CLI release reuse that gate..github/workflows/publish-to-npm.ymlreleases this repository'snapikitpackage. The scaffolded addon workflow is a different file,.github/workflows/publish.yml, written into generated consumer projects.- Rspress writes the static site to
doc_build/andtests/docs/verify-routes.tsverifies the canonical origin and stable routes. - No hosting-provider deployment workflow or DNS configuration for
napi.teakit.orgis present in this repository. Maintainers must configure and verify external hosting, artifact deployment, TLS, and DNS separately; a successfuldocs:buildproves the site artifact and route contract, not that production deployment occurred.
Use the detailed CLI reference when changing commands or flags.