← Back to the index

vv get

Downloads and installs a remote module into the global module cache. Modules are cloned as Git repositories.

vv get github.com/user/repo
vv get github.com/user/repo@v1.0.0

Module Storage

By default, modules are stored in a global cache directory determined by the VVPATH environment variable. If VVPATH is not set, it defaults to ~/.vv (e.g., C:\Users\Name\.vv on Windows or /home/name/.vv on Unix).

The cache structure follows the remote path: $VVPATH/.cache/<domain>/<user>/<repo>[@version].

Resolution Order

When you import a module, vv searches for it in the following order:

  1. Local Vendor: A .vv-modules directory in the same folder as the importing file.
  2. Project Vendor: A .vv-modules directory at the project root (where vv.mod is located).
  3. Global Cache: The .cache directory inside your $VVPATH.

The vv.sum file in your $VVPATH maintains checksums for all files in the global cache to ensure integrity.