vix cache
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.0Overview
vix cache takes an existing Vix package and stores it in a local cache layout.
It is useful after:
vix pack
vix verify2
The command supports:
package folders
.vixpkg artifacts
custom store locations
safe overwrite with --force
verification before caching
signature verification
atomic cache writes2
3
4
5
6
7
The cached package is stored by:
name
version
ABI tag2
3
The default destination shape is:
<store>/packs/<name>/<version>/<os>-<arch>/Example:
~/.local/share/vix/packs/blog/1.0.0/linux-x86_64/Usage
vix cache --path <folder|artifact.vixpkg> [options]--path is required.
Basic examples
# 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-store2
3
4
5
6
7
8
9
10
11
12
13
14
Required input
You 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.vixpkgWhat it accepts
vix cache accepts:
package folder
.vixpkg artifact2
A package folder must contain:
manifest.jsonA .vixpkg artifact is extracted first, then cached.
.vixpkg extraction
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.0Single nested folder support
If a .vixpkg extracts to a single nested folder, Vix detects it.
Example extracted layout:
/tmp/vix_cache_1234/
└── blog@1.0.0/
└── manifest.json2
3
Vix uses:
/tmp/vix_cache_1234/blog@1.0.0/as the package root.
Source and pack 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.02
3
4
5
6
7
For folder packages, the source and pack root are usually the same.
Manifest requirement
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.2
Fix:
vix pack --name blog --version 1.0.0
vix cache --path ./dist/blog@1.0.02
Manifest format
vix 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": "..."
}
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
Required fields:
schema
package.name
package.version
abi.os
abi.arch
payload.digest_algorithm
payload.digest2
3
4
5
6
7
Package identity
The cache destination is computed from:
manifest.package.name
manifest.package.version
manifest.abi.os
manifest.abi.arch2
3
4
Example:
{
"package": {
"name": "blog",
"version": "1.0.0"
},
"abi": {
"os": "linux",
"arch": "x86_64"
}
}2
3
4
5
6
7
8
9
10
Destination:
<store>/packs/blog/1.0.0/linux-x86_64/The ABI tag is:
<os>-<arch>Example:
linux-x86_64Default store location
If --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 fallback2
3
4
On Windows:
1. VIX_STORE
2. USERPROFILE/.vix
3. temp/vix fallback2
3
So 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>/Custom store
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/Verification by default
By default, vix cache verifies the package before storing it.
It checks:
manifest minimal validity
payload digest
checksums.sha256
signature when available or required2
3
4
This makes caching safer because the package is validated before being copied into the store.
Skip verification
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.02
Payload digest verification
On 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).Payload digest exclusions
These files are excluded from the payload digest:
manifest.json
checksums.sha256
meta/payload.digest
meta/payload.digest.minisig2
3
4
Vix also reads additional excludes from:
{
"payload": {
"excludes": []
}
}2
3
4
5
meta/payload.digest
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.Checksums verification
On Linux and macOS, Vix checks:
checksums.sha256If the file is present, Vix verifies every listed file.
It checks:
file exists
sha256 matches expected value2
If 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.Signature verification
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.pub2
3
4
Public key resolution
The public key can come from:
--pubkey <path>
VIX_MINISIGN_PUBKEY
~/.config/vix/keys/vix-pack.pub
~/keys/vix/vix-pack.pub2
3
4
Resolution order:
1. --pubkey <path>
2. VIX_MINISIGN_PUBKEY
3. ~/.config/vix/keys/vix-pack.pub
4. ~/keys/vix/vix-pack.pub2
3
4
Example with CLI option:
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pub2
3
4
Example with environment variable:
VIX_MINISIGN_PUBKEY=./keys/vix-pack.pub \
vix cache --path ./dist/blog@1.0.0 --require-signature2
Missing signature
If 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).Missing public key
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.Missing minisign
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).Atomic cache write
vix cache writes the package atomically.
The flow is:
copy package to temporary destination
rename temporary destination to final destination2
Example:
<store>/packs/blog/1.0.0/blog-x86_64.tmp.<pid>
<store>/packs/blog/1.0.0/linux-x86_642
This avoids leaving a broken final cache directory if copying fails.
If rename() fails, Vix falls back to copy and remove.
Existing cached package
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.
Verbose mode
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.cpp2
3
4
5
6
7
Successful output
Example:
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_642
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
After 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.
Windows behavior
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.
Recommended workflow
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.02
3
4
5
If a .vixpkg archive exists:
vix cache --path ./dist/blog@1.0.0.vixpkgSigned cache workflow
Package with signing:
VIX_MINISIGN_SECKEY=./keys/vix-pack.key \
vix pack --name blog --version 1.0.0 --sign=required2
Cache with required signature:
vix cache \
--path ./dist/blog@1.0.0 \
--require-signature \
--pubkey ./keys/vix-pack.pub2
3
4
Custom local store workflow
vix pack --name blog --version 1.0.0
vix cache --path ./dist/blog@1.0.0 --store ./local-store2
Cached path:
./local-store/packs/blog/1.0.0/linux-x86_64/Force overwrite workflow
vix cache --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.0 --force2
Use --force when you intentionally want to replace the cached copy.
CI usage
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.02
3
4
5
For 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.pub2
3
4
5
6
7
8
9
10
Options
| 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. |
Environment variables
| 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. |
Commands reference
| 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. |
Common workflows
Pack, verify, cache
vix pack --name blog --version 1.0.0
vix verify --path ./dist/blog@1.0.0
vix cache --path ./dist/blog@1.0.02
3
Cache a .vixpkg
vix cache --path ./dist/blog@1.0.0.vixpkgCache with overwrite
vix cache --path ./dist/blog@1.0.0 --forceCache with required signature
vix cache \
--path ./dist/blog@1.0.0.vixpkg \
--require-signature \
--pubkey ./keys/vix-pack.pub2
3
4
Cache into a custom store
vix cache \
--path ./dist/blog@1.0.0 \
--store ./local-store2
3
Cache without verification
vix cache \
--path ./dist/blog@1.0.0 \
--no-verify2
3
Common mistakes
Forgetting --path
Wrong:
vix cacheCorrect:
vix cache --path ./dist/blog@1.0.0Caching before packing
Wrong:
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.02
Passing a project root instead of a package root
Wrong:
vix cache --path .from a normal project root without manifest.json.
Correct:
vix pack
vix cache --path ./dist/<name>@<version>2
Expecting cache to build the project
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.0Expecting cache to create a package
vix cache stores an existing package.
It does not create the package.
Use:
vix packto create one.
Skipping verification in release workflows
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.02
Requiring signature without a public key
Wrong:
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.pub2
3
4
or:
VIX_MINISIGN_PUBKEY=./keys/vix-pack.pub \
vix cache --path ./dist/blog@1.0.0 --require-signature2
Re-caching without --force
If the package is already cached, use:
vix cache --path ./dist/blog@1.0.0 --forceonly when you intentionally want to overwrite it.
Troubleshooting
Missing --path
Pass a package folder or .vixpkg:
vix cache --path ./dist/blog@1.0.0Path not found or unsupported
Check that the path exists:
ls ./distThen run:
vix cache --path ./dist/<name>@<version>Unable to extract .vixpkg
Install unzip, or cache the folder package:
vix cache --path ./dist/<name>@<version>manifest.json is missing in pack
You passed a folder that is not a package folder.
Run:
vix packThen cache the generated folder:
vix cache --path ./dist/<name>@<version>manifest.json is invalid JSON
Regenerate the package:
vix pack --name <name> --version <version>Then cache again.
manifest.schema must be 'vix.manifest.v2'
The package was not created with the expected Vix manifest v2 format.
Regenerate it:
vix packPayload digest mismatch
The package contents changed after packing.
Regenerate and cache again:
vix pack --name <name> --version <version>
vix cache --path ./dist/<name>@<version> --force2
SHA256 mismatch
A file listed in checksums.sha256 changed.
Regenerate the package:
vix packMissing file listed in checksums.sha256
A file was removed after packing.
Regenerate the package or restore the missing file.
Package already cached
Use:
vix cache --path ./dist/<name>@<version> --forceonly if replacing the cached package is intentional.
cache failed
Run with verbose output:
vix cache --path ./dist/<name>@<version> --verboseCheck permissions for the target store directory.
minisign verification failed
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 modified2
3
4
Then repack and cache again.
Best practices
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.
Related commands
| 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. |
Next step
Continue with registry management.