vix cache stores a Vix package locally so it can be reused quickly.
Use it when you already have a package folder or .vixpkg artifact and want to place it in the local Vix package cache.
vix cache --path ./dist/blog@1.0.0vix cache takes an existing Vix package and stores it in a local cache layout.
It is useful after:
vix pack
vix verifyThe command supports:
package folders
.vixpkg artifacts
custom store locations
safe overwrite with --force
verification before caching
signature verification
atomic cache writesThe cached package is stored by:
name
version
ABI tagThe default destination shape is:
<store>/packs/<name>/<version>/<os>-<arch>/Example:
~/.local/share/vix/packs/blog/1.0.0/linux-x86_64/vix cache --path <folder|artifact.vixpkg> [options]--path is required.
# Cache a package folder
vix cache --path ./dist/blog@1.0.0
# Cache a .vixpkg artifact
vix cache --path ./dist/blog@1.0.0.vixpkg
# Overwrite an existing cached package
vix cache --path ./dist/blog@1.0.0 --force
# Show detailed copy operations
vix cache --path ./dist/blog@1.0.0 --verbose
# Cache into a custom store
vix cache --path ./dist/blog@1.0.0 --store ./local-storeYou must pass:
--path <folder|artifact.vixpkg>If you run:
vix cacheVix reports:
Missing --path. Try: vix cache --path <folder|artifact.vixpkg>Correct:
vix cache --path ./dist/blog@1.0.0or:
vix cache --path ./dist/blog@1.0.0.vixpkgvix cache accepts:
package folder
.vixpkg artifactA package folder must contain:
manifest.jsonA .vixpkg artifact is extracted first, then cached.
On Linux and macOS, .vixpkg extraction uses:
unzipExample:
vix cache --path ./dist/blog@1.0.0.vixpkgIf unzip is missing or extraction fails, Vix reports:
Unable to extract .vixpkg (need unzip).In that case, cache the folder package instead:
vix cache --path ./dist/blog@1.0.0If a .vixpkg extracts to a single nested folder, Vix detects it.
Example extracted layout:
/tmp/vix_cache_1234/
└── blog@1.0.0/
└── manifest.jsonVix uses:
/tmp/vix_cache_1234/blog@1.0.0/as the package root.
When caching starts, Vix prints the original input and the resolved package root.
Example output shape:
vix cache
Source:
dist/blog@1.0.0.vixpkg
Pack root:
/tmp/vix_cache_1234/blog@1.0.0For folder packages, the source and pack root are usually the same.
The package root must contain:
manifest.jsonIf it is missing, Vix reports:
manifest.json is missing in pack.
Make sure you pass a valid package folder or .vixpkg artifact.Fix:
vix pack --name blog --version 1.0.0
vix cache --path ./dist/blog@1.0.0vix cache expects a Vix manifest v2 package:
{
"schema": "vix.manifest.v2",
"package": {
"name": "blog",
"version": "1.0.0"
},
"abi": {
"os": "linux",
"arch": "x86_64"
},
"payload": {
"digest_algorithm": "sha256",
"digest": "..."
}
}Required fields:
schema
package.name
package.version
abi.os
abi.arch
payload.digest_algorithm
payload.digestThe cache destination is computed from:
manifest.package.name
manifest.package.version
manifest.abi.os
manifest.abi.archExample:
{
"package": {
"name": "blog",
"version": "1.0.0"
},
"abi": {
"os": "linux",
"arch": "x86_64"
}
}Destination:
<store>/packs/blog/1.0.0/linux-x86_64/The ABI tag is:
<os>-<arch>Example:
linux-x86_64If --store is not passed, Vix chooses the store root in this order.
On Linux and macOS:
1. VIX_STORE
2. XDG_DATA_HOME/vix
3. ~/.local/share/vix
4. temp/vix fallbackOn Windows:
1. VIX_STORE
2. USERPROFILE/.vix
3. temp/vix fallbackSo on a normal Linux machine, the default package cache root is usually:
~/.local/share/vixThe final cached package path becomes:
~/.local/share/vix/packs/<name>/<version>/<os>-<arch>/Use:
vix cache --path ./dist/blog@1.0.0 --store ./local-storeThis stores the package under:
./local-store/packs/<name>/<version>/<os>-<arch>/Example:
./local-store/packs/blog/1.0.0/linux-x86_64/By default, vix cache verifies the package before storing it.
It checks:
manifest minimal validity
payload digest
checksums.sha256
signature when available or requiredThis makes caching safer because the package is validated before being copied into the store.
Use:
vix cache --path ./dist/blog@1.0.0 --no-verifyThis skips package verification.
Vix prints:
Verification skipped (--no-verify).This is not recommended for release workflows.
Use it only for local experiments or when the package was already verified in a previous trusted step.
Recommended:
vix verify --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0On Linux and macOS, Vix verifies:
manifest.payload.digestIt rebuilds a stable SHA256 listing of the package payload and compares it to the manifest digest.
If the digest does not match, caching fails.
Example failure:
Payload digest mismatch (computed != manifest.payload.digest).These files are excluded from the payload digest:
manifest.json
checksums.sha256
meta/payload.digest
meta/payload.digest.minisigVix also reads additional excludes from:
{
"payload": {
"excludes": []
}
}If present, Vix also checks:
meta/payload.digestagainst:
manifest.payload.digestIf it differs, caching fails.
If it is missing, Vix warns:
meta/payload.digest missing.On Linux and macOS, Vix checks:
checksums.sha256If the file is present, Vix verifies every listed file.
It checks:
file exists
sha256 matches expected valueIf a listed file is missing, caching fails.
If a listed file has a different hash, caching fails.
If checksums.sha256 is missing, Vix warns:
checksums.sha256 is missing.vix cache can verify a minisign signature for:
meta/payload.digestThe signature file is:
meta/payload.digest.minisigBy default, if the signature is missing, Vix warns but does not fail.
To make signature verification mandatory, use:
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pubThe public key can come from:
--pubkey <path>
VIX_MINISIGN_PUBKEY
~/.config/vix/keys/vix-pack.pub
~/keys/vix/vix-pack.pubResolution order:
1. --pubkey <path>
2. VIX_MINISIGN_PUBKEY
3. ~/.config/vix/keys/vix-pack.pub
4. ~/keys/vix/vix-pack.pubExample with CLI option:
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pubExample with environment variable:
VIX_MINISIGN_PUBKEY=./keys/vix-pack.pub \
vix cache --path ./dist/blog@1.0.0 --require-signatureIf the package is not signed and signature is not required, Vix warns:
meta/payload.digest.minisig missing (signature not verified).If signature is required, Vix fails:
meta/payload.digest.minisig missing (signature required).If a signature exists but no public key is available, Vix warns by default:
No pubkey provided; skipping signature verification.If signature is required, Vix fails:
--pubkey is required (or set VIX_MINISIGN_PUBKEY) to verify signature.If minisign is missing and signature is not required, Vix warns:
minisign not available; skipping signature verification.If signature is required, Vix fails:
minisign not available (signature required).vix cache writes the package atomically.
The flow is:
copy package to temporary destination
rename temporary destination to final destinationExample:
<store>/packs/blog/1.0.0/blog-x86_64.tmp.<pid>
<store>/packs/blog/1.0.0/linux-x86_64This avoids leaving a broken final cache directory if copying fails.
If rename() fails, Vix falls back to copy and remove.
If the package is already cached, Vix refuses to overwrite it by default.
Example error:
Package already cached: <path> (use --force)Use:
vix cache --path ./dist/blog@1.0.0 --forceThis removes the existing cached package and writes the new one.
Use:
vix cache --path ./dist/blog@1.0.0 --verboseVerbose mode shows detailed operations such as copied files and verification details.
Example output shape:
payload digest ok
digest: <sha256>
checksums ok: 12 file(s)
signature ok (minisign)
copied: manifest.json
copied: include/blog.hpp
copied: src/blog.cppExample:
vix cache
Source:
dist/blog@1.0.0
Pack root:
/home/user/project/dist/blog@1.0.0
Verifying:
payload digest ok
checksums ok: 12 file(s)
Target store:
/home/user/.local/share/vix
Caching:
blog@1.0.0 (linux-x86_64)
/home/user/.local/share/vix/packs/blog/1.0.0/linux-x86_64
Package cached:
/home/user/.local/share/vix/packs/blog/1.0.0/linux-x86_64After caching, Vix prints:
Next: vix get blog@1.0.0 --out ./<folder> (coming soon)vix get is not part of the current cache behavior yet. It is only shown as a future workflow hint.
On Windows, the current implementation performs minimal manifest validation when verification is enabled.
It prints:
Windows: only minimal manifest validation is available right now.Full payload digest, checksums, .vixpkg extraction, and minisign verification are Unix-oriented in the current implementation.
vix build --preset release
vix check --tests
vix pack --name blog --version 1.0.0
vix verify --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0If a .vixpkg archive exists:
vix cache --path ./dist/blog@1.0.0.vixpkgPackage with signing:
VIX_MINISIGN_SECKEY=./keys/vix-pack.key \
vix pack --name blog --version 1.0.0 --sign=requiredCache with required signature:
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pubvix pack --name blog --version 1.0.0
vix cache --path ./dist/blog@1.0.0 --store ./local-storeCached path:
./local-store/packs/blog/1.0.0/linux-x86_64/vix cache --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0 --forceUse --force when you intentionally want to replace the cached copy.
vix build --preset release
vix check --tests
vix pack --name blog --version 1.0.0
vix verify --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0For signed CI artifacts:
vix build --preset release
vix check --tests
VIX_MINISIGN_SECKEY=./keys/vix-pack.key \
vix pack --name blog --version 1.0.0 --sign=required
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pub| Option | Description |
|---|---|
-p, --path <path> |
Package folder or .vixpkg artifact. Required. |
--store <dir> |
Custom store location. |
--force |
Overwrite if already cached. |
--no-verify |
Skip verification. Not recommended for release workflows. |
--verbose |
Show detailed operations. |
--require-signature |
Require a valid minisign signature. |
--pubkey <path> |
Minisign public key. |
-h, --help |
Show command help. |
| Variable | Description |
|---|---|
VIX_STORE |
Override the default local package cache root. |
XDG_DATA_HOME |
Used on Unix when VIX_STORE is not set. |
VIX_MINISIGN_PUBKEY |
Public key path used to verify minisign signatures. |
HOME |
Used on Unix for default store and default public key lookup. |
USERPROFILE |
Used on Windows for default store fallback. |
| Command | Description |
|---|---|
vix cache --path ./dist/blog@1.0.0 |
Cache a package folder. |
vix cache --path ./dist/blog@1.0.0.vixpkg |
Cache a package archive. |
vix cache --path ./dist/blog@1.0.0 --force |
Overwrite existing cached package. |
vix cache --path ./dist/blog@1.0.0 --no-verify |
Cache without verification. |
vix cache --path ./dist/blog@1.0.0 --store ./local-store |
Cache into a custom store. |
vix cache --path ./dist/blog@1.0.0 --require-signature --pubkey ./keys/vix-pack.pub |
Cache only if signature verification succeeds. |
vix pack --name blog --version 1.0.0
vix verify --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0vix cache --path ./dist/blog@1.0.0.vixpkgvix cache --path ./dist/blog@1.0.0 --forcevix cache \
--path ./dist/blog@1.0.0.vixpkg \
--require-signature \
--pubkey ./keys/vix-pack.pubvix cache \
--path ./dist/blog@1.0.0 \
--store ./local-storevix cache \
--path ./dist/blog@1.0.0 \
--no-verifyWrong:
vix cacheCorrect:
vix cache --path ./dist/blog@1.0.0Wrong:
vix cache --path ./dist/blog@1.0.0when the package does not exist.
Correct:
vix pack --name blog --version 1.0.0
vix cache --path ./dist/blog@1.0.0Wrong:
vix cache --path .from a normal project root without manifest.json.
Correct:
vix pack
vix cache --path ./dist/<name>@<version>vix cache does not build.
Build first:
vix build --preset releaseThen pack:
vix pack --name blog --version 1.0.0Then cache:
vix cache --path ./dist/blog@1.0.0vix cache stores an existing package.
It does not create the package.
Use:
vix packto create one.
Avoid this for releases:
vix cache --path ./dist/blog@1.0.0 --no-verifyPrefer:
vix verify --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0Wrong:
vix cache --path ./dist/blog@1.0.0 --require-signatureif no public key is configured.
Correct:
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pubor:
VIX_MINISIGN_PUBKEY=./keys/vix-pack.pub \
vix cache --path ./dist/blog@1.0.0 --require-signatureIf the package is already cached, use:
vix cache --path ./dist/blog@1.0.0 --forceonly when you intentionally want to overwrite it.
Pass a package folder or .vixpkg:
vix cache --path ./dist/blog@1.0.0Check that the path exists:
ls ./distThen run:
vix cache --path ./dist/<name>@<version>Install unzip, or cache the folder package:
vix cache --path ./dist/<name>@<version>You passed a folder that is not a package folder.
Run:
vix packThen cache the generated folder:
vix cache --path ./dist/<name>@<version>Regenerate the package:
vix pack --name <name> --version <version>Then cache again.
The package was not created with the expected Vix manifest v2 format.
Regenerate it:
vix packThe package contents changed after packing.
Regenerate and cache again:
vix pack --name <name> --version <version>
vix cache --path ./dist/<name>@<version> --forceA file listed in checksums.sha256 changed.
Regenerate the package:
vix packA file was removed after packing.
Regenerate the package or restore the missing file.
Use:
vix cache --path ./dist/<name>@<version> --forceonly if replacing the cached package is intentional.
Run with verbose output:
vix cache --path ./dist/<name>@<version> --verboseCheck permissions for the target store directory.
Check that:
the package was signed with the matching private key
the public key is correct
meta/payload.digest was not modified
meta/payload.digest.minisig was not modifiedThen repack and cache again.
Run vix verify before vix cache.
Keep verification enabled by default.
Use --require-signature for serious release artifacts.
Use --force only when intentionally replacing a cached package.
Use --store in CI when you want an isolated cache.
Use VIX_STORE when you want a stable shared cache path.
Do not edit package contents after vix pack.
If package contents change, run vix pack again.
Use --verbose when debugging cache failures.
| Command | Purpose |
|---|---|
vix pack |
Create a package folder or .vixpkg artifact. |
vix verify |
Verify a package folder or artifact. |
vix store |
Manage the local dependency store. |
vix build |
Build before packaging. |
vix check |
Validate before packaging. |
vix publish |
Publish a tagged package version to the registry. |
Continue with registry management.