Skip to content

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 .cpp execution
  • 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:

bash
vix new api
cd api
vix install
vix dev

This 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:

bash
vix

The 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:

bash
vix repl

Core workflow

For a new project:

bash
vix new api
cd api
vix install
vix dev

For an existing project:

bash
vix install
vix dev

For a single C++ file:

bash
vix run main.cpp

For validation:

bash
vix check
vix tests

Command groups

The CLI is organized around a few major workflows.

Project commands

CommandPurpose
vix newCreate a new Vix project
vix makeGenerate C++ files quickly
vix devRun an app in development mode with reload
vix runBuild and run a project, file, or manifest
vix buildConfigure and build a CMake project
vix checkValidate a project or single C++ file
vix testsRun project tests
vix fmtFormat C++ source files
vix cleanRemove local project cache directories
vix resetClean and reinstall the project
vix taskRun reusable project tasks

Dependency commands

CommandPurpose
vix addAdd a package to the project
vix installInstall dependencies from vix.lock
vix updateUpdate dependencies
vix outdatedCheck outdated dependencies
vix removeRemove a dependency
vix listList project or global dependencies

Aliases:

AliasEquivalent command
vix upvix update
vix ivix install
vix depsvix install

Packaging commands

CommandPurpose
vix packPackage a project into a distributable artifact
vix verifyVerify a package artifact
vix cacheStore a verified package locally

Advanced commands

CommandPurpose
vix registryManage the local registry index
vix storeManage the local package store
vix ormRun database migration tooling
vix p2pRun a peer-to-peer node

System commands

CommandPurpose
vix infoShow Vix paths, caches, and local state
vix doctorCheck the local environment
vix upgradeUpgrade Vix or a global package
vix uninstallRemove Vix or a global package
vix completionGenerate shell completion scripts
vix versionShow the installed Vix version

Global options

Most commands support global logging and help options.

bash
vix --help
vix --version
vix --verbose
vix --quiet
vix --log-level debug
OptionPurpose
-h, --helpShow help
-v, --versionShow version
--verboseEnable debug logs
-q, --quietShow 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

bash
vix new api
cd api
vix install
vix dev

Run a single C++ file

bash
vix run main.cpp

Pass runtime arguments to a C++ file

bash
vix run main.cpp --run --port 8080

Use --run for runtime arguments. Do not pass runtime arguments after --, because everything after -- is forwarded to the compiler or linker in script mode.

Build a project

bash
vix build

Build with SQLite support

bash
vix build --with-sqlite

Validate with sanitizers

bash
vix check --san

For a single file:

bash
vix check main.cpp --san

Run tests

bash
vix tests

Format code

bash
vix fmt

Package a project

bash
vix pack --name api --version 1.0.0

Verify a package

bash
vix verify --path ./dist/api@1.0.0

When to use each command

  • Use vix when you want an interactive shell.
  • Use vix new when starting a new project.
  • Use vix make when you want to generate C++ files such as classes, structs, enums, functions, tests, or config files.
  • Use vix dev when you are actively developing and want automatic rebuilds.
  • Use vix run when you want to build and run a project, a single .cpp file, or a .vix manifest.
  • Use vix build when you only want to configure and compile.
  • Use vix check when you want validation, tests, runtime checks, or sanitizer checks.
  • Use vix tests when you only want to run tests.
  • Use vix fmt before committing source code.
  • Use vix task when your project defines reusable workflows in vix.json.
  • Use vix pack, vix verify, and vix cache when preparing artifacts for sharing or deployment.
  • Use vix doctor when 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:

  1. write code
  2. run it
  3. check it
  4. package it
  5. ship it

Vix keeps C++ native, but makes the development loop faster and easier to understand.

Next step

Continue with the REPL guide.

Released under the MIT License.