Vix.cpp v2.6.0 is here Read the blog
Skip to content

CLI Commands

This page is the command map for the Vix CLI.

Use it when you want to quickly understand what each command does, which workflow it belongs to, and which detailed guide to read next.

Command format

bash
vix <command> [options]
1

Examples:

bash
vix new api
vix install
vix dev
vix build
vix check --tests
1
2
3
4
5

Running vix without a command starts the interactive REPL:

bash
vix
1

Show global help:

bash
vix --help
1

Show the installed version:

bash
vix --version
1

The main idea

Vix gives C++ a modern command workflow.

Instead of manually wiring every step, you get one command surface for:

txt
create
generate
install
run
develop
build
check
test
format
package
verify
cache
publish
deploy
inspect
upgrade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Vix keeps native C++. It simplifies the workflow around it.

Core project workflow

Most new Vix projects start like this:

bash
vix new api
cd api
vix install
vix dev
1
2
3
4

Existing projects usually start like this:

bash
vix install
vix dev
1
2

Single-file C++ usage:

bash
vix run main.cpp
1

You can also run a .cpp file directly:

bash
vix main.cpp
1

Project commands

These commands are used to create, run, build, validate, and maintain a project.

CommandPurposeGuide
vixStart the interactive REPL.REPL
vix replStart the REPL explicitly.vix repl
vix new <name>Create a new Vix project.vix new
vix makeGenerate C++ scaffolding.vix make
vix modulesManage optional project modules.vix modules
vix runBuild if needed, then run a project, file, or manifest.vix run
vix devRun the app in development mode with reload behavior.vix dev
vix buildConfigure and build a project or file.vix build
vix checkValidate build, tests, runtime behavior, and sanitizers.vix check
vix testsRun project tests.vix tests
vix testAlias for vix tests.vix tests
vix fmtFormat C++ source files.vix fmt
vix cleanRemove local project cache directories.vix clean
vix resetRun vix clean, then vix install.vix reset
vix taskRun reusable project tasks.vix task
vix replayReplay a previously recorded Vix execution.vix replay

Dependency and registry commands

These commands manage packages, the registry index, project dependencies, and global packages.

CommandPurposeGuide
vix registryManage the local registry index.vix registry
vix registry initCreate a local vix.json package manifest.vix registry
vix registry syncClone or refresh the local registry index.vix registry
vix registry pathPrint the local registry index path.vix registry
vix search <query>Search packages in the local registry index.vix search
vix add <pkg>Add a package dependency to the project.vix add
vix installInstall exact dependencies from vix.lock.vix install
vix updateResolve newer dependency versions and rewrite vix.lock.vix update
vix outdatedCheck which dependencies are behind the registry.vix outdated
vix remove <pkg>Remove a project dependency.vix remove
vix listList project or global packages.vix list
vix storeManage the local package store.vix store
vix publishPublish a tagged package version.vix publish
vix unpublishRemove a package from the registry workflow.vix unpublish

Dependency aliases

AliasEquivalent commandStatus
vix ivix installCurrent
vix upvix updateCurrent
vix depsvix installDeprecated

Use this in new documentation:

bash
vix install
1

Do not recommend this in new pages:

bash
vix deps
1

Packaging commands

These commands are used to create, verify, and cache distributable artifacts.

CommandPurposeGuide
vix packCreate a package folder or .vixpkg artifact.vix pack
vix verifyVerify a package against vix.manifest.v2.vix verify
vix cacheStore a verified package locally.vix cache

Recommended flow:

bash
vix build --preset release
vix check --tests
vix pack --name api --version 1.0.0
vix verify --path ./dist/api@1.0.0
vix cache --path ./dist/api@1.0.0
1
2
3
4
5

Production commands

These commands are used when an app is moving toward a server or production environment.

CommandPurposeGuide
vix serviceInstall and manage a production systemd service.vix service
vix proxyGenerate and validate reverse proxy configs.vix proxy
vix healthCheck local, public, and WebSocket health targets.vix health
vix deployRun the production deployment workflow.vix deploy
vix logsShow production app and proxy logs.vix logs
vix envCheck project and production environment variables.vix env
vix productionShow and validate production status.Production workflow
vix wsCheck and diagnose WebSocket endpoints.vix ws

Typical production flow:

bash
vix env check --production
vix service init
vix proxy nginx init
vix health
vix deploy
vix logs
1
2
3
4
5
6

Database commands

Vix has two database command families.

CommandPurposeGuide
vix dbInspect SQLite database state, storage, migrations, and backups.vix db
vix ormRun migration, rollback, status, and migration generation workflows.vix orm

SQLite-focused workflow:

bash
vix db status
vix db migrate
vix db backup
1
2
3

ORM workflow:

bash
vix orm makemigrations --new ./schema.new.json --dir ./migrations --name add_users
vix orm migrate --db blog_db --dir ./migrations
vix orm status --db blog_db
1
2
3

Network commands

These commands are useful for networked, real-time, or peer-to-peer apps.

CommandPurposeGuide
vix p2pRun a P2P node with TCP, discovery, and bootstrap support.vix p2p
vix wsCheck and diagnose WebSocket endpoints.vix ws
vix health websocketCheck the configured WebSocket health target.vix health

P2P example:

bash
vix p2p --id A --listen 9001
vix p2p --id B --listen 9002 --connect 127.0.0.1:9001
1
2

WebSocket example:

bash
vix ws check
vix health websocket
1
2

Game commands

CommandPurposeGuide
vix gameExport and manage Vix game projects.vix game

Example:

bash
vix game export
1

Use this when working with projects built on the Vix game runtime.

AI commands

CommandPurposeGuide
vix agentRun local-first Vix AI agent commands.vix agent

