Never used C++ before? No problem! This guide walks you through everything step-by-step.
You need a C++ compiler to build the project. Choose ONE option:
If you already use VS Code, you don't need the full Visual Studio IDE. Just get the compiler:
Quick Install:
winget install Microsoft.VisualStudio.2022.BuildToolsWhen the installer opens, select "Desktop development with C++" and click Install.
Manual Download:
- Go to: https://visualstudio.microsoft.com/downloads/
- Scroll to "Tools for Visual Studio" → Download "Build Tools for Visual Studio 2022"
- Run it and select "Desktop development with C++"
Size: ~2-3GB (much smaller than full Visual Studio)
Only choose this if you want the full development environment:
- Download "Visual Studio 2022 Community" (free)
- Select "Desktop development with C++"
- Install (takes 15-30 minutes, ~10GB)
Why? The C++ compiler (MSVC) turns our code into a runnable program.
CMake is a tool that helps organize and build C++ projects.
Quick Install (Recommended):
winget install Kitware.CMake
winget install Ninja-build.NinjaManual Install:
- CMake: https://cmake.org/download/ - Get the Windows x64 Installer (.msi)
⚠️ Check the box "Add CMake to system PATH"
- Ninja: https://github.com/ninja-build/ninja/releases
- Download
ninja-win.zip - Extract
ninja.exetoC:\Windows\System32\(or add to PATH)
- Download
Why?
- CMake reads our
CMakeLists.txtfile and sets up the build - Ninja makes builds faster than Visual Studio's default builder
Already installed? Try: git --version in PowerShell
If not installed:
winget install Git.Git- Press
Windows + X - Select "Windows PowerShell" or "Terminal"
cd C:\Users\User1\Documents\agent-coder\zweek-codeThis step tells CMake to generate build files:
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=ReleaseWhat this does:
-S .= Source is in current directory-B build= Put build files in a folder called "build"-G Ninja= Use Ninja for fast builds-DCMAKE_BUILD_TYPE=Release= Optimized build (faster program)
First time? CMake will download FTXUI and JSON libraries automatically. This takes 2-3 minutes.
You should see output like:
-- The CXX compiler identification is MSVC 19.xx.xxxxx.x
-- Detecting CXX compiler ABI info
-- Configuring done
-- Generating done
-- Build files written to: C:/Users/User1/Documents/agent-coder/zweek-code/build
Alternative: If Ninja doesn't work, use Visual Studio generator:
cmake -S . -B build -G "Visual Studio 17 2022" What this does:
- Compiles all the C++ code
- Links it together into an executable
- Puts the result in
build\zweek.exe(Ninja) orbuild\Release\zweek.exe(Visual Studio)
This takes 1-2 minutes. You'll see lots of output as files compile:
[1/8] Building CXX object CMakeFiles/zweek.dir/src/main.cpp.obj
[2/8] Building CXX object CMakeFiles/zweek.dir/src/ui/tui.cpp.obj
...
[8/8] Linking CXX executable zweek.exe
If using Ninja:
.\build\zweek.exeIf using Visual Studio generator:
.\build\Release\zweek.exe🎉 You should see the Zweek Code TUI launch!
After initial setup, you only need these commands:
# Navigate to project
cd C:\Users\User1\Documents\agent-coder\zweek-code
# If you made code changes, rebuild:
cmake --build build
# Run the program:
.\build\zweek.exeProblem: CMake isn't installed or not in PATH
Solution:
- Restart PowerShell (CMake might just have been installed)
- If still broken, reinstall CMake and check "Add to PATH"
- Or run:
winget install Kitware.CMakethen restart PowerShell
Problem: Visual Studio C++ tools aren't installed
Solution:
- Open Visual Studio Installer
- Click "Modify" on Visual Studio 2022
- Make sure "Desktop development with C++" is checked
- Click Modify to install
Problem: Code might have issues or conflicting dependencies
Solution:
- Delete the
buildfolder:Remove-Item -Recurse -Force build - Try configuring again:
cmake -S . -B build -G "Visual Studio 17 2022" - Build:
cmake --build build --config Release
Problem: Missing DLL files or runtime issues
Solution:
- Make sure you built with
--config Release - Try running from the correct directory
- Check you have Visual C++ Redistributables installed (usually comes with Visual Studio)
What is all this code?
src/main.cpp- Entry point, starts the programsrc/ui/tui.cpp- All the visual interface codeinclude/ui/tui.hpp- Defines what the TUI can doCMakeLists.txt- Build instructions for CMake
Can I edit the code?
Yes! Try this:
- Open
src/ui/branding.hppin any text editor - Change the
VERSIONstring to something like"v1.0.0-myedition" - Rebuild:
cmake --build build --config Release - Run:
.\build\Release\zweek.exe - You'll see your custom version number!
The current build is a demo that shows what Zweek Code will do:
-
Type a request (e.g., "Add error handling to login")
-
Press Submit (or Enter)
-
Watch the progress bar move through 5 stages:
- 🔍 Planning - Figuring out what to do
- 🔧 Tool Execution - Reading files, gathering info
- 💻 Code Drafting - Generating code
- 🎨 Style Enforcing - Making it look nice
- 📊 Complexity Auditing - Checking quality
- 🔐 Gatekeeper Review - Final approval
-
See sample code appear
-
Try the buttons (they print to console for now)
Note: This is a simulation! The real AI models will be added in Phase 2.
Once you're comfortable with building and running:
- Explore the code - Open files in Visual Studio or VS Code
- Try making small changes - Edit version strings, colors, emojis
- Read the full docs - Check out
docs/BUILD.mdfor advanced options - Wait for Phase 2 - Real AI model integration coming soon!
If you prefer clicking buttons instead of command line:
- Open Visual Studio 2022
- Click "Open a local folder"
- Select
C:\Users\User1\Documents\agent-coder\zweek-code - Visual Studio will detect CMake and configure automatically
- Press
Ctrl + Shift + Bto build - Press
F5to run
The executable will still be in build\Release\zweek.exe.
- Build errors? Check the error message and troubleshooting section above
- Want to understand C++? This project uses modern C++17, check out LearnCpp.com
- FTXUI questions? See https://github.com/ArthurSonzogni/FTXUI
You don't need to be a C++ expert to use Zweek Code! The build system handles most of the complexity.