Metadata-Version: 2.4
Name: clap-compiler
Version: 0.71.2
Summary: Zero-setup C/C++ compiler frontend for Windows, education, and automation
Author: CLAP contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/BRATAN-CORP/clap
Project-URL: Repository, https://github.com/BRATAN-CORP/clap
Project-URL: Documentation, https://github.com/BRATAN-CORP/clap#readme
Project-URL: Issues, https://github.com/BRATAN-CORP/clap/issues
Project-URL: Changelog, https://github.com/BRATAN-CORP/clap/releases
Keywords: c,cpp,compiler,windows,zig,education,ai-agents
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tomli>=2.0; python_version < "3.11"
Requires-Dist: cmake==4.4.5
Requires-Dist: ninja==1.13.2
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.8; extra == "dev"
Requires-Dist: jsonschema>=4.23; extra == "dev"
Dynamic: license-file

# 👏 CLAP

<img src="docs/assets/clap-icon-512.png" alt="CLAP icon" width="96">

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

English | [Русский](https://github.com/BRATAN-CORP/clap/blob/main/README.ru.md)

[![CI](https://github.com/BRATAN-CORP/clap/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/BRATAN-CORP/clap/actions/workflows/test.yml)
[![PyPI](https://img.shields.io/pypi/v/clap-compiler.svg)](https://pypi.org/project/clap-compiler/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/BRATAN-CORP/clap/blob/main/LICENSE)
[![Site](https://img.shields.io/badge/site-demo%20videos%20%C2%B7%20docs-0d1117)](https://bratan-corp.github.io/clap/)

![CLAP quickstart — install, init, build, run](docs/assets/demo-quickstart.gif)

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

```bash
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:

```powershell
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](https://github.com/BRATAN-CORP/clap/releases), `scoop install clap/clap-compiler` ([bucket](https://github.com/BRATAN-CORP/scoop-clap)), and a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=bratan-corp.clap-compiler).

## 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 update` refreshes pins as the registry moves
- **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](docs/assets/demo-firstfail.gif)

## Documentation

- **[Tutorial](docs/TUTORIAL.md)** — your first ten minutes, zero to tested project
- **[Command reference](docs/COMMANDS.md)** — every command, flag, template, and profile
- **[Documentation index](docs/README.md)** — all guides in one place
- **[Honest comparison](docs/COMPARISON.md)** — why not gcc / CMake / Meson / xmake, straight answers
- **[Examples](examples/)** — runnable projects from hello-world to SQLite-as-a-dependency
- **[Project site](https://bratan-corp.github.io/clap/)** — demo videos, measured benchmarks, honest FAQ ([русская версия](https://bratan-corp.github.io/clap/ru/))
- Guides: [library recipes](docs/LIBRARY_RECIPES.md) · [IDE integration](docs/IDE_INTEGRATION.md) · [troubleshooting](docs/TROUBLESHOOTING.md) · [platform validation](docs/PLATFORM_VALIDATION.md)

## Status

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