nodejs/node-gyp ? reverse-engineered prompt

Reverse engineered prompt

Build me a cross platform command line tool for Node.js native addons.

I want something that can take a package with a binding file, generate the right build files for the current computer, and then compile the addon into a usable .node binary. It should work on Linux, macOS, and Windows, and it should also let me build against different Node.js versions or other runtimes when I point it at the right headers.

Make the experience simple, with commands like configure, build, and rebuild, plus good error messages when Python or a compiler toolchain is missing. It should handle finding the right Python version, and on Windows it should work with Visual Studio build tools. If you need to, look up the current docs online so the setup and platform details are accurate.

Please include solid tests and enough documentation so someone new to native addons can get started without much trouble.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab