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

@forgent3d/cad-build

v0.1.7

Published

Portable Forgent3D CAD build capability for coding agents: build-check a build123d-dialect model.py and measure its geometry with the same wasm engine the product runs — no monorepo, no python, no OCCT install. Drives the forgent3d skill's rebuild / run-p

Readme

@forgent3d/cad-build

The portable CAD build capability a coding agent (Claude Code / Codex) drives to author a Forgent3D model.py. It bundles the same engine the product runs — @forgent3d/build-service's buildOne / probeOne over @forgent3d/cad-engine's wasm — so rebuild and run-python return byte-for-byte what the in-product CAD agent sees. No monorepo, no python, no OCCT install: the wasm + cadkit assets ship inside this package.

This is the engine behind the forgent3d skill; the skill's scripts shell out to npx @forgent3d/cad-build … (with a local-path fallback for unpublished use).

Commands

cad-build rebuild    [model.py]                 # build-check + dimension report
cad-build run-python [model.py] --code '…'      # measure geometry after the build
cad-build run-python --code-stdin < snippet.py  # large snippet via stdin
cad-build recipe     <assembly|selectors|outline>
cad-build export     [model.py] --format step   # step | stl | glb | obj | 3mf
cad-build preview    [model.py]                 # → shareable read-only 3D link

model.py defaults to ./model.py; its directory is the project root (so relative refs resolve exactly like the product's per-project workspace).

  • rebuild — mirrors the product's rebuild_model: ok + overall bbox + per-body world bboxes + cylindrical-face census + diagnostics, or the first actionable build error.
  • run-python — mirrors run_python: runs an ephemeral dialect snippet in model.py's namespace after it builds and prints what you print(). Nothing is persisted — real changes go in model.py.
  • recipe — prints a focused CAD recipe (bundled from the production *.recipe.ts, single source of truth).
  • export — writes the built model as STEP/STL/GLB/OBJ/3MF next to the source (--out to place it elsewhere). Entirely local; talks to no server.
  • preview — builds the BREP locally, then uploads model.py and that geometry to the anonymous preview endpoint and prints a share link. The link opens read-only for anyone, signed in or not — nothing is rebuilt server-side, and it becomes editable only when someone remixes it into their own account. The secret that lets a later preview update the same link lives in .forgent3d-preview.json. Override the endpoint with FORGENT3D_PREVIEW_ENDPOINT.

Build

pnpm --filter @forgent3d/cad-build build   # esbuild bundle + copy assets + gen recipes.json
pnpm --filter @forgent3d/cad-build smoke   # offline smoke: rebuild / run-python / recipe in an os-temp dir

scripts/build.mjs bundles src/cli.tsdist/cli.mjs (keeping web-tree-sitter external), copies the runtime assets into dist/assets/ (tree-sitter*.wasm, occt-import-js.cjs + .wasm, cadkit-snapshot.json), and generates recipes.json. bin/cad-build.mjs points the engine at those assets via CAD_ENGINE_ASSETS_DIR / OCCT_WASM_JS / CAD_BUILD_ASSETS_DIR before loading the bundle.

Keep in sync

  • src/format.ts's formatRebuild / formatProbe mirror cf-sandbox's formatRebuildModel / formatProbeResult (packages/cf-sandbox/src/lib/agent-tools.ts).
  • recipes.json regenerates from packages/cloud/lib/aicad-agent/recipes/*.recipe.ts.

Relationship to the forgent3d skill

The skill (github.com/forgent3d/forgent3d-skills, mounted here as the forgent3d-skills submodule) is maintained independently — its SKILL.md is hand-written and evolves on its own, no longer generated from the in-product agent-boot.ts prompt. The only contract between the two lines is this CLI: the skill shells out to cad-build <cmd>, so the subcommand names, flags and output shape above are what must stay stable. Changing them is a breaking change for the skill.