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

@polycam/clang-tools

v22.1.8

Published

Pinned, cross-platform clang-format and clang-tidy binaries. The npm version is the LLVM version.

Readme

@polycam/clang-tools

Pinned, cross-platform clang tooling, distributed as an npm package. The npm version is the LLVM version — install @polycam/[email protected] and you get these tools from LLVM 22.1.8 on every platform, with no compiler, no Python, and no custom Homebrew tap:

  • clang-format
  • clang-tidy
  • clang-apply-replacements — apply clang-tidy's serialized fixes across a compile DB
  • clang-query — interactively match the AST (for authoring query-based custom checks)
yarn add -D @polycam/[email protected]
# then:
npx clang-format --version   # clang-format version 22.1.8
npx clang-tidy   --version   # LLVM version 22.1.8

The binaries are LLVM's own official release binaries, repackaged per platform. The C++-parsing tools (clang-tidy, clang-query) ship clang's builtin-header resource dir (lib/clang/<major>/include) alongside the binary, so they work with no -resource-dir fiddling.

Supported platforms

| platform package | os | cpu | | ------------------------------------ | ------ | ----- | | @polycam/clang-tools-darwin-arm64 | darwin | arm64 | | @polycam/clang-tools-linux-x64 | linux | x64 | | @polycam/clang-tools-win32-x64 | win32 | x64 |

npm installs only the one matching the host (via os/cpu fields), so you never download binaries for platforms you don't use.

Programmatic API

For build scripts and pre-commit hooks that want the binary path directly (e.g. to avoid a Node-shim spawn per file in a parallel batch):

const { clangFormatPath, clangTidyPath, resolveBinary, run } = require("@polycam/clang-tools");

clangFormatPath(); // → /abs/.../node_modules/@polycam/clang-tools-darwin-arm64/bin/clang-format
resolveBinary("clang-query"); // any of the four tools
run("clang-format", ["--version"]); // spawnSync, inherits stdio

Convenience path accessors: clangFormatPath(), clangTidyPath(), clangApplyReplacementsPath(), clangQueryPath().

From a shell script:

clang_format="$(node -e "console.log(require('@polycam/clang-tools').clangFormatPath())")"

Environment overrides

  • CLANG_FORMAT_PATH / CLANG_TIDY_PATH / CLANG_APPLY_REPLACEMENTS_PATH / CLANG_QUERY_PATH — absolute path to a binary to use instead of the bundled one (development / system binary).

Also available as raw binaries

Every release attaches the standalone binaries (plus .sha512 checksums) to its GitHub release, for consumers that would rather curl a binary than pull an npm package.