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

@meshy3d/cli

v1.0.1

Published

Meshy3D CLI — distributed via npm with prebuilt Go binaries

Readme

@meshy3d/cli

A CLI written in Go, distributed through npm.

采用 esbuild / Biome 同款的 optionalDependencies 模式:安装时零编译、零运行期下载, npm 只把匹配你当前操作系统/CPU 的那一个预编译二进制装到本地。

安装与使用

# 全局安装
npm install -g @meshy3d/cli
meshy3d hello --name world
meshy3d version

# 或者免安装直接跑
npx @meshy3d/cli hello --name Alice --shout

输出示例:

$ meshy3d version
meshy3d 1.0.0 (darwin/arm64)

$ meshy3d hello --name Alice
Hello, Alice! — from a Go binary delivered via npm.

工作原理

npm install -g @meshy3d/cli
        │
        ▼
  下载主包 @meshy3d/cli(只有一个 JS launcher,无二进制)
        │
        ▼
  主包声明了 5 个 optionalDependencies:
    @meshy3d/cli-darwin-arm64   (os: darwin, cpu: arm64)
    @meshy3d/cli-darwin-x64     (os: darwin, cpu: x64)
    @meshy3d/cli-linux-arm64    (os: linux,  cpu: arm64)
    @meshy3d/cli-linux-x64      (os: linux,  cpu: x64)
    @meshy3d/cli-win32-x64      (os: win32,  cpu: x64)
        │
        ▼
  npm 按 os/cpu 字段匹配 → 只装当前平台那一个,其余静默跳过
        │
        ▼
  运行 `meshy3d` → bin/cli.js (launcher)
        │  require.resolve("@meshy3d/cli-<platform>/bin/meshy3d")
        ▼
  spawnSync 调起对应的 Go 二进制,参数/stdio/退出码全透传

要点:

  • 零 postinstall 脚本、零运行期网络下载 —— 二进制是 npm 包内容的一部分, 因此在 --ignore-scripts、离线缓存、企业内网等场景下都稳定。
  • 每个平台子包通过 package.jsonos / cpu 字段声明适用平台, npm 会自动跳过不匹配的可选依赖且不报错
  • launcher 用 require.resolve 定位二进制,再用 child_process.spawnSyncstdio: "inherit" 调起,退出码原样返回。

支持的平台

| OS | Arch | npm 子包 | | ------- | ----- | ---------------------------- | | macOS | arm64 | @meshy3d/cli-darwin-arm64 | | macOS | x64 | @meshy3d/cli-darwin-x64 | | Linux | arm64 | @meshy3d/cli-linux-arm64 | | Linux | x64 | @meshy3d/cli-linux-x64 | | Windows | x64 | @meshy3d/cli-win32-x64 |

如果你的网络/工具链跳过了可选依赖,运行 meshy3d 会给出明确的排查提示。 也可用环境变量 MESHY3D_BINARY=/path/to/binary meshy3d ... 指定二进制(调试用)。

License

MIT