Installation
This page shows how to install Vix.cpp and verify that it works on your machine. For Getting Started and real C++ application development, install the full SDK. Starting with Vix.cpp v2.6.0, the recommended installation is the full SDK installation.
The full SDK includes:
- the
vixCLI - the main
vix.hppheader - Vix module headers
- Vix static libraries
- CMake package files
- the
vix::vixtarget for CMake projects
This means you can install Vix once, then build real Vix applications without manually copying headers, linking modules, or rebuilding Vix yourself.
Recommended install
Linux and macOS:
curl -fsSL https://vixcpp.com/install.sh | shWindows PowerShell:
irm https://vixcpp.com/install.ps1 | iexAfter installation, restart your terminal.
Then verify the CLI:
vix --versionExpected output shape:
Vix.cpp CLI
version : v2.6.1
author : Gaspard Kirira
source : https://github.com/vixcpp/vix2
3
4
The exact version may be newer depending on the latest release.
What the full SDK installs
The full SDK installs the command-line tool and the development files needed by C++ projects.
It installs files like:
~/.local/bin/vix
~/.local/include/vix.hpp
~/.local/include/vix/...
~/.local/lib/libvix_*.a
~/.local/lib/cmake/Vix/VixConfig.cmake
~/.local/lib/cmake/Vix/VixTargets.cmake2
3
4
5
6
For CMake projects, the expected usage is:
find_package(Vix CONFIG REQUIRED)
add_executable(app main.cpp)
target_link_libraries(app PRIVATE vix::vix)2
3
4
The vix::vix target is the main SDK target. It is designed to provide the complete Vix development foundation.
Verify the CLI
Check that the vix command is available:
vix --versionIf your terminal says:
vix: command not foundyour shell cannot find the Vix binary.
Add ~/.local/bin to your PATH.
Bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc2
Zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc2
Then check again:
vix --versionVerify the SDK
Check that the main SDK header exists:
find ~/.local/include -name vix.hpp 2>/dev/nullExpected output shape:
/home/your-user/.local/include/vix.hppCheck that the Vix CMake package exists:
find ~/.local/lib/cmake -name VixConfig.cmake 2>/dev/nullExpected output shape:
/home/your-user/.local/lib/cmake/Vix/VixConfig.cmakeCheck that Vix static libraries are installed:
find ~/.local/lib -name "libvix_*.a" 2>/dev/nullFor example, if you use WebSocket features, this file should exist:
find ~/.local/lib -name "libvix_websocket.a" 2>/dev/nullExpected output shape:
/home/your-user/.local/lib/libvix_websocket.aIf these files exist, the SDK is installed.
Verify with a simple C++ file
Create a temporary folder:
mkdir -p ~/tmp/vix-install-test
cd ~/tmp/vix-install-test2
Create main.cpp:
cat > main.cpp <<'CPP'
#include <vix.hpp>
int main()
{
vix::print("Hello from Vix.cpp");
return 0;
}
CPP2
3
4
5
6
7
8
9
Run it:
vix run main.cppExpected output:
Hello from Vix.cppIf this works, your CLI and SDK are ready.
Verify with a CMake project
Create a temporary CMake project:
mkdir -p ~/tmp/vix-cmake-test
cd ~/tmp/vix-cmake-test2
Create CMakeLists.txt:
cat > CMakeLists.txt <<'CMAKE'
cmake_minimum_required(VERSION 3.20)
project(vix_cmake_test LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Vix CONFIG REQUIRED)
add_executable(app main.cpp)
target_link_libraries(app PRIVATE vix::vix)
CMAKE2
3
4
5
6
7
8
9
10
11
12
Create main.cpp:
cat > main.cpp <<'CPP'
#include <vix.hpp>
int main()
{
vix::print("Hello from Vix CMake");
return 0;
}
CPP2
3
4
5
6
7
8
9
Configure and build:
cmake -S . -B build -DCMAKE_PREFIX_PATH="$HOME/.local"
cmake --build build
./build/app2
3
Expected output:
Hello from Vix CMakeVerify with a Vix project
Create a project:
vix new api
cd api2
Build it:
vix buildRun it:
vix runIf the application starts, your installation is correct.
Updating Vix
There are two update paths.
Update the CLI
vix upgrade updates the installed Vix CLI binary:
vix upgradeThis updates the command-line tool only.
It does not reinstall the full SDK.
That means vix upgrade does not replace:
- installed headers
- static libraries
- CMake package files
- module libraries such as
libvix_websocket.a
Use vix upgrade when you only need the latest vix command.
Update the full SDK
If you build C++ applications with Vix, update the full SDK with:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk shTo install or update a specific SDK version:
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=sdk shUse the SDK update command when your project depends on:
#include <vix.hpp>or:
find_package(Vix CONFIG REQUIRED)
add_executable(app main.cpp)
target_link_libraries(app PRIVATE vix::vix)2
3
4
CLI update vs SDK update
| Command | Updates | Use when |
|---|---|---|
vix upgrade | CLI binary only | You want the latest vix command |
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk sh | CLI, headers, libraries, and CMake package files | You build Vix C++ applications |
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=sdk sh | Full SDK for a specific version | You need a known SDK version |
For application development, use the SDK installation or SDK update command.
SDK mode vs CLI-only mode
Vix has two installation modes.
| Mode | What it installs | Use when |
|---|---|---|
| SDK mode | CLI, headers, libraries, and CMake package files | You want to build Vix applications |
| CLI-only mode | Only the vix binary | You only need the command-line tool |
For Getting Started, use SDK mode.
Do not use CLI-only mode if you want to compile code that includes:
#include <vix.hpp>Do not use CLI-only mode if you want to build projects that use:
find_package(Vix CONFIG REQUIRED)CLI-only install
CLI-only mode installs only the command-line tool.
Linux and macOS:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=cli shThis is not recommended for Getting Started.
The next pages build real Vix applications, so you need the full SDK.
Install a specific version
By default, the installer uses the latest release.
To install a specific SDK version on Linux or macOS:
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=sdk shTo install only the CLI for a specific version:
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=cli shOn Windows PowerShell:
$env:VIX_VERSION="v2.6.1"
$env:VIX_INSTALL_KIND="sdk"
irm https://vixcpp.com/install.ps1 | iex2
3
For CLI-only mode on Windows PowerShell:
$env:VIX_VERSION="v2.6.1"
$env:VIX_INSTALL_KIND="cli"
irm https://vixcpp.com/install.ps1 | iex2
3
Install build prerequisites
Vix installs the SDK, but it still uses the normal C++ toolchain underneath.
You need a compiler, CMake, Ninja, and the system libraries used by the modules you want to build.
Ubuntu or Debian
Recommended base setup:
sudo apt update
sudo apt install -y \
build-essential cmake ninja-build pkg-config \
ca-certificates git curl unzip zip tar \
libssl-dev libsqlite3-dev zlib1g-dev libbrotli-dev \
nlohmann-json3-dev libspdlog-dev libfmt-dev2
3
4
5
6
If you want to use database modules with MySQL:
sudo apt install -y libmysqlcppconn-devIf you want to use the Vix game module with SDL/OpenGL:
sudo apt install -y \
libsdl2-dev libsdl2-image-dev libgl1-mesa-dev2
If you want to use the Vix AI agent with a local model, install Ollama:
curl -fsSL https://ollama.com/install.sh | shThen pull a small model for low-power machines:
ollama pull llama3.2:1bOr pull a small coding-oriented model:
ollama pull qwen2.5-coder:1.5bFor most laptops, start with:
ollama pull llama3.2:1bIt is smaller and easier to run than larger models.
macOS
With Homebrew:
brew install cmake ninja pkg-config openssl@3 spdlog fmt nlohmann-json brotliFor the game module:
brew install sdl2 sdl2_imageFor the AI agent with a local model:
brew install ollamaStart Ollama:
ollama serveThen pull a small model:
ollama pull llama3.2:1bOr a small coding-oriented model:
ollama pull qwen2.5-coder:1.5bWindows
Install one C++ toolchain:
- Visual Studio Build Tools with MSVC
- Visual Studio with the Desktop development with C++ workload
- clang-cl
Install CMake and Ninja.
For extra dependencies, use vcpkg.
If you want to use the AI agent with a local model, install Ollama for Windows from the official Ollama website, then run:
ollama pull llama3.2:1bOr:
ollama pull qwen2.5-coder:1.5bModule-specific dependencies
The full Vix SDK includes the Vix modules, but some modules rely on system libraries.
| Module area | System dependency | When you need it |
|---|---|---|
| Core build | compiler, CMake, Ninja | Always |
| Crypto / TLS | OpenSSL | When using crypto, TLS, HTTPS-related features |
| SQLite | SQLite3 | When using SQLite database support |
| MySQL | MySQL C++ Connector | When using MySQL database support |
| HTTP compression | zlib, Brotli | When using gzip or Brotli compression |
| Game | SDL2, SDL2_image, OpenGL | When using the SDL/OpenGL game backend |
| Agent | Ollama | Only when running local AI models |
Ollama is not required to install Vix.
Ollama is only needed if you want to run local AI agent features such as:
vix agent ask
vix agent analyze
vix agent scan2
3
Recommended local AI model
For low-power machines, use:
ollama pull llama3.2:1bThis is the best first model to recommend because it is small and easier to run.
For coding-focused tests, use:
ollama pull qwen2.5-coder:1.5bThen you can test the agent:
vix agent ask "Explain this project"If the model is slow on first run, that is normal. Local models often need more time on the first request.
Check your toolchain
Run:
c++ --version
cmake --version
ninja --version2
3
If one of these commands is missing, install the missing tool before continuing.
Useful commands after installation
Check the installed version:
vix --versionInspect your environment:
vix doctorShow Vix paths and cache information:
vix infoUpdate the CLI:
vix upgradeUpdate the full SDK:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk shThese commands are useful when you want to understand what Vix installed, which paths are used, and whether your environment is ready.
Common installation problems
vix: command not found
Your shell cannot find the Vix binary.
Fix for Bash:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc2
Then run:
vix --versionFix for Zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc2
Then run:
vix --version#include <vix.hpp> not found
The full SDK is not installed, or your project is not using the SDK path.
Check:
find ~/.local/include -name vix.hpp 2>/dev/nullIf nothing appears, reinstall the full SDK:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk shThen restart your terminal and check again:
find ~/.local/include -name vix.hpp 2>/dev/nullfind_package(Vix CONFIG REQUIRED) fails
Check that the CMake package exists:
find ~/.local/lib/cmake -name VixConfig.cmake 2>/dev/nullIf nothing appears, reinstall the full SDK:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk shIf it exists but CMake cannot find it, pass the SDK prefix manually:
cmake -S . -B build -DCMAKE_PREFIX_PATH="$HOME/.local"Then build:
cmake --build buildvix upgrade worked, but my project still fails to link
vix upgrade updates the CLI binary only.
It does not reinstall the SDK headers, libraries, or CMake package files.
If your project fails with an error like:
undefined symbol: vix::websocket::LowLevelServer::run(...)or:
undefined symbol: vix::websocket::Session::shutdown_now(...)then your SDK libraries are missing or outdated.
Check:
find ~/.local/lib -name "libvix_websocket.a" 2>/dev/nullIf nothing appears, reinstall the full SDK:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk shFor a specific version:
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=sdk shThen rebuild your project:
rm -rf build build-ninja
vix build2
CMake or Ninja is missing
Check:
cmake --version
ninja --version2
On Ubuntu or Debian:
sudo apt install -y cmake ninja-buildThe project builds but cannot find system libraries
Install the common development packages.
Ubuntu or Debian:
sudo apt install -y \
build-essential cmake ninja-build pkg-config \
libssl-dev libsqlite3-dev zlib1g-dev libbrotli-dev \
nlohmann-json3-dev libspdlog-dev libfmt-dev2
3
4
Then rebuild your project:
vix buildThe game module cannot find SDL2 or OpenGL
Install the game dependencies.
Ubuntu or Debian:
sudo apt install -y \
libsdl2-dev libsdl2-image-dev libgl1-mesa-dev2
macOS:
brew install sdl2 sdl2_imageThen rebuild:
vix buildvix agent cannot use a local model
Make sure Ollama is installed:
ollama --versionMake sure a model is installed:
ollama listIf no model is available, pull a small one:
ollama pull llama3.2:1bThen try again:
vix agent ask "Explain this project"The first AI agent request is slow
This is normal for local AI models.
The first request can be slower because the model may need to start, load into memory, or initialize its runtime.
For low-power machines, start with:
ollama pull llama3.2:1bIf you want a small coding-oriented model:
ollama pull qwen2.5-coder:1.5bClean SDK reinstall
If your system has an older or incomplete SDK installation, reinstall the SDK.
Linux and macOS:
rm -f "$HOME/.local/lib/libvix_"*.a
rm -rf "$HOME/.local/lib/cmake/Vix"
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk sh2
3
4
For a specific version:
rm -f "$HOME/.local/lib/libvix_"*.a
rm -rf "$HOME/.local/lib/cmake/Vix"
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=sdk sh2
3
4
Then verify:
vix --version
find ~/.local/include -name vix.hpp 2>/dev/null
find ~/.local/lib/cmake -name VixConfig.cmake 2>/dev/null
find ~/.local/lib -name "libvix_websocket.a" 2>/dev/null2
3
4
What you should remember
For real C++ development, install the full SDK:
curl -fsSL https://vixcpp.com/install.sh | shTo update only the CLI:
vix upgradeTo update the full SDK:
curl -fsSL https://vixcpp.com/install.sh | VIX_INSTALL_KIND=sdk shTo install a specific SDK version:
curl -fsSL https://vixcpp.com/install.sh | VIX_VERSION=v2.6.1 VIX_INSTALL_KIND=sdk shVerify the CLI:
vix --versionVerify the SDK header:
find ~/.local/include -name vix.hpp 2>/dev/nullVerify the CMake package:
find ~/.local/lib/cmake -name VixConfig.cmake 2>/dev/nullVerify the WebSocket module library:
find ~/.local/lib -name "libvix_websocket.a" 2>/dev/nullInspect the environment:
vix doctorFor Getting Started, SDK mode is the correct installation mode.
Next step
Now set up your development environment.
Next: Set Up Your Environment