Skip to content

Usage:

Terminal
$ vlt cache <command> [flags]

Work with vlt cache folders

Subcommands

add

Resolve the referenced package identifiers and ensure they are cached.

Terminal
$ vlt cache add <package-spec> [<package-spec>...]

ls

Show cache entries. If no keys are provided, then a list of available keys will be printed. If one or more keys are provided, then details will be shown for the specified items.

Terminal
$ vlt cache ls [<key>...]

info

Print metadata details for the specified cache key to stderr, and the response body to stdout.

Terminal
$ vlt cache info <key>

clean

Purge expired cache entries. If one or more keys are provided, then only those cache entries will be considered.

Terminal
$ vlt cache clean [<key>...]

delete

Purge items explicitly, whether expired or not. If one or more keys are provided, then only those cache entries will be considered.

Terminal
$ vlt cache delete <key> [<key>...]

delete-before

Purge all cache items from before a given date. Date can be provided in any format that JavaScript can parse.

Terminal
$ vlt cache delete-before <date>

delete-all

Delete the entire cache folder to make vlt slower.

Terminal
$ vlt cache delete-all

Examples

Show cache metadata for a given registry URL:

Terminal
$ vlt cache ls https://registry.npmjs.org/typescript

Add a given package specifier to the cache by fetching its resolved value:

Terminal
$ vlt cache add eslint@latest

Print the cache metadata to stderr, and write the tarball on stdout, redirecting to a file:

Terminal
$ vlt cache info https://registry.npmjs.org/eslint/-/eslint-9.25.1.tgz > eslint.tgz

Delete all entries created before Jan 1, 2025:

Terminal
$ vlt cache delete-before 2025-01-01