Vix CLI
The Vix CLI is the command-line interface for Vix.cpp.
It gives C++ a modern runtime-like development experience. With one binary, you can create projects, run C++ files, build applications, manage dependencies, validate code, package artifacts, and inspect your local environment.
What the CLI gives you
The vix command is designed to make C++ development faster and more direct.
It provides:
- an interactive REPL
- project creation
- C++ file generation
- script-like
.cppexecution - CMake-based project builds
- development mode with reload
- checks, tests, and sanitizers
- dependency management
- packaging and verification
- registry and local store tools
- environment diagnostics
Start in seconds
Create a new application:
vix new api
cd api
vix install
vix devThis creates a ready-to-run Vix project, installs dependencies, and starts the app in development mode.
Default interactive mode
Running vix without a command starts the interactive REPL:
vixThe REPL lets you evaluate expressions, create variables, work with JSON, inspect the environment, and run Vix commands from an interactive shell.
You can also start it explicitly:
vix replCore workflow
For a new project:
vix new api
cd api
vix install
vix devFor an existing project:
vix install
vix devFor a single C++ file:
vix run main.cppFor validation:
vix check
vix testsCommand groups
The CLI is organized around a few major workflows.
Project commands
| Command | Purpose |
|---|---|
vix new | Create a new Vix project |
vix make | Generate C++ files quickly |
vix dev | Run an app in development mode with reload |
vix run | Build and run a project, file, or manifest |
vix build | Configure and build a CMake project |
vix check | Validate a project or single C++ file |
vix tests | Run project tests |
vix fmt | Format C++ source files |
vix clean | Remove local project cache directories |
vix reset | Clean and reinstall the project |
vix task | Run reusable project tasks |
Dependency commands
| Command | Purpose |
|---|---|
vix add | Add a package to the project |
vix install | Install dependencies from vix.lock |
vix update | Update dependencies |
vix outdated | Check outdated dependencies |
vix remove | Remove a dependency |
vix list | List project or global dependencies |
Aliases:
| Alias | Equivalent command |
|---|---|
vix up | vix update |
vix i | vix install |
vix deps | vix install |
Packaging commands
| Command | Purpose |
|---|---|
vix pack | Package a project into a distributable artifact |
vix verify | Verify a package artifact |
vix cache | Store a verified package locally |
Advanced commands
| Command | Purpose |
|---|---|
vix registry | Manage the local registry index |
vix store | Manage the local package store |
vix orm | Run database migration tooling |
vix p2p | Run a peer-to-peer node |
System commands
| Command | Purpose |
|---|---|
vix info | Show Vix paths, caches, and local state |
vix doctor | Check the local environment |
vix upgrade | Upgrade Vix or a global package |
vix uninstall | Remove Vix or a global package |
vix completion | Generate shell completion scripts |
vix version | Show the installed Vix version |
Global options
Most commands support global logging and help options.
vix --help
vix --version
vix --verbose
vix --quiet
vix --log-level debug| Option | Purpose |
|---|---|
-h, --help | Show help |
-v, --version | Show version |
--verbose | Enable debug logs |
-q, --quiet | Show only warnings and errors |
--log-level <level> | Set log level |
Supported log levels: trace, debug, info, warn, error, critical, off
Typical usage
Create and run a new app
vix new api
cd api
vix install
vix devRun a single C++ file
vix run main.cppPass runtime arguments to a C++ file
vix run main.cpp --run --port 8080Use
--runfor runtime arguments. Do not pass runtime arguments after--, because everything after--is forwarded to the compiler or linker in script mode.
Build a project
vix buildBuild with SQLite support
vix build --with-sqliteValidate with sanitizers
vix check --sanFor a single file:
vix check main.cpp --sanRun tests
vix testsFormat code
vix fmtPackage a project
vix pack --name api --version 1.0.0Verify a package
vix verify --path ./dist/api@1.0.0When to use each command
- Use
vixwhen you want an interactive shell. - Use
vix newwhen starting a new project. - Use
vix makewhen you want to generate C++ files such as classes, structs, enums, functions, tests, or config files. - Use
vix devwhen you are actively developing and want automatic rebuilds. - Use
vix runwhen you want to build and run a project, a single.cppfile, or a.vixmanifest. - Use
vix buildwhen you only want to configure and compile. - Use
vix checkwhen you want validation, tests, runtime checks, or sanitizer checks. - Use
vix testswhen you only want to run tests. - Use
vix fmtbefore committing source code. - Use
vix taskwhen your project defines reusable workflows invix.json. - Use
vix pack,vix verify, andvix cachewhen preparing artifacts for sharing or deployment. - Use
vix doctorwhen something does not work and you want to inspect your environment.
CLI design philosophy
The Vix CLI exists to make C++ feel direct without hiding what C++ is.
It does not replace CMake, compilers, linkers, or native tooling. Instead, it gives them a cleaner workflow:
- write code
- run it
- check it
- package it
- ship it
Vix keeps C++ native, but makes the development loop faster and easier to understand.
Next step
Continue with the REPL guide.