Skip to content

Commit 871c84c

Browse files
authored
docs: add a Packages page and group the tabs (#108)
## Summary The org now publishes LLVM tools and ccache as Python wheels on PyPI, next to the npm packages, the Homebrew tap, the asdf plugin and the Docker images, all built from the same static binaries. The site didn't say so anywhere. This PR adds that, and regroups the tabs so the new page doesn't crowd the navigation bar. - New page `/packages/`, "C and C++ tools, packaged". It covers: - the wheels (clang-include-cleaner, clang-apply-replacements, llvm-cov, ccache-bin) - what every wheel guarantees - how to pin the tools in `pyproject.toml` - the other package managers - the build pipeline behind every package (LLVM release → static binaries → each channel) - how to verify a download with `gh attestation verify` - Home page: a new "The tools themselves, for any package manager" section after "Pin the same LLVM version". It has three numbers, a terminal showing LLVM 22 installed from four package managers, and four PyPI cards. The footer gets a "Python wheels" link. The clang-tools card no longer says Docker images go "up to 22". - Tabs go from 11 to 6: Home · Docs (Get started, Packages, Other CI, AI coding agents) · Playground · Why cpp-linter (with Showcase) · Blog · Community (Discussions, Sponsor). Grouped pages show the sidebar again, so a page's siblings are one click away. The home header matches. - Get started and the `index.md` copy for llms.txt link to the new page. The clang-format and clang-tidy wheels on PyPI belong to another project, and the page says so. clangd-bin is not on PyPI yet, so it is left out for now.
1 parent c2c5dc6 commit 871c84c

13 files changed

Lines changed: 489 additions & 28 deletions

File tree

‎docs/ai-coding-agents.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Use cpp-linter with AI coding agents
33
description: Make clang-format and clang-tidy the check an AI coding agent runs after it edits C or C++ code, with configs for Claude Code, GitHub Copilot coding agent, AGENTS.md, pre-commit and pull requests.
4-
hide:
5-
- navigation
64
---
75

86
# Use cpp-linter with AI coding agents

‎docs/discussion.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Community
33
description: Where to ask about cpp-linter, report bugs and security problems, and contribute.
4-
hide:
5-
- navigation
64
---
75

86
# Community

‎docs/getting-started.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Get started
33
description: Set up cpp-linter-action, the cpp-linter pre-commit hooks, the cpp-linter command or the clang tools, with the LLVM version you pin.
4-
hide:
5-
- navigation
64
---
75

86
# Get started
@@ -132,6 +130,8 @@ Ubuntu's packages and are no longer rebuilt. The same images are on Docker Hub a
132130
`xianpengshen/clang-tools`.
133131

134132
Single tools are also on PyPI as Python wheels: `clang-format` and `clang-tidy` (the wheels
135-
cpp-linter-hooks installs), [clang-apply-replacements](https://pypi.org/project/clang-apply-replacements/)
136-
(LLVM 16 to 23) and [clang-include-cleaner](https://pypi.org/project/clang-include-cleaner/)
137-
(LLVM 22 and 23).
133+
cpp-linter-hooks installs), and from cpp-linter
134+
[clang-include-cleaner](https://pypi.org/project/clang-include-cleaner/),
135+
[clang-apply-replacements](https://pypi.org/project/clang-apply-replacements/),
136+
[llvm-cov](https://pypi.org/project/llvm-cov/) and [ccache-bin](https://pypi.org/project/ccache-bin/).
137+
[C and C++ tools, packaged](packages.md) lists every package, with the LLVM versions each one has.

‎docs/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Set the same LLVM version in each tool, and laptops and CI run the same major re
2727
| Locally or in other CI | cpp-linter, the Python command behind the action | <https://cpp-linter.github.io/cpp-linter/> |
2828
| Just the clang tools, by LLVM version | clang-tools (pip), npm, asdf, Docker, Homebrew | <https://cpp-linter.github.io/clang-tools-pip/> |
2929
| Static clang-format and clang-tidy binaries | clang-tools-static-binaries | <https://cpp-linter.github.io/clang-tools-static-binaries/> |
30+
| LLVM tools and ccache as Python wheels, plus npm, Homebrew, asdf and Docker | clang-include-cleaner, clang-apply-replacements, llvm-cov, ccache-bin and more | <https://cpp-linter.github.io/packages/> |
3031
| Version 2, a rewrite in Rust (release candidates) | cpp-linter-rs | <https://cpp-linter.github.io/cpp-linter-rs/> |
3132

3233
The action and clang-tools cover LLVM 12 to 23. The clang-tidy pre-commit hook covers LLVM 13 to 23.

‎docs/other-ci.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Other CI systems
33
description: Run clang-format and clang-tidy on the files a branch changes in GitLab CI, Jenkins, Azure Pipelines and Bitbucket Pipelines, with the cpp-linter command.
4-
hide:
5-
- navigation
64
---
75

86
# Other CI systems

‎docs/overrides/home.html‎

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212

1313
{% block header %}
1414
{% set links = [
15-
("Get started", "getting-started/" | url),
16-
("Tools", "#tools"),
15+
("Docs", "getting-started/" | url),
1716
("Playground", "playground/" | url),
1817
("Why cpp-linter", "why-cpp-linter/" | url),
19-
("Showcase", "showcase/" | url),
2018
("Blog", "blog/" | url),
2119
("Community", "discussion/" | url),
2220
] %}
@@ -169,7 +167,7 @@ <h1 class="cl-hero__title">
169167
},
170168
{
171169
"title": "Just the clang tools", "name": "clang-tools", "icon": "octicons/package-24",
172-
"text": "clang-format, clang-tidy and friends for LLVM 12 to 23 via pip, npm or asdf, plus Docker images (up to 22) and a macOS Homebrew tap (19 to 23).",
170+
"text": "clang-format, clang-tidy and the LLVM tools around them, for LLVM 12 to 23, from PyPI, npm, Homebrew, asdf or Docker.",
173171
"code": "pip install clang-tools\nclang-tools install clang-format clang-tidy --version 21",
174172
"href": "https://cpp-linter.github.io/clang-tools-pip/", "cta": "Read the docs",
175173
},
@@ -237,6 +235,54 @@ <h3>{{ title }}</h3>
237235
</div>
238236
</section>
239237

238+
{% set packages = [
239+
("clang-include-cleaner", "Finds unused and missing #include directives.", "LLVM 22–23", "clang-include-cleaner"),
240+
("clang-apply-replacements", "Applies the fixes clang-tidy exports to your sources.", "LLVM 16–23", "clang-apply-replacements"),
241+
("llvm-cov", "llvm-cov and llvm-profdata, for source-based code coverage.", "LLVM 12–23", "llvm-cov"),
242+
("ccache-bin", "ccache, the compiler cache, from ccache's own release binaries.", "ccache 4", "ccache-bin"),
243+
] %}
244+
<section class="cl-band cl-band--white" id="packages">
245+
<div class="cl-wrap">
246+
<div class="cl-pkg">
247+
<div>
248+
<p class="cl-eyebrow">Also from cpp-linter</p>
249+
<h2 class="cl-h2">The tools themselves, for any package manager</h2>
250+
<p class="cl-sub">We build clang-format, clang-tidy and the LLVM tools around them as static binaries, then publish the same files to PyPI, npm, Homebrew, asdf and Docker. Install the version you pin, with no LLVM to install and nothing to compile.</p>
251+
<dl class="cl-facts">
252+
<div><dt>12–23</dt><dd>LLVM versions</dd></div>
253+
<div><dt>6</dt><dd>platforms</dd></div>
254+
<div><dt>540k+</dt><dd>binary downloads</dd></div>
255+
</dl>
256+
<a class="cl-link" href="{{ 'packages/' | url }}">See every package {{ arrow }}</a>
257+
</div>
258+
<div class="cl-window">
259+
<div class="cl-window__bar">
260+
<span class="cl-window__file">LLVM 22 from four package managers</span>
261+
</div>
262+
<pre class="cl-code cl-code--shell"><span class="c"># PyPI: pip, uv, pipx</span>
263+
<span class="p">$</span> pip install <span class="s">"llvm-cov==22.*"</span>
264+
<span class="p">$</span> uv tool install <span class="s">"clang-include-cleaner==22.*"</span>
265+
<span class="c"># npm</span>
266+
<span class="p">$</span> npm install -D <span class="s">@cpp-linter/clang-tidy@22</span>
267+
<span class="c"># Homebrew</span>
268+
<span class="p">$</span> brew install <span class="s">cpp-linter/tap/clang-format@22</span>
269+
<span class="c"># Docker</span>
270+
<span class="p">$</span> docker pull <span class="s">ghcr.io/cpp-linter/clang-tools:22</span></pre>
271+
</div>
272+
</div>
273+
<div class="cl-wheels">
274+
{% for name, text, range, pypi in packages %}
275+
<a class="cl-wheel" href="https://pypi.org/project/{{ pypi }}/">
276+
<span class="cl-wheel__top"><span class="cl-wheel__badge">PyPI</span><span class="cl-wheel__range">{{ range }}</span></span>
277+
<code class="cl-wheel__name">{{ name }}</code>
278+
<span class="cl-wheel__text">{{ text }}</span>
279+
<span class="cl-wheel__more">View on PyPI {{ arrow }}</span>
280+
</a>
281+
{% endfor %}
282+
</div>
283+
</div>
284+
</section>
285+
240286
<section class="cl-band">
241287
<div class="cl-wrap">
242288
<div class="cl-head">
@@ -457,6 +503,7 @@ <h2>Maintained by two volunteers</h2>
457503
<a href="https://github.com/cpp-linter/cpp-linter-hooks">pre-commit hooks</a>
458504
<a href="https://cpp-linter.github.io/cpp-linter/">Python CLI</a>
459505
<a href="https://cpp-linter.github.io/clang-tools-pip/">clang-tools</a>
506+
<a href="{{ 'packages/#python-wheels' | url }}">Python wheels</a>
460507
<a href="https://cpp-linter.github.io/clang-tools-static-binaries/">Static binaries</a>
461508
<a href="https://github.com/cpp-linter/clang-tools-npm">npm packages</a>
462509
<a href="https://github.com/cpp-linter/clang-tools-docker">Docker images</a>

‎docs/packages.md‎

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
---
2+
title: C and C++ tools, packaged
3+
description: clang-include-cleaner, clang-apply-replacements, llvm-cov and ccache as Python wheels on PyPI, and clang-format and clang-tidy on npm, Homebrew, asdf and Docker, for LLVM 12 to 23 on six platforms.
4+
---
5+
6+
# C and C++ tools, packaged
7+
8+
cpp-linter builds clang-format, clang-tidy and the LLVM tools around them as static binaries for
9+
every LLVM version from 12 to 23, on Linux, macOS and Windows, x86-64 and ARM64. The same files
10+
then go to PyPI, npm, Homebrew, asdf and Docker, so you install the tool at the version you pin,
11+
with the package manager your project already uses. There is no LLVM to install and nothing to
12+
compile.
13+
14+
<div class="cl-stats" markdown>
15+
16+
<div><strong>12–23</strong><span>LLVM versions</span></div>
17+
<div><strong>6</strong><span>platforms, x86-64 and ARM64</span></div>
18+
<div><strong>540k+</strong><span>binary downloads</span></div>
19+
<div><strong>Attested</strong><span>build provenance on every file</span></div>
20+
21+
</div>
22+
23+
## Python wheels
24+
25+
`pip install`, `uv tool install` or `pipx install` puts the command on your `PATH`. The package
26+
version is the tool's version, so `pip install "llvm-cov==22.*"` installs llvm-cov from LLVM 22.
27+
28+
<div class="grid cards cl-wheel-cards" markdown>
29+
30+
- **clang-include-cleaner** <span class="cl-range">LLVM 22–23</span>
31+
32+
---
33+
34+
Finds unused and missing `#include` directives in C and C++ files.
35+
36+
```bash
37+
pip install clang-include-cleaner
38+
```
39+
40+
[PyPI](https://pypi.org/project/clang-include-cleaner/) ·
41+
[GitHub](https://github.com/cpp-linter/clang-include-cleaner-wheel)
42+
43+
- **clang-apply-replacements** <span class="cl-range">LLVM 16–23</span>
44+
45+
---
46+
47+
Applies the fixes clang-tidy exports to your source files.
48+
49+
```bash
50+
pip install clang-apply-replacements
51+
```
52+
53+
[PyPI](https://pypi.org/project/clang-apply-replacements/) ·
54+
[GitHub](https://github.com/cpp-linter/clang-apply-replacements-wheel)
55+
56+
- **llvm-cov** <span class="cl-range">LLVM 12–23</span>
57+
58+
---
59+
60+
`llvm-cov` and `llvm-profdata`, for clang's source-based code coverage.
61+
62+
```bash
63+
pip install llvm-cov
64+
```
65+
66+
[PyPI](https://pypi.org/project/llvm-cov/) ·
67+
[GitHub](https://github.com/cpp-linter/llvm-cov-wheel)
68+
69+
- **ccache-bin** <span class="cl-range">ccache 4</span>
70+
71+
---
72+
73+
`ccache`, the C and C++ compiler cache, from ccache's own release binaries.
74+
75+
```bash
76+
pip install ccache-bin
77+
```
78+
79+
[PyPI](https://pypi.org/project/ccache-bin/) ·
80+
[GitHub](https://github.com/cpp-linter/ccache-wheel)
81+
82+
</div>
83+
84+
Every wheel:
85+
86+
- holds the tool's binary unchanged, plus clang's builtin headers when the tool parses code;
87+
- contains no Python code, so it works with any Python 3, and is tested with pip, uv,
88+
`uv tool install` and `pip install --user` on every platform before it is released;
89+
- has Linux wheels for glibc 2.17 and later and for musl, so it also installs on Alpine;
90+
- is published from GitHub Actions with PyPI Trusted Publishing, with an attestation that names
91+
the commit it was built from.
92+
93+
Pin the tools next to the rest of your development dependencies, and every laptop and CI job runs
94+
the same version:
95+
96+
```toml title="pyproject.toml"
97+
[dependency-groups]
98+
dev = ["clang-include-cleaner==22.*", "llvm-cov==22.*", "ccache-bin"]
99+
```
100+
101+
Or run one without installing it, for example in CI: `uvx clang-include-cleaner --help`, or
102+
`pipx run llvm-cov --version` on GitHub-hosted runners, which ship with pipx.
103+
104+
clang-format and clang-tidy already have widely used wheels on PyPI from another project,
105+
[clang-format](https://pypi.org/project/clang-format/) and
106+
[clang-tidy](https://pypi.org/project/clang-tidy/); cpp-linter-hooks installs those. For LLVM
107+
versions they do not have, or to install several tools at once, use
108+
[clang-tools](https://cpp-linter.github.io/clang-tools-pip/), which installs the static binaries
109+
by version:
110+
111+
```bash
112+
pip install clang-tools
113+
clang-tools install clang-format clang-tidy --version 21
114+
```
115+
116+
## Other package managers
117+
118+
| Package | LLVM | Runs on | Install |
119+
| --- | --- | --- | --- |
120+
| [npm packages](https://github.com/cpp-linter/clang-tools-npm) | 12 to 23 | Linux, macOS, Windows on x86-64 and ARM64 | `npm install --save-dev @cpp-linter/clang-format@21 @cpp-linter/clang-tidy@21` |
121+
| [Homebrew tap](https://github.com/cpp-linter/homebrew-tap) | 19 to 23 | macOS | `brew install cpp-linter/tap/clang-format@21` |
122+
| [asdf plugin](https://github.com/cpp-linter/asdf-clang-tools) | 12 to 23 | wherever asdf runs | `asdf plugin add clang-format https://github.com/cpp-linter/asdf-clang-tools.git` |
123+
| [Docker images](https://github.com/cpp-linter/clang-tools-docker) | 7 to 23 | Docker on x86-64 and ARM64 | `docker pull ghcr.io/cpp-linter/clang-tools:21` |
124+
| [Static binaries](https://cpp-linter.github.io/clang-tools-static-binaries/) | 12 to 23 | Linux, macOS, Windows on x86-64 and ARM64 | one file from the download page |
125+
126+
## One build behind every package
127+
128+
<div class="cl-flow" markdown>
129+
130+
<div class="cl-flow__step"><span class="cl-flow__label">Upstream</span><strong>LLVM release</strong><span>12 to 23, each at its newest patch release</span></div>
131+
<div class="cl-flow__step cl-flow__step--main"><span class="cl-flow__label">Built once</span><strong>Static binaries</strong><span>6 platforms, checksums and build attestations</span></div>
132+
<div class="cl-flow__step"><span class="cl-flow__label">Published to</span><strong>PyPI · npm · Homebrew · asdf · Docker</strong><span>the same files, unchanged</span></div>
133+
134+
</div>
135+
136+
A new LLVM release starts a build of the
137+
[static binaries](https://cpp-linter.github.io/clang-tools-static-binaries/) on all six
138+
platforms. When it is published, a bot opens the update pull request for each wheel, and the new
139+
wheels are released once they pass their tests on every platform. So an LLVM version runs the same
140+
`clang-tidy` whether it comes from clang-tools, npm, Homebrew, asdf or Docker. The build and
141+
release workflows the wheels share are in [cpp-linter/wheels](https://github.com/cpp-linter/wheels).
142+
143+
## Check what you install
144+
145+
Each static binary and each wheel has a build provenance attestation. To check one with the
146+
GitHub CLI:
147+
148+
```bash
149+
gh attestation verify clang-format-22_linux-amd64 --repo cpp-linter/clang-tools-static-binaries
150+
pip download --no-deps "llvm-cov==22.*"
151+
gh attestation verify llvm_cov-*.whl --repo cpp-linter/llvm-cov-wheel
152+
```
153+
154+
The static binaries also come with `SHA512SUMS`. Their
155+
[download page](https://cpp-linter.github.io/clang-tools-static-binaries/) shows how to check a
156+
download, and the [security policy](https://github.com/cpp-linter/clang-tools-static-binaries/blob/master/SECURITY.md#checking-where-a-binary-was-built)
157+
explains what an attestation proves.

‎docs/showcase.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Who uses cpp-linter
33
description: Open-source projects that run cpp-linter-action, ranked by GitHub stars, and some that use cpp-linter-hooks.
4-
hide:
5-
- navigation
64
---
75

86
# Who uses cpp-linter

‎docs/sponsor.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
description: Sponsor cpp-linter through GitHub Sponsors or Open Collective. Sponsor tiers include your logo on the website and READMEs and thanks in release notes.
3-
hide:
4-
- navigation
53
---
64

75
# Sponsor cpp-linter

0 commit comments

Comments
 (0)