CXXCrafter is an LLM Agent that automates C/C++ builds by generating and refining Dockerfiles.
- Supports mainstream C/C++ build systems
- Auto-detects build entry
- 70%+ success on real projects
- High parallel throughput
- [2025.04.01] CXXCrafter has been accepted to FSE (ESEC) 2025! 🎉🎉🎉
-
Clone the repository:
git clone https://github.com/Yuremin/CXXCrafter-Community-Edition.git
-
Environment setup:
CXXCrafter requires Python 3.9 or higher. You can optionally use a virtual environment manager likeuv
.- First, install CXXCrafter as a Python package:
cd CXXCrafter-Community-Edition pip install .
- Configure LLM service (i.e., model, base url, and API key) in the config file or through environment variables.
- Start
Docker daemon
on your machine.
- First, install CXXCrafter as a Python package:
python -m cxxcrafter --repo /path/to/your/project
-
Prepare the project list:
Save the absolute or relative paths of the C/C++ projects you wish to build into a text file, for example:/path/to/project1 /path/to/project2 /path/to/project3 /path/to/project4 ...
-
Run CXXCrafter:
python -m cxxcrafter --repo-list /path/to/your/repo/list/file
- Successfully generated Dockerfiles will be stored in
~/.cxxcrafter/build_solution_base
. - Build logs and history can be found in
~/.cxxcrafter/dockerfile_playground
and~/.cxxcrafter/logs
, respectively.
If you use CXXCrafter in your work, please cite:
@inproceedings{Yu2025CXXCrafter,
title={CXXCrafter: An LLM-Based Agent for Automated C/C++ Open Source Software Building},
author={Zhengmin Yu, Yuan Zhang, Ming Wen, Yinan Nie, Wenhui Zhang and Min Yang},
journal={Proceedings of the ACM on Software Engineering},
volume={1},
number={FSE},
year={2025}
}
This project is released under the MIT License.