Quick Start
In about 15 minutes you build and run a real CppModel simulation: the Excavator Boom Control project, a joystick-to-valve control function in C, checked by four verification rules. There are two ways to get there:
- With an AI coding agent (recommended). Your agent connects to CppModel through the CppModel MCP server. With the CppModel plugin, it checks your machine, installs what is missing, builds and runs the simulation, and reads the results for you.
- By hand, on Linux, Windows or macOS. You install a compiler, download the library, and build and run with CMake.
Both end in the same place: the run's results in your workspace.
1. Create a CppModel account
Select a plan on cppmodel.com, or try the free one with Get Started Free on www.cppmodel.com.
- Free: enough for this guide. Free accounts share one workspace, where results, and the e-mail address of whoever submitted them, are visible to everyone else on the free tier, so don't run confidential code in it.
- Paid plans: each comes with a private workspace for your team (see Pricing Models).
2a. With an AI coding agent
This guide uses Claude Code. OpenAI Codex, GitHub Copilot CLI, Cursor and Gemini CLI work the same way with the portable plugin (see Plugins).
Install Claude Code
Install Claude Code for your platform, following its setup guide.
Get the example project
Clone the project and start Claude Code in its folder:
git clone https://github.com/Control-Edge/excavator-boom-control.git
cd excavator-boom-control
claude
Install the CppModel plugin
In Claude Code, add the CppModel marketplace and install the plugin:
/plugin marketplace add https://github.com/Control-Edge/cppmodel-claude.git
/plugin install cppmodel@cppmodel-tools
The plugin registers the CppModel MCP server, which connects Claude to your workspace, and adds the CppModel skills. See Plugins for everything it does.
Connect to CppModel
Sign in to the MCP server once, so Claude can run simulations and read results as you:
- Run
/mcpin Claude Code. - Select the
cppmodelserver and choose Authenticate. - Sign in with your CppModel account in the browser window that opens.
Claude Code keeps the login, so you do this once per machine. To check it, ask:
Which CppModel workspace are you connected to?
The same server also works from claude.ai and Claude Desktop, for reading and comparing results from anywhere, without a shell (see AI Assistants).
Set up your machine
Ask Claude:
Set up this machine to build this CppModel project.
The cppmodel:setup-environment skill takes over:
- It detects your OS, architecture, compilers and build tools, without changing anything.
- It compares them with the library builds CppModel publishes, and asks which compiler to use.
- It shows the commands to install what is missing, such as a compiler or CMake, and runs them only after you confirm. Commands that need administrator rights it leaves for you to run.
- It downloads the CppModel library for your platform into the project's
dependenciesfolder, and verifies that the project builds.
Build and run
Ask Claude:
Build and run the simulation.
Claude builds the project and runs the simulation signed in as your account, then reports what happened, with a link to the results:
CppModel.Verify: 4 of 4 rules passed
Continue with See the results.
2b. By hand
Install a compiler, CMake and Git
You need a C compiler, CMake 3.21 or later, and Git.
- Linux
- Windows
- macOS
On Debian or Ubuntu:
sudo apt-get install -y build-essential cmake git curl
On Fedora or RHEL:
sudo dnf install -y gcc make cmake git curl
GCC or Clang with glibc 2.28 or later is supported, on x86_64 and aarch64.
Install:
- Visual Studio Community, or the Build Tools for Visual Studio, with the Desktop development with C++ workload. It includes the MSVC compiler and CMake.
- Git for Windows.
Then open Developer PowerShell for VS from the Start menu, so the compiler and CMake are on the path. Use it for the commands below.
MinGW from MSYS2 works too. In the UCRT64 shell, install the tools with pacman -S --needed mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja git unzip, then use the Linux commands below with the Windows archive (CppModel-latest-Windows-x64.zip, extracted with unzip). The built program is build/BoomControlSimulation.exe.
Install Apple's command line tools, which include Apple Clang and Git, and CMake from Homebrew:
xcode-select --install
brew install cmake
macOS 11 or later is supported, on Apple silicon and Intel.
Get the project and the library
Clone the project, then download the CppModel library for your platform and extract it into the project's dependencies folder. The archive holds a single top-level folder, whose contents go into dependencies.
- Linux
- Windows
- macOS
git clone https://github.com/Control-Edge/excavator-boom-control.git
cd excavator-boom-control
mkdir -p dependencies
curl -fsSL https://download.cppmodel.com/CppModel-latest-Linux-x86_64.tar.gz \
| tar -xz -C dependencies --strip-components=1
On an ARM machine, download CppModel-latest-Linux-aarch64.tar.gz instead.
git clone https://github.com/Control-Edge/excavator-boom-control.git
cd excavator-boom-control
Invoke-WebRequest https://download.cppmodel.com/CppModel-latest-Windows-x64.zip -OutFile cppmodel.zip
Expand-Archive cppmodel.zip -DestinationPath cppmodel
Move-Item cppmodel\CppModel-*-Windows-x64 dependencies
Remove-Item cppmodel, cppmodel.zip
On an ARM64 machine, download CppModel-latest-Windows-ARM64.zip and move CppModel-*-Windows-ARM64 instead.
git clone https://github.com/Control-Edge/excavator-boom-control.git
cd excavator-boom-control
mkdir -p dependencies
curl -fsSL https://download.cppmodel.com/CppModel-latest-macOS-universal.tar.gz \
| tar -xz -C dependencies --strip-components=1
The macOS library is universal: the same archive works on Apple silicon and Intel.
You can also download the library from the Download menu in the workspace. See Installation for what the archive contains.
Build and run
- Linux
- Windows
- macOS
cmake -S . -B build
cmake --build build
./build/BoomControlSimulation
cmake -S . -B build
cmake --build build --config Release
.\build\Release\BoomControlSimulation.exe
Visual Studio builds into a folder per configuration, here build\Release. The CppModel library, cppmodel.dll, is copied next to the program by the build.
cmake -S . -B build
cmake --build build
./build/BoomControlSimulation
On the first run, the program prints a link to the CppModel login page and waits 60 seconds for you to sign in. Open it, and sign in with your account:

