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, 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.

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 when the install directory or its done.txt marker already exists there; it is not a remote availability check.

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.4.tar.gz (112.9 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.4-cp310-abi3-win_arm64.whl (578.1 kB view details)

Uploaded CPython 3.10+Windows ARM64

clang_tool_chain_bins-0.4.4-cp310-abi3-win_amd64.whl (595.7 kB view details)

Uploaded CPython 3.10+Windows x86-64

clang_tool_chain_bins-0.4.4-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.4-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.4-cp310-abi3-manylinux_2_34_x86_64.whl (949.1 kB view details)

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

clang_tool_chain_bins-0.4.4-cp310-abi3-manylinux_2_34_aarch64.whl (902.7 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.34+ ARM64

clang_tool_chain_bins-0.4.4-cp310-abi3-macosx_11_0_arm64.whl (732.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

clang_tool_chain_bins-0.4.4-cp310-abi3-macosx_10_12_x86_64.whl (815.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.4.tar.gz.

File metadata

  • Download URL: clang_tool_chain_bins-0.4.4.tar.gz
  • Upload date:
  • Size: 112.9 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.4.tar.gz
Algorithm Hash digest
SHA256 ed46b058858f8eaba22d13c4ab2566c39b98190fcd44cd50f7eb3793d9301288
MD5 ed1ed97d4419dba0708e830d8169ef7f
BLAKE2b-256 78296b9fe5537d7eb65c1fd34e7bbd1e874cdb774f000be6f8cb95cbd05f76b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4.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.4-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 fb5e57345bc1624218e26b83ae0d0393d539f38d05af00e88abb07f73375d157
MD5 6639ed992888592075369266bd44e3a7
BLAKE2b-256 6cd82c2eff793b367742dd717418c59bd8a3c61f2a3b19150cfe2082e14564e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 eb10d4cc6d3bd036ac1c38dd0f2f1cc1b1c74167ac5b63979ed6a3fb6a12ec28
MD5 ba6a4be875dcc34c9dc7161cc53ae60b
BLAKE2b-256 205384ec73e9e00cbfe6fd7da091156de03e8d6c1ac4ecdffb8390bc9a2fe540

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 06e95fdba5d58a2281898b251272a410ce19dbe841a0172e368211ed8157cddc
MD5 d21e723001dc948b03cddd19d01db027
BLAKE2b-256 ce52a3c332c09126ea82a98e39446fad9cd4e50988edaf4f5ffb20beac6cf19e

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5d18db8fcf1825802b8e80717dfe67fe75926acf7d3beb1c4c378f4c240ce933
MD5 904b51cbeae1b0b4c22bdfc936808309
BLAKE2b-256 3105e2a3d3773c08397b3f14a7a7b469c079d1fa3d67de068ffd3e4c77fc81e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 799aad8ea470c4adfc3579a359aa95327d49f117d983fb609d9ec9511d52250b
MD5 56eb910c11ec98eb5864cb803b0f220c
BLAKE2b-256 c232a3334ddf57ed9eabbe175aeddc813396d482d5e7a0e4d3535d030c0350da

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 43782abd0b47bf9cdbdd1684f450f2d1591883628f3ba984e777393754f588de
MD5 eaefdce12eef04fcdfdac4793ad5df19
BLAKE2b-256 0025310af510e3c7a5d0dcfe0be1c1efe7677c20c7a0a16f69cc67291193365a

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 098bf8b639b3a748daf7dd3286f8c5451f86d6e75b76ffa69707e5cb3a8a2538
MD5 990a635bb185bc77c3086572d10f33f5
BLAKE2b-256 76fa40c133a0b0202f457221728f1c3dcc7b512b8af9ac40406df3856846ecd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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.4-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for clang_tool_chain_bins-0.4.4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 14d576c18eac553cdea67215ab0984138c7d8d35f2791d2e53451bee2d4fec4b
MD5 dd14ad0cacac004290b306b740f52ee1
BLAKE2b-256 4fecb8b29005fc2641c7c2f5567e03a9b71a7fc466656053d85f85bb57a67b57

See more details on using hashes here.

Provenance

The following attestation bundles were made for clang_tool_chain_bins-0.4.4-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