Skip to main content

👏 CLAP

CLAP icon

Compile and run C/C++ without installing a compiler.

English | Русский

CI PyPI License: MIT Site

CLAP quickstart — install, init, build, run

One pip install, and clap run main.c just works — on a fresh Windows box, a bare Linux server, or a new Mac. CLAP downloads a pinned, checksum-verified clang toolchain into your user cache the first time you build, then gets out of the way. No Visual Studio installer, no MinGW mirrors, no PATH editing, no administrator anything.

And when the project grows past one file, it grows with you instead of forcing a build system on you: tests that run themselves, libraries added in one word, watch mode, cross-compilation, static binaries.

60 seconds

pip install clap-compiler
clap init hello && cd hello
clap run      # first run fetches the pinned toolchain; everything after is instant

Or the rustup-style one-liner — no Python needed on Windows, it brings its own:

irm https://bratan-corp.github.io/clap/install.ps1 | iex   # Windows PowerShell
curl -fsSL https://bratan-corp.github.io/clap/install.sh | sh   # Linux/macOS

Alternatives: self-contained portable zip, scoop install clap/clap-compiler (bucket), and a VS Code extension.

What you get

  • Zero-setup toolchain — real clang (via zig cc), pinned and SHA-256-verified, living in your user cache
  • clap run immediacy — compile and run in one command; --watch rebuilds and restarts as you type
  • Tests out of the box — doctest bootstraps itself: write TEST_CASE, run clap test, get filtered/parallel/JUnit runs
  • Libraries in one word — clap add sqlite vendors it hash-pinned, compiled with zero flags; clap add owner/repo pins any GitHub repository at its exact HEAD commit; clap update refreshes both as upstreams move
  • Cross-compile as a non-event — Windows .exe from Linux, dependency-free static musl binaries, even WebAssembly; clap dist packs per-platform release archives + checksums in one command
  • Editor integration — VS Code extension with native Test Explorer and F5 debugging; compile_commands.json for clangd/neovim/CLion
  • Honest output — human-readable by default, stable --json for scripts and agents

Why not just gcc main.c?

Fair question — if gcc is already installed, one file genuinely is that simple, and you don't need CLAP for it. But a fresh machine has no gcc (Windows never shipped one), and one file is where the questions start, not where they end: the second file, the first test, the first library, the static binary for a server. CLAP is for everything after gcc main.c stops being the whole story. Already happy with your CMake/Meson setup? Keep it — clap cmake . drives existing CMake projects with the pinned toolchain.

First build failure — the compiler error owns the screen

Documentation

Status

Tested in CI on Windows, Linux, and macOS (285+ tests), plus native validation on real machines. MIT licensed. Contributions welcome — see development in the reference.

Metadata

Release files for clap-compiler 0.86.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clap-compiler 0.86.0
File Size Uploaded Provenance Actions
clap_compiler-0.86.0.tar.gz 217.3 kB With provenance Details for clap_compiler-0.86.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clap-compiler 0.86.0
File Interpreter ABI Platform Actions
clap_compiler-0.86.0-py3-none-any.whl Python 3 none any Details for clap_compiler-0.86.0-py3-none-any.whl

Total release size: 325.7 kB

Release files / clap_compiler-0.86.0.tar.gz

Download URL clap_compiler-0.86.0.tar.gz
Size 217.3 kB
Tags Source
SHA-256 checksum
How to use checksums
13749c924d6e93b6426743f3ca0f47b5df58cf64d07cb7bbfa67e04f7fd01ac2
BLAKE2b-256 checksum
How to use checksums
741c82756c006ac55ec853fed6a2062d7d62279e4133c44187cbf2c2deef07d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / clap_compiler-0.86.0-py3-none-any.whl

Download URL clap_compiler-0.86.0-py3-none-any.whl
Size 108.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
842da265a01a156b508c2636d5c69b2c6bc19b5365043c9cf438eb0ce6783ec2
BLAKE2b-256 checksum
How to use checksums
c96fcb3ceedd32770b9918a1d4e5dc622778c6e5ae60aceb917d38247db9b543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for clap-compiler 0.86.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for clap_compiler-0.86.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.86.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page