Vix CLI is the official command-line interface for
Vix.cpp — the modern C++ backend runtime.
It provides a smooth, unified and developer-friendly workflow for creating, building and running C++20 applications.
The Vix CLI (vix) brings to C++ what tools like Cargo, Deno, Bun, and Vue CLI bring to their ecosystems:
- Simple project creation
- Fast builds with CMake presets
- Instant execution with clean logs
- Developer-oriented error messages
- Script-mode for running
.cppfiles like a scripting language
It finally gives C++ a modern runtime experience.
Create a complete application structure in seconds:
vix new blog- Uses CMake presets automatically
- Detects missing configs
- Parallel builds (
-j) - Spinner & colored logs
- ErrorHandler integration for friendlier compiler diagnostics
vix runIncludes:
- Automatic build if needed
- Live filtered logs
- Runtime log-level injection
- Line-buffered stdout for real-time logs
- Clean SIGINT handling (Ctrl+C)
- Detects overload resolution issues
- Explains template deduction errors
- Detects ambiguous calls, missing includes, wrong signatures
- Clear, structured messages with hints
vix run demo.cppThe CLI transparently:
- Creates a temporary CMake project
- Builds it
- Runs it with enhanced diagnostics
vix <command> [options]| Command | Description |
|---|---|
vix new <name> |
Create a new project scaffold |
vix build [name] |
Build the root or a child application |
vix run [name] [--args] |
Build (if needed) and run an application |
vix version |
Display CLI version and runtime details |
vix help [cmd] |
Show help for the CLI or a specific command |
vix new blogvix buildvix run -- --port 8080Vix.cpp runtime is ready 🚀
Logs:
Using configuration file: config/config.json
[I] ThreadPool started with 8 workers
[I] Acceptor initialized on port 8080
[I] Server request timeout set to 5000 ms
vix run hello.cppThe CLI uses a command registry for extensibility:
std::unordered_map<std::string, CommandHandler> commands_;| Path | Responsibility |
|---|---|
include/vix/cli/CLI.hpp |
CLI parser and command dispatcher |
src/CLI.cpp |
Entry point + command registry |
src/ErrorHandler.cpp |
Friendly compiler diagnostics + pattern detection |
src/commands/NewCommand.cpp |
Project scaffolding logic |
src/commands/BuildCommand.cpp |
Build orchestration (presets + fallback) |
src/commands/RunCommand.cpp |
Runtime orchestration + environment injection |
src/commands/run/RunScript.cpp |
Script mode for single .cpp execution |
vix run automatically injects:
VIX_STDOUT_MODE=line
→ Enables real-time logs in Vix.cpp applications.
git clone https://github.com/vixcpp/vix.git
cd vix/modules/cli
cmake -B build -S .
cmake --build build -j$(nproc)Output binary:
./build/vixcd vix
cmake -B build -S .
cmake --build buildThe CLI is included automatically.
| Variable | Description |
|---|---|
VIX_LOG_LEVEL |
Controls runtime log level (trace → critical) |
VIX_STDOUT_MODE |
Forces real-time stdout flush when set to line |
| Option | Default | Description |
|---|---|---|
VIX_ENABLE_SANITIZERS |
OFF | Enable ASan + UBSan |
VIX_ENABLE_LTO |
OFF | Enable link-time optimization |
Example:
cmake -B build -S . -DVIX_ENABLE_SANITIZERS=ONVix.cpp — Modern C++ backend runtime
Version: v1.6.x
Usage:
vix [GLOBAL OPTIONS] <COMMAND> [ARGS...]
Commands:
new <name> Create a new Vix project
build [name] Configure and build a project
run [name] [--args] Build (if needed) and run a project
help [command] Show help
version Show CLI version
Global options:
--verbose Debug logs for the runtime
-q, --quiet Only warnings and errors
--log-level <level> Trace | debug | info | warn | error | critical
Examples:
vix new api
vix run api -- --port 8080
vix --log-level debug run api
MIT License © Gaspard Kirira
See LICENSE for details.