Description
cpi is a tiny interpreter for C++20 and C++23 from the TreeFrog Framework project. It lets you run C++ interactively at a prompt, much like a scripting language, or execute a source file or code from standard input directly. Under the hood it uses an installed C++ compiler to do the work, so you need GCC, LLVM or MSVC along with Qt 6 to build and run it. In interactive mode you can type expressions and statements, such as bitwise operations or variable declarations, and see results right away, and a .help command lists what is available. Build instructions are given for Linux with qmake and make, and for Windows from the Visual Studio 2022 developer prompt. The project is open source on GitHub, with releases and CI.…
Highlights
- Interactive C++20/C++23 prompt
- Runs a file or code from stdin
- Uses GCC, LLVM or MSVC internally
- Builds on Linux and Windows with Qt 6
- Open source with GitHub releases
Ratings & Reviews
No ratings yet
Be the first to rate cpi.
People also visit
Cdecl
Composing and deciphering C (or C++) declarations or casts, aka ‘‘gibberish.’’

cpp-testing
Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest
CP Editor
The IDE for competitive programming | Fetch, Code, Compile, Run, Check, Submit
cpi FAQ
What is cpi?
A tiny C++ interpreter that runs C++20 or C++23 code interactively or from a file.
What do I need to build it?
Qt toolkit version 6 and a C++ compiler: GNU, LLVM or MSVC. The compiler is used internally as the interpreter.
How do I install it on Linux?
Run qmake, make and sudo make install, then check with cpi -v.
How do I use interactive mode?
Run cpi (cpi.bat on Windows) and type C++ at the cpi> prompt; type .help for more information.
Where is the source?
On GitHub at treefrogframework/cpi.
What are the best cpi alternatives?
Popular alternatives to cpi include build2, Cdecl and Vix. See all cpi alternatives





