Skip to main content

clang-tool-chain-bins

CI

clang-tool-chain-bins is the package and CLI for querying and installing the archived LLVM, Clang, MSVC-adjacent, and related tool bundles managed in this repository.

It is designed for machine consumption first:

  • per-archive JSON indexes for every *.tar.zst
  • aggregate tool index for exact and glob lookup
  • JSON Lines query output for scripting and AI agents
  • install resolution with cache tracking and concurrency-safe locking

Install

pip install clang-tool-chain-bins

The CLI uses ~/.clang-tool-chain as its default cache and install root. Set CLANG_TOOL_CHAIN_DOWNLOAD_PATH or pass --home-dir to use a different location.

Python API

The published package now exposes an importable top-level API at clang_tool_chain_bins.

from clang_tool_chain_bins import ensure, install, is_installed, query, resolve_one

matches = query("clang", platform="win", arch="x86_64")
selected = resolve_one("clang", platform="win", arch="x86_64", version="21.1.5", component="clang")

if not is_installed("clang", platform="win", arch="x86_64", version="21.1.5", component="clang"):
    result = ensure("clang", platform="win", arch="x86_64", version="21.1.5", component="clang")[0]
    print(result.install_path)

Public API types:

  • ToolMatch
  • QueryResult
  • InstallResult

Public API functions:

  • query(*patterns, ...)
  • resolve(tool, ...)
  • resolve_one(tool, ...)
  • is_installed(tool, ...)
  • install(tool, ...)
  • ensure(tool, ...)
  • try_install(tool, ...)

Query CLI

clangd is distributed in the clang-extra component for Windows x86_64/ARM64, Linux x86_64/ARM64, and macOS x86_64/ARM64. This is the native language server; installing the VS Code extension alone does not provide this binary.

Windows ARM64 uses the SHA256-pinned official LLVM 21.1.5 woa64 installer. The native windows-11-arm lane rejects x86_64 PE binaries and validates all four compiled tools, isolated runtime loading, and the C++20/WASM clangd fixture. The optional Forge fallback uses the pinned LLVM source revision and enables only Forge's native windows_arm64 target.

clang-tool-chain-bins query clangd --component clang-extra --platform linux --arch x86_64
clang-tool-chain-bins install clangd --component clang-extra --platform linux --arch x86_64

The archive includes the Clang resource headers and runtime libraries needed by clangd, so the installation does not depend on a system LLVM tree.

query is the discovery command. Default JSONL output returns one matched entry per line.

  • Patterns without glob characters are exact matches.
  • Patterns containing *, ?, or [] use glob matching.
  • Matching is case-insensitive against both normalized tool_name and the archived file_name.
  • Filters narrow matches by platform, arch, version, and component.
  • Output is JSON Lines by default, one matched entry per line. Use --pretty for a human-readable table plus per-match source URL and install path details.

Exact lookup:

clang-tool-chain-bins query clang

Glob lookup:

clang-tool-chain-bins query "llvm-*"

Multiple patterns in one call:

clang-tool-chain-bins query clang clang++ --platform linux --arch x86_64

Pretty output:

clang-tool-chain-bins query clang++ --pretty

Typical JSONL shape:

{"query":"clang","tool_name":"clang","file_name":"clang","component":"clang","version":"21.1.5","platform":"linux","arch":"x86_64","archive_url":"https://...","source_urls":["https://..."],"archive_sha256":"...","local_cache_path":"...","install_path":"...","installed":false}

Each JSON line for a match includes the aggregate index metadata plus derived local state such as:

  • query
  • tool_name and file_name
  • component, version, platform, arch
  • archive_filename, archive_path, archive_sha256, archive_url
  • source_urls
  • path_in_archive, tool_type, tool_sha256, size
  • parts, download_kind, probe_urls
  • local_cache_path
  • install_path
  • installed

installed is a local state check against the selected home directory. It becomes true only when the matching done.txt marker and the requested tool binary both exist; a stale marker without the binary is rejected.

install_path is always the resolved destination for that archive candidate, even when installed is false. source_urls resolves to the concrete download URL list for that match; for normal archives it is a one-item list, and for multipart archives it contains the part URLs.

If a query has no matches, the JSONL stream emits a marker line like {"query":"missing-tool","matched":false}.

Index selection for query works like this:

  • --index PATH uses that local aggregate index file.
  • CLANG_TOOL_CHAIN_BINS_INDEX_URL overrides the remote index URL when --index is not set.
  • Otherwise the CLI first tries to discover a repo-relative raw GitHub tool-index.json.
  • If that remote lookup fails, it falls back to the packaged local index at tools/data/tool-index.json.

Install CLI

install resolves an exact tool or filename to one or more archive candidates, then downloads and extracts the selected archive.

  • install does not support globs.
  • Matching is exact against tool_name or file_name.
  • If more than one archive matches, the command exits with an error unless you add filters or pass --all.
  • Output is always JSON, one object per installed candidate.
  • --dry-run prints the install plan without downloading or extracting anything.

Install a single archive:

clang-tool-chain-bins install clang --platform linux --arch x86_64

Preview the plan only:

clang-tool-chain-bins install clang --platform linux --arch x86_64 --dry-run

If multiple archives match, narrow the selection with:

  • --platform
  • --arch
  • --version
  • --component

