Skip to content

CLI Commands

This page is a complete overview of the Vix CLI command surface.

Use it when you want to quickly find the purpose of a command, its category, and the next detailed page to read.

Command overview

bash
vix <command> [options]

Running vix without a command starts the interactive REPL:

bash
vix

Show global help:

bash
vix --help

Show the installed version:

bash
vix --version

Core workflow

Most Vix projects start with this flow:

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

Project commands

CommandPurposeGuide
vixStart the interactive REPLREPL
vix replStart the REPL explicitlyREPL
vix new <name>Create a new Vix projectvix new
vix makeGenerate C++ scaffoldingvix make
vix devRun an app in development mode with reloadvix dev
vix runBuild and run a project, file, or manifestvix run
vix buildConfigure and build a CMake projectvix build
vix checkValidate build, tests, runtime, and sanitizersvix check
vix testsRun project testsvix tests
vix fmtFormat C++ source filesvix fmt
vix cleanRemove local project cache directoriesvix clean
vix resetClean and reinstall the projectvix reset
vix taskRun reusable project tasksvix task

Dependency commands

CommandPurposeGuide
vix add <pkg>Add a package to the projectvix add
vix installInstall dependencies from vix.lockvix install
vix updateUpdate dependenciesvix update
vix outdatedCheck outdated dependenciesvix outdated
vix remove <pkg>Remove a dependencyvix remove
vix listList project or global packagesvix list

Dependency aliases

AliasEquivalent command
vix upvix update
vix ivix install
vix depsvix install

Packaging commands

CommandPurposeGuide
vix packBuild a distributable packagevix pack
vix verifyVerify package integrityvix verify
vix cacheStore a package locallyvix cache

Advanced commands

CommandPurposeGuide
vix registryManage the local registry indexvix registry
vix storeManage the local package storevix store
vix ormRun database migration toolingvix orm
vix p2pRun a peer-to-peer nodevix p2p

System commands

CommandPurposeGuide
vix infoShow Vix paths, caches, and local statevix info
vix doctorCheck the local environmentvix doctor
vix upgradeUpgrade Vix or a global packagevix upgrade
vix uninstallRemove Vix or a global packagevix uninstall
vix completionGenerate shell completion scriptsvix completion
vix versionShow the installed version

Help commands

CommandPurpose
vix helpShow general help
vix help <command>Show help for a specific command
vix <command> --helpShow help for a specific command
vix -hShow general help
vix --helpShow general help

Examples:

bash
vix help run
vix run --help
vix new --help

Global options

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

Project lifecycle map

StageCommand
Create projectvix new
Install dependenciesvix install
Developvix dev
Run manuallyvix run
Validatevix check
Testvix tests
Formatvix fmt
Buildvix build
Packagevix pack
Verify artifactvix verify
Cache artifactvix cache

New project workflow

bash
vix new api
cd api
vix install
vix dev

Validate before committing:

bash
vix fmt --check
vix check --tests

Build for release:

bash
vix build --preset release
vix pack --name api --version 1.0.0
vix verify --path ./dist/api@1.0.0

Existing project workflow

bash
git clone https://github.com/example/api.git
cd api
vix install
vix dev
vix check --tests

Single-file workflow

bash
vix run main.cpp
vix run main.cpp --run --port 8080
vix run main.cpp -- -O2 -DNDEBUG
vix run main.cpp --san
vix check main.cpp --san

Choosing the right command

GoalUse
Explore interactivelyvix
Create a projectvix new
Generate a class or filevix make
Run during developmentvix dev
Run manuallyvix run
Compile onlyvix build
Validate deeplyvix check
Run tests onlyvix tests
Format source filesvix fmt
Add dependenciesvix add
Install dependenciesvix install
Update dependenciesvix update
Package projectvix pack
Verify packagevix verify
Inspect environmentvix info
Diagnose setupvix doctor

Common mistakes

Passing runtime arguments after -- in script mode

Wrong:

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

Correct:

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

Running project commands outside the project directory

Wrong:

bash
vix new api
vix dev

Correct:

bash
vix new api
cd api
vix dev

Forgetting to install dependencies

For a fresh or cloned project, run vix install before vix dev.

bash
# Development
vix dev

# In another terminal
vix tests --watch

# Before committing
vix fmt --check
vix check --tests

# Before release
vix build --preset release
vix tests --preset release
vix check --san --full
vix pack --name api --version 1.0.0
vix verify --path ./dist/api@1.0.0

Version

bash
vix --version

Example output:

Released under the MIT License.