vix registry
vix registry manages the local Vix Registry index and package metadata.
Use it when you want to initialize a package manifest, refresh the local registry index, or inspect where the registry metadata is stored.
vix registry syncOverview
The Vix Registry is the package metadata layer used by Vix dependency commands.
It tells Vix:
which packages exist
which versions are available
where package repositories live
which Git tag and commit belong to each version
what metadata the package exposesThe registry is not the package source store. The registry stores metadata. The store keeps fetched package repositories. The project lockfile pins exact versions. The project install step prepares dependencies for the current project.
The full model is:
Registry index -> package metadata
Store -> fetched package Git checkouts
vix.json -> declared project dependency requirements
vix.lock -> exact resolved dependency versions
.vix/deps -> project-local dependency links or copies
.vix/vix_deps.cmake -> generated dependency integrationUsage
vix registry <subcommand>Subcommands
| Subcommand | Purpose |
|---|---|
init | Create a local vix.json manifest for a package. |
sync | Clone or refresh the local registry index. |
path | Print the local registry index path. |
Basic examples
# Create a package manifest
vix registry init
# Overwrite existing vix.json
vix registry init --force
# Refresh local registry metadata
vix registry sync
# Show registry path
vix registry pathRegistry path
The local registry index is stored under:
~/.vix/registry/indexRegistry package entries live inside:
~/.vix/registry/index/indexFor package:
gk/jsonthe registry entry file is:
~/.vix/registry/index/index/gk.json.jsonThe filename format is:
<namespace>.<name>.jsonShow registry path
Run:
vix registry pathExample output shape:
Registry
path: /home/user/.vix/registry/indexUse this when you want to inspect the local registry clone manually.
Registry repository
vix registry sync uses the official Vix Registry repository:
https://github.com/vixcpp/registry.gitThe local clone is stored at:
~/.vix/registry/indexSync the registry
Run:
vix registry syncIf the registry does not exist locally, Vix clones it:
git clone --depth 1 https://github.com/vixcpp/registry.git ~/.vix/registry/indexThen Vix normalizes the worktree:
fetch origin --prune
checkout main from origin/main
reset --hard origin/mainIf the registry already exists, Vix refreshes and resets it to origin/main.
Why sync matters
The registry is local.
Commands like vix add, vix update, vix outdated, vix publish, and global package workflows read the local registry index.
If the local index is old, Vix may not see new packages or new versions.
Run:
vix registry syncbefore dependency maintenance.
When to run registry sync
Run vix registry sync before:
searching for packages
adding a new package
checking outdated dependencies
updating dependencies
installing a global package
upgrading a global package
publishing a package
unpublishing a packageCommon workflow:
vix registry sync
vix search json
vix add gk/json
vix installWhat registry sync does not do
vix registry sync does not install dependencies.
It does not update vix.lock.
It does not create .vix/deps.
It does not generate .vix/vix_deps.cmake.
It only refreshes package metadata.
To install dependencies, use:
vix installRegistry vs install
| Command | Purpose |
|---|---|
vix registry sync | Refresh package metadata. |
vix install | Install exact dependencies from vix.lock. |
A normal project flow is:
vix registry sync
vix add gk/json
vix install
vix buildRegistry vs store
The registry and store are different.
| Area | Path | Purpose |
|---|---|---|
| Registry | ~/.vix/registry/index | Package metadata index. |
| Store | ~/.vix/store/git | Fetched package Git checkouts. |
Use:
vix registry pathto see the registry location.
Use:
vix store pathto see the package store location.
Initialize package metadata
Run:
vix registry initThis creates:
vix.jsonin the current directory.
Use this when you are preparing a package that may later be published to the Vix Registry.
Generated vix.json
vix registry init creates a starter manifest like this:
{
"name": "my-lib",
"namespace": "your-namespace",
"version": "0.1.0",
"type": "header-only",
"include": "include",
"deps": [],
"license": "MIT",
"description": "A tiny header-only C++ library.",
"keywords": ["cpp", "header-only", "vix"],
"repository": "https://github.com/your-username/my-lib",
"authors": [
{
"name": "Your Name",
"github": "your-username"
}
]
}The default package name comes from the current folder name.
If the current folder is:
jsonthen the generated name is:
{
"name": "json"
}Overwrite existing manifest
If vix.json already exists, vix registry init fails by default.
Example output shape:
vix.json already exists
Use: vix registry init --forceTo overwrite it:
vix registry init --forceUse --force carefully because it replaces the current manifest.
Package identity
A registry package uses:
namespace/nameExample:
gk/jsonIn vix.json, that identity comes from:
{
"namespace": "gk",
"name": "json"
}This package id is used by commands like:
vix add gk/json
vix publish 0.2.0
vix unpublish gk/jsonPackage versions
Published package versions are represented in registry entries.
A version points to a Git tag and commit.
Example shape:
{
"versions": {
"0.2.0": {
"tag": "v0.2.0",
"commit": "8f3a9c4..."
}
}
}This lets Vix resolve a package version to a stable Git commit.
Registry entry shape
A registry entry can contain metadata such as:
{
"name": "json",
"namespace": "gk",
"displayName": "Vix JSON",
"description": "Small JSON helpers for Vix projects.",
"documentation": "https://github.com/gk/json#readme",
"license": "MIT",
"repo": {
"url": "https://github.com/gk/json",
"defaultBranch": "main"
},
"type": "header-only",
"versions": {
"0.2.0": {
"tag": "v0.2.0",
"commit": "8f3a9c4..."
}
}
}Users normally do not edit registry entries directly.
Use:
vix publishto create registry updates.
Use:
vix unpublishto remove a package entry through the registry workflow.
Dependency workflow
The registry is the first step in dependency resolution.
A typical dependency workflow is:
vix registry sync
vix search json
vix add gk/json@^1.0.0
vix install
vix buildWhat each command does:
| Command | Role |
|---|---|
vix registry sync | Refresh package metadata. |
vix search json | Search local registry metadata. |
vix add gk/json@^1.0.0 | Add dependency requirement and rewrite vix.lock. |
vix install | Install locked dependencies and generate integration files. |
vix build | Build the project. |
Add packages from the registry
After syncing:
vix add gk/jsonor:
vix add gk/json@^1.0.0Then install:
vix installFor vix.app projects, also link the dependency target when needed:
deps = [
gk/json@^1.0.0,
]
links = [
vix::vix,
gk::json,
]Install locked dependencies
After dependencies are added or after cloning a project, run:
vix installThis uses:
vix.lockand prepares:
.vix/deps
.vix/vix_deps.cmakeUse vix install, not vix registry sync, when you need project dependencies installed.
Update dependencies
To check stale dependencies:
vix registry sync
vix outdatedTo update locked versions:
vix update --installA safe maintenance flow:
vix registry sync
vix outdated
vix update --dry-run
vix update --install
vix check --testsGlobal packages
The registry is also used for global package commands.
Install a global package:
vix registry sync
vix install -g gk/jsonUpgrade a global package:
vix registry sync
vix upgrade -g gk/jsonList global packages:
vix list -gRemove a global package:
vix uninstall -g gk/jsonGlobal packages are tracked under:
~/.vix/global/installed.jsonPublishing packages
To publish a package version, first prepare the package repository.
Recommended flow:
git status
vix fmt --check
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 registry sync
vix publish 0.2.0 --dry-run
vix publish 0.2.0 --notes "Add helpers"vix publish creates or updates a registry entry and opens a registry PR when possible.
The package becomes available after the registry PR is merged and users run:
vix registry syncUnpublishing packages
To remove a package from the registry index:
vix registry sync
vix unpublish namespace/nameExample:
vix unpublish gk/jsonCurrent unpublish behavior removes the full package registry entry, not one specific version.
Use it carefully.
If only one release is broken, publishing a fixed version is usually safer:
git tag -a v0.2.1 -m "Release v0.2.1"
git push origin v0.2.1
vix publish 0.2.1Search packages
Use:
vix search <query>Example:
vix search jsonSearch reads the local registry index.
If results look old or missing:
vix registry sync
vix search jsonRegistry command map
Use this map to choose the right command.
| Goal | Command |
|---|---|
| Create package metadata | vix registry init |
| Refresh registry metadata | vix registry sync |
| Show registry location | vix registry path |
| Search packages | vix search <query> |
| Add package to a project | vix add <pkg> |
| Install project dependencies | vix install |
| Check outdated dependencies | vix outdated |
| Update dependencies | vix update |
| Remove project dependency | vix remove <pkg> |
| List dependencies | vix list |
| Publish package version | vix publish <version> |
| Unpublish package entry | vix unpublish <namespace/name> |
| Inspect package store | vix store path |
| Clean package store | vix store gc --project |
Full project dependency workflow
For a new project:
vix registry sync
vix add gk/json@^1.0.0
vix install
vix build
vix testsFor a cloned project:
git clone https://github.com/example/api.git
cd api
vix registry sync
vix install
vix buildFor dependency maintenance:
vix registry sync
vix outdated
vix update --dry-run
vix update --install
vix check --testsFull package publish workflow
# Create package metadata if needed
vix registry init
# Edit vix.json
# Add namespace, name, description, license, exports, constraints, maintainers
# Validate package
vix fmt --check
vix check --tests
vix build --preset release
# Tag release
git tag -a v0.2.0 -m "Release v0.2.0"
git push origin v0.2.0
# Publish through registry workflow
vix registry sync
vix publish 0.2.0 --dry-run
vix publish 0.2.0 --notes "Initial release"Full package consume workflow
After the publish PR merges:
vix registry sync
vix search json
vix add gk/json@0.2.0
vix install
vix buildOptions
vix registry has subcommand-specific options.
init options
| Option | Description |
|---|---|
--force | Overwrite an existing vix.json. |
-h, --help | Show command help. |
sync options
vix registry sync currently has no extra options.
path options
vix registry path currently has no extra options.
Commands reference
| Command | Description |
|---|---|
vix registry init | Create a package vix.json manifest. |
vix registry init --force | Overwrite existing vix.json. |
vix registry sync | Clone or refresh the local registry index. |
vix registry path | Print the local registry path. |
Common workflows
Initialize a package manifest
vix registry initOverwrite a generated manifest
vix registry init --forceRefresh before adding a package
vix registry sync
vix add gk/json
vix installRefresh before checking outdated dependencies
vix registry sync
vix outdatedRefresh before publishing
vix registry sync
vix publish 0.2.0 --dry-run
vix publish 0.2.0Show registry location
vix registry pathInspect registry manually
vix registry path
cd ~/.vix/registry/index
git status
ls indexCommon mistakes
Expecting sync to install dependencies
Wrong expectation:
vix registry sync should install packagesCorrect model:
vix registry sync refreshes metadata onlyInstall project dependencies with:
vix installForgetting to sync before adding
If a package is missing or results look stale:
vix registry sync
vix add namespace/nameEditing registry entries manually
Avoid editing files under:
~/.vix/registry/index/indexUse:
vix publishor:
vix unpublishso the registry change goes through the expected Git branch and PR workflow.
Confusing registry and store
Wrong:
registry = package source checkout cacheCorrect:
registry = package metadata
store = fetched package source checkoutsUsing registry init for applications
vix registry init creates package metadata for packages intended for registry workflows.
For normal applications, start with:
vix new app --appor:
vix new api --template backendOverwriting vix.json accidentally
vix registry init --force replaces the existing vix.json.
Use it only when you intentionally want to regenerate package metadata.
Expecting publish to be immediately available
vix publish pushes a registry branch and may create a PR.
The package becomes available after:
registry PR is merged
user runs vix registry syncTroubleshooting
Registry sync failed
If sync fails, Vix prints:
registry sync failed
Check network + git access, then retry: vix registry syncTry:
vix registry syncIf needed, enable debug output:
VIX_DEBUG=1 vix registry syncRegistry not synced
Some commands may report:
registry not synced
Run: vix registry syncFix:
vix registry syncPackage not found
If vix add or vix search cannot find a package:
vix registry sync
vix search <name>If it still cannot be found, the package may not exist in the current registry index.
Existing vix.json during init
If vix registry init reports:
vix.json already existseither keep the existing file or overwrite it intentionally:
vix registry init --forceLocal registry clone is broken
If the local registry worktree is broken, run:
vix registry syncThe command normalizes the worktree by fetching, checking out main, and resetting to origin/main.
Git is missing
vix registry sync requires Git.
Install Git, then run:
vix registry syncNetwork failure
The registry sync needs network access to GitHub.
Check your connection and retry:
vix registry syncBest practices
Run vix registry sync before dependency maintenance.
Run vix registry sync before publishing.
Use vix search before adding a package if you do not know the exact package id.
Use vix add to add packages to a project.
Use vix install after adding dependencies.
Commit vix.json and vix.lock.
Do not commit .vix/deps.
Do not manually edit the local registry clone unless you are doing registry maintenance intentionally.
Use vix publish --dry-run before publishing.
Use vix unpublish carefully because current behavior removes the full package entry.
Use vix store path when you need package source cache location.
Related commands
| Command | Purpose |
|---|---|
vix search | Search packages in the local registry index. |
vix add | Add a registry package to a project. |
vix install | Install locked project dependencies. |
vix update | Re-resolve dependency versions. |
vix outdated | Check whether locked dependencies are behind registry latest. |
vix remove | Remove a project dependency from the lockfile. |
vix list | List project or global dependencies. |
vix publish | Publish a tagged package version to the registry. |
vix unpublish | Remove a package entry from the registry. |
vix store | Manage the local package source store. |
vix upgrade -g | Upgrade a globally installed registry package. |
vix uninstall -g | Remove a globally installed package. |
Next step
Search the registry for packages.