Use --all to install every matching archive.

Typical install result:

{"operation":"install","status":"installed","tool_name":"clang","component":"clang","version":"21.1.5","platform":"linux","arch":"x86_64","install_path":"~/.clang-tool-chain/clang/linux/x86_64","archive_sha256":"...","archive_url":"https://...","dry_run":false}

Possible status values include:

  • installed
  • already_installed
  • dry_run

The installer is concurrency-safe for each component/platform/arch target:

  • archives are cached under HOME/archives/
  • installs land under HOME/<component>/<platform>/<arch>/
  • a per-target lock file prevents concurrent writers
  • done.txt records the installed archive hash and source URL

Download behavior:

  • file:// archive URLs are copied directly
  • HTTP(S) archive URLs are downloaded automatically

install uses the packaged local aggregate index unless --index is provided. Unlike query, it does not try to fetch a remote index automatically.

Index Generation

Generate or refresh sidecar indexes and the aggregate tool index:

clang-tool-chain-bins-index

Publishing

Build and validate release artifacts locally:

clang-tool-chain-bins-publish --skip-upload

Publish to TestPyPI:

clang-tool-chain-bins-publish --testpypi

Publish to PyPI:

clang-tool-chain-bins-publish

By default the publish script reads the token from PYPI_TOKEN.

Repository Scope

This repository still contains maintainer-oriented archive build scripts under tools/. The published package hardens the artifact boundary so wheel and sdist contents are limited to intentional code, metadata, tests, and generated tool index data rather than the raw archive payloads.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clang_tool_chain_bins-0.4.5.tar.gz (113.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

clang_tool_chain_bins-0.4.5-cp310-abi3-win_arm64.whl (579.2 kB view details)

Uploaded CPython 3.10+Windows ARM64

clang_tool_chain_bins-0.4.5-cp310-abi3-win_amd64.whl (596.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_x86_64.whl (950.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.34+ x86-64

clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_aarch64.whl (904.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.34+ ARM64

clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_11_0_arm64.whl (733.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_10_12_x86_64.whl (816.1 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file clang_tool_chain_bins-0.4.5.tar.gz.

File metadata

  • Download URL: clang_tool_chain_bins-0.4.5.tar.gz
  • Upload date:
  • Size: 113.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for clang_tool_chain_bins-0.4.5.tar.gz
Algorithm Hash digest
SHA256 2397915f6985958eac2a6ee21d836e05d70cae90a2eb63b248ce90036adf6cfb
MD5 22d2228989c1822eb900866a42e2f1d2
BLAKE2b-256 cb5acdccef41be6b8277a6c27e587b268d8047991631e900fea34e3e1c693f5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5.tar.gz:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 431302a2073ed0a82092bf6a91d424880ca520b8e76db738977c5f1c1c4f9f12
MD5 cfa2c5ac785d47aef4c0c03000483a85
BLAKE2b-256 b144f6facb80c4d056b362674435535dfb31102ca1ba1c3294a08b8e918b6cf0

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-win_arm64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 432b3af74f40f0d99d6acc4bd9bb8af998418e013cc782573a880ea7dae18437
MD5 78565933206b0fc680cbf35b8b24a978
BLAKE2b-256 8a6941d275fc6ac7b91b4cc6bcd6e0652c24c698551df5218c166823a18de1ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-win_amd64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a5fee43592915d759753b0ceab3fc150502fd73605aeb06cf59324f5f17fd5f3
MD5 ed6f9514b6cb8a90b5954198f1945cca
BLAKE2b-256 59a4fb369a8f8d42dd7c43e881350da8c621e65d07ac56a3737e881e627ed08a

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ccd859b0991db3caab66e9f84a7e25af7a17859a09c37dc73b9d007e2cf74d93
MD5 8f75e0095fe2d0716284a3f8bd9dd256
BLAKE2b-256 a9f26e6cb86aedf18d4e50558d68c3e1b5ac59367a165760c161946dc28af46c

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f637205be123ed376c58c851efd2c3b931680331dcec9ef20288670a7dff5b44
MD5 d5a5b8e62b9cb2a3ecc0e43b63423de8
BLAKE2b-256 70f854716ad39441d422bd846b07d1a118282f99db5d94c93fbeace6406dd521

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_x86_64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 45265bfccc7be3f865b49baf26cd9cd452f892643fb6a13796d131ab2f3dbbf3
MD5 a2afc0757cebac190ee28641655fcfd3
BLAKE2b-256 18a8e1973d935be4db5cd5b78524a21dd38ea6fcc529dcee2d7c312f8a8be181

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-manylinux_2_34_aarch64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 062e8f5372c2909542266692afa8a01fb78f3bb7ae864d56103e656dd3c7a0d3
MD5 1e3c35a61abe231965439d88ee9b4315
BLAKE2b-256 a9dca6e548984c8b4722aa0ecdf903f19ca0b0da6198d1cb78db4cfec358110c

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8824a5fa70cda87ebe873b0bc8e419690d33420c3f6320d49e921db1da746ffa
MD5 7c072cbd1574d8ae2754e1df404cff80
BLAKE2b-256 a89b4eedf3ea1839220487782a221b735e9a77257b8577a15a2a090c7d277cac

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.5-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: auto-release.yml on zackees/clang-tool-chain-bins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page