Examples:

bash
vix agent ask "Explain this project"
vix agent analyze
vix agent scan
1
2
3

System commands

These commands inspect, repair, upgrade, or remove the Vix environment.

CommandPurposeGuide
vix infoShow Vix paths, caches, package counts, and local state.vix info
vix doctorCheck environment health and optional online release state.vix doctor
vix upgradeUpgrade the Vix CLI or a global package.vix upgrade
vix uninstallRemove the Vix CLI or a global package.vix uninstall
vix completionGenerate shell completion scripts.vix completion
vix versionShow the installed Vix version.vix version

Environment inspection:

bash
vix info
vix doctor
vix doctor --online
1
2
3

Upgrade flow:

bash
vix upgrade --check
vix upgrade --dry-run
vix upgrade
vix --version
vix doctor
1
2
3
4
5

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 build --help
vix registry --help
1
2
3
4

Global options

Global options are parsed before the command.

OptionPurpose
-h, --helpShow help.
-v, --versionShow version.
--verboseEnable debug logs.
-q, --quietShow only warnings and errors.
--log-level <level>Set the log level.

Supported log levels:

txt
trace
debug
info
warn
error
critical
1
2
3
4
5
6

Example:

bash
vix --log-level debug build
1

You can also use the environment variable:

bash
VIX_LOG_LEVEL=debug vix build
1

Command shortcuts

ShortcutMeaning
vix main.cppRuns vix run main.cpp.
vix app.vixRuns vix run app.vix.
vix make:class UserRuns vix make class User.
vix testRuns vix tests.
vix iRuns vix install.
vix upRuns vix update.

Project lifecycle map

StageCommand
Create projectvix new
Generate filesvix make
Add modulesvix modules
Install dependenciesvix install
Developvix dev
Run manuallyvix run
Formatvix fmt
Validatevix check
Testvix tests
Buildvix build
Packagevix pack
Verify artifactvix verify
Cache artifactvix cache
Deployvix deploy
Inspectvix info
Diagnosevix doctor

New project workflow

bash
vix new api
cd api
vix install
vix dev
1
2
3
4

Before committing:

bash
vix fmt --check
vix check --tests
1
2

Before release:

bash
vix build --preset release
vix tests --preset release
vix pack --name api --version 1.0.0
vix verify --path ./dist/api@1.0.0
1
2
3
4

Existing project workflow

bash
git clone https://github.com/example/api.git
cd api
vix install
vix dev
vix check --tests
1
2
3
4
5

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
1
2
3
4
5

Use --run for runtime arguments.

Everything after -- is forwarded to the compiler or linker in script mode.

Dependency workflow

Add a dependency:

bash
vix registry sync
vix add softadastra/json
vix install
1
2
3

Check dependencies:

bash
vix list
vix outdated
1
2

Update dependencies:

bash
vix update --install
vix check --tests
1
2

Remove a dependency:

bash
vix remove softadastra/json
vix install
vix check --tests
1
2
3

Registry workflow

Search packages:

bash
vix registry sync
vix search softadastra
1
2

Initialize package metadata:

bash
vix registry init
1

Publish a package:

bash
vix check --tests
vix build --preset release

git tag -a v0.2.0 -m "Release v0.2.0"
git push origin v0.2.0

vix publish 0.2.0 --dry-run
vix publish 0.2.0
1
2
3
4
5
6
7
8

Production workflow

Prepare environment:

bash
vix env check --production
1

Install service:

bash
vix service init
vix service status
1
2

Install proxy:

bash
vix proxy nginx init
vix proxy nginx check
1
2

Check health:

bash
vix health
vix health local
vix health public
vix health websocket
1
2
3
4

Deploy:

bash
vix deploy
1

Inspect logs:

bash
vix logs
vix logs --errors
1
2

Choosing the right command

GoalUse
Explore interactivelyvix
Create a projectvix new
Generate a class, test, enum, function, or configvix make
Add optional modulesvix modules
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
Check outdated dependenciesvix outdated
Search registry packagesvix search
Package projectvix pack
Verify packagevix verify
Cache packagevix cache
Publish packagevix publish
Inspect environmentvix info
Diagnose setupvix doctor
Manage production servicevix service
Configure reverse proxyvix proxy
Deploy production appvix deploy
View production logsvix logs
Check WebSocket endpointvix ws
Run a P2P nodevix p2p
Export a game projectvix game
Run AI agent commandsvix agent

Common mistakes

Passing runtime arguments after -- in script mode

Wrong:

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

Correct:

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

Running project commands outside the project directory

Wrong:

bash
vix new api
vix dev
1
2

Correct:

bash
vix new api
cd api
vix dev
1
2
3

Forgetting to install dependencies

For a fresh or cloned project, run:

bash
vix install
1

Then start development:

bash
vix dev
1

Using update when you only need install

After cloning a project, use:

bash
vix install
1

Use vix update only when you want to resolve newer dependency versions.

Using vix deps in new documentation

vix deps is a deprecated alias.

Use:

bash
vix install
1
bash
# Start development
vix dev

# Run tests
vix tests

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

# Before release
vix build --preset release
vix tests --preset release
vix pack --name api --version 1.0.0
vix verify --path ./dist/api@1.0.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Full command list

Each entry below is used as:

bash
vix <command>

add
agent
build
cache
check
clean
completion
db
deploy
dev
doctor
env
fmt
game
health
info
install
list
logs
make
modules
new
orm
outdated
p2p
pack
production
proxy
publish
registry
remove
replay
repl
reset
run
search
service
store
task
test
tests
uninstall
unpublish
update
upgrade
verify
version
ws
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

Next step

Start with project creation.

Open the vix new guide

Released under the MIT License.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.