The login is kept in a .cppmodeltoken file in the folder the program runs from, so later runs start right away. Keep it out of version control; the project's .gitignore already does.
3. See the results
When the run ends, the program prints each rule's outcome and a link to the results:
CppModel.Verify.one coil at a time: PASS held at 1701 checked step(s)
CppModel.Verify.no motion on a bad signal: PASS held at 1701 checked step(s)
CppModel.Verify.fault within 200 ms: PASS 1 trigger(s) answered, slowest in 0.09 s (deadline 0.2 s)
CppModel.Verify.restart only from neutral: PASS held at 1701 checked step(s)
CppModel.Verify: 4 of 4 rules passed
UI: https://<your workspace>.cppmodel.com/simulations/BoomControl
Open the link, or go to My Simulations in the workspace and select BoomControl. The graph shows the joystick the simulation moved and the current the controller sent to each valve coil, and each rule can be drawn on it:
The program's exit code is 0 because every rule passed, so the simulation also works as a test in CTest or any CI system.
With Claude Code, you can ask about the results instead:
Show me the coil currents of the last BoomControl run.
What did the "fault within 200 ms" rule measure?
4. Watch a rule fail
The project's first version, tag 0.0.1, has a fault-handling bug: when the joystick wire breaks, the boom drives down at full speed for 90 ms. Run it to see what a failure looks like.
With Claude Code, ask:
Check out tag 0.0.1, run the simulation again and tell me why it fails.
By hand, check out the tag, then build and run as before:
git checkout 0.0.1
Two rules fail now, and so does the program's exit code:
CppModel.Verify.no motion on a bad signal: FAIL violated 1 time(s), 0.09 s in total, first t=12 s–12.09 s
CppModel.Verify.restart only from neutral: FAIL violated 2 time(s), 1.09 s in total, first t=12 s–12.09 s
CppModel.Verify: 2 of 4 rules passed
The workspace shows both runs, and in each rule's lane exactly where it failed. The Excavator Boom Control tutorial explains the bug and the fix. Return to the fixed version with git checkout main.
Next steps
- Tutorials: the boom control step by step, then a closed-loop temperature controller and a garage door state machine.
- Create Simulation: write a simulation for your own code.
- AI Assistants (MCP Server): connect any AI assistant to your workspace, and what it can do in a chat app or a coding agent.
- Plugins: bring existing controller code under simulation, build plant models, run parameter sweeps and set up CI with your coding agent.
- Overview: how the library and the workspace work together.
Prefer to try CppModel in the browser first? The Simtroller playground runs models interactively and exports them as ready-to-build projects.