---
title: "Configuring the vlt CLI"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/configuring"
image: "https://docs.vlt.io/og/client/configuring"
lang: "en"
---

# Configuring the vlt CLI

Usage:

```bash title="Terminal"
$ vlt [<options>] [<cmd> [<args> ...]]
```

More documentation available at [https://docs.vlt.io](https://docs.vlt.io/index.md)

## Subcommands

```
access, bugs, build, cache, ci, config, create, deprecate, dist-tag, docs, exec, exec-cache, exec-local, help, init, add, install, list, login, logout, pack, ping, pkg, profile, publish, query, registry, repo, run-script, run, run-exec, setup, skills, token, uninstall, unpublish, update, version, view, whoami
```

Run `vlt <cmd> --help` for more information about a specific command

## Configuration

The `vlt.json` file in the XDG specified config directory is loaded first. Then, if a `vlt.json` file is present in the root of the current project, the `config` field in that file is layered on top of it. (The project file is also used to define workspaces and other `vlt` behaviors.)

Scalar values are overridden by the innermost layer that sets them. Object type values are merged together key by key, with the project file winning on conflict. Set a field, or a key within an object field, to `null` in the JSON configuration to explicitly remove it:

```json
// ~/.config/vlt/vlt.json
// User level config
{
  "config": {
    "registries": { "npm": "https://a/", "old": "https://b/" }
  }
}
```

```json
// ./vlt.json
// Project level config
{ "config": { "registries": { "npm": "https://c/", "old": null } } }
```

```json
// Effective parsed config
{ "registries": { "npm": "https://c/" } }
```

> Note: The user level config file uses XDG paths that are OS-specific, the example `~/.config/vlt/vlt.json` path used here might not be the same path used in your system, to learn what is the user level config location for your system, run: `vlt config location --config=user`

Object type values given via `VLT_*` environment variables or on the command line are merged key by key over the config files, command line winning over environment. Other values replace them. List values in the environment are newline-delimited, e.g. `VLT_REGISTRIES=$'a=https://a/\nb=https://b/'`.

### Registry selection across layers

Registry selection is an exception to plain per-field layering, because `registry` outranks any `registries` alias. A layer that sets any of `registry`, `registries`, or `default-registry-alias` owns selection: the `registry` and `default-registry-alias` it does _not_ set are dropped rather than inherited from an outer layer.

So a project that configures its own registry is never quietly sent to the user-level one:

```json
// ~/.config/vlt/vlt.json
// User level config
{
  "config": {
    "registry": "https://user/",
    "registries": { "main": "https://main/" }
  }
}
```

```json
// ./vlt.json
// Project level config
{ "config": { "registries": { "npm": "https://project/" } } }
```

resolves to `https://project/`. The user's `main` alias is still addressable as `main:` in a specifier, or with `vlt registry main <cmd>`.

`scoped-registries` and `jsr-registries` are purely additive, so they do not take over selection.

Command-specific fields may be set in a nested `command` object that overrides any options defined at the top level, following the same rules.

For information about catalog configuration and the `catalog:` protocol, see the [Catalogs documentation](https://docs.vlt.io/client/catalogs.md).

### Certificate authorities

By default vlt trusts the certificate authorities bundled with Node. These environment variables change that, for example behind a proxy that intercepts TLS:

- `NODE_EXTRA_CA_CERTS=<file>` adds the certificates in a PEM file and keeps the bundled ones. Use this to add a corporate root.
- `NODE_USE_SYSTEM_CA=1` also trusts the operating system's certificate store. Use this when the root is installed there.
- `npm_config_cafile=<file>` (or `NPM_CONFIG_CAFILE`) trusts only the certificates in a PEM file for registry connections, as npm's `cafile` does. The bundled roots are dropped, so every registry host needs its certificate authority in the file. A file that cannot be read or holds no certificates is an error.

### `-c --color`

Use colors (Default for TTY)

### `-C --no-color`

Do not use colors (Default for non-TTY)

### `--registry=<url>`

Sets the registry for fetching packages, when no registry is explicitly set on a specifier.

For example, `express@latest` will be resolved by looking up the metadata from this registry.

There is **no default**. Bare specifiers (like `express@latest`) resolve through the `--default-registry-alias` (default `npm`, vlt's public, read-only npm mirror unless configured) when this scalar is not set. Publishing and account commands need a registry you configure, in `vlt.json`, with this flag, or via the `VLT_REGISTRY` environment variable; [`vlt setup`](https://docs.vlt.io/client/registries.md#getting-started-with-vlt-setup) or [`vlt login`](https://docs.vlt.io/client/commands/login.md) will configure one for you. See [Registries](https://docs.vlt.io/client/registries.md).

### `--default-registry-alias=<name>`

The name of the entry in `--registries` that **bare specifiers** — and transitive dependencies without an explicit registry protocol — resolve through, when neither a `scoped-registries` entry nor the `--registry` scalar applies. Precedence is `scoped-registries` > `--registry` > `registries[<default-registry-alias>]`.

Defaults to `npm`. The built-in `npm` alias is vlt's public, read-only npm mirror (`https://registry.vlt.io/upstream/npm/`), which has usage limits. [`vlt setup`](https://docs.vlt.io/client/registries.md#getting-started-with-vlt-setup) points it at your vlt.io account's npm mirror, or set `registries.npm` to use another registry (e.g. `https://registry.npmjs.org/`). See [Registries](https://docs.vlt.io/client/registries.md).

### `--registries=<name=url>`

Specify named registry hosts by their prefix. To set the default registry used for non-namespaced specifiers, use the `--registry` option.

Prefixes can be used as a package alias. For example:

```bash title="Terminal"
​​$ vlt --registries loc=http://reg.local install foo@loc:foo@1.x
```

The `npm:` (vlt's public npm mirror) and `gh:` (GitHub Packages) prefixes are built in and can be overridden here. A name used by `--jsr-registries` or `--git-hosts` (e.g. `jsr`, `github`), or a built-in protocol (e.g. `file`), is an error.

Aliases given on the command line or in `VLT_REGISTRIES` merge with the configured ones, later sources winning per key. Pass [`--save-config`](https://docs.vlt.io/client/configuring#--save-config) to `vlt install`, `vlt add` or `vlt update` to save them to `vlt.json`. See [Registries](https://docs.vlt.io/client/registries.md#saving-registries-given-to-install).

Can be set multiple times

### `--scoped-registries=<@scope=url>`

Map package name scopes to registry URLs.

For example, `--scoped-registries @acme=https://registry.acme/` would tell vlt to fetch any packages named `@acme/...` from the `https://registry.acme/` registry.

Note: this way of specifying registries is more ambiguous, compared with using the `--registries` field and explicit prefixes, because instead of failing when the configuration is absent, it will instead attempt to fetch from the default registry.

By comparison, using `--registries acme=https://registry.acme/` and then specifying dependencies such as `"foo": "acme:foo@1.x"` means that regardless of the name, the package will be fetched from the explicitly named registry, or fail if no registry is defined with that name.

However, custom registry aliases are not supported by other package managers.

Can be set multiple times

### `-G<name=template> --git-hosts=<name=template>`

Map a shorthand name to a git remote URL template.

The `template` may contain placeholders, which will be swapped with the relevant values.

`$1`, `$2`, etc. are replaced with the appropriate n-th path portion. For example, `github:user/project` would replace the `$1` in the template with `user`, and `$2` with `project`.

Can be set multiple times

### `-A<name=template> --git-host-archives=<name=template>`

Similar to the `--git-host <name>=<template>` option, this option can define a template string that will be expanded to provide the URL to download a pre-built tarball of the git repository.

In addition to the n-th path portion expansions performed by `--git-host`, this field will also expand the string `$committish` in the template, replacing it with the resolved git committish value to be fetched. A repo without a ref gets `HEAD`. With a template without `$committish`, repos without a ref and `::path:` / `#semver:` deps are cloned instead.

`github`, `gitlab`, `bitbucket` and `gist` have default templates; a name set here replaces its default. The `github` default downloads from `codeload.github.com` without a token, so private repos 404: for those, set `github=https://api.github.com/repos/$1/$2/tarball/$committish` and add a GitHub token with `vlt token add --registry=https://api.github.com`. See [Private GitHub repositories](https://docs.vlt.io/client/commands/install.md#private-github-repositories).

Can be set multiple times

### `--cache=<path>`

Location of the vlt on-disk cache. Defaults to the platform-specific directory recommended by the XDG specification.

### `-g --global`

Operate on the global project instead of the current one. Supported by `install`, `uninstall`, `list`, `query` and `build`. See [Global installs](https://docs.vlt.io/client/commands/install.md#global-installs).

### `--global-dir=<path>`

Location of the global project used by `--global`. Defaults to `vlt/global` in the XDG data directory. Only read from the command line, environment or the user config, never from a project `vlt.json`, so set it with `vlt config set --config=user global-dir=<path>`.

A leading `~` is the home directory. Relative paths on the command line or in `VLT_GLOBAL_DIR` resolve from the current directory; in the user config the path must be absolute.

To keep the global project under version control, see [Best practices](https://docs.vlt.io/client/global-installs.md#best-practices).

### `--global-bin-dir=<path>`

Folder where bins of global packages are linked. Defaults to the folder of the `vlt` found in your `PATH` when it is writable, so bins run right away. If it is not writable, `~/.local/bin` is used when it is in your `PATH` (not on Windows), otherwise `<global-dir>/bin`. Only read from the command line, environment or the user config, never from a project `vlt.json`, so set it with `vlt config set --config=user global-bin-dir=<path>`.

A leading `~` is the home directory. Relative paths on the command line or in `VLT_GLOBAL_BIN_DIR` resolve from the current directory; in the user config the path must be absolute.

### `--no-modify-path`

Never edit shell config files (or the user `Path` on Windows) to add a folder to your `PATH`: turns off [`vlt setup --path`](https://docs.vlt.io/client/commands/setup.md#add-global-bins-to-your-path) edits and the `vlt install -g` offer (printing the line to add instead), and the `vlt setup` PATH prompt. Set `VLT_NO_MODIFY_PATH=1` (any value but `0`) in images or on machines whose dotfiles are managed elsewhere.

### `--store-linker=<auto | hardlink | clone | copy | unpack>`

How packages are placed in `node_modules`. Every linker but `unpack` fills a global store under `cache` in the background, then places packages from it.

- auto: Default. On Linux, hardlink from the global store, copying any file that cannot be linked. On macOS, clone from it, on a Node with `node:ffi` (26.1 and later, and `--allow-ffi` under `--permission`); a hardlink is the slowest way to place a file on APFS, so macOS without it, and Windows, unpack by default.
- hardlink: Hardlink from the global store on every platform.
- clone: Clone each package directory from the global store copy-on-write (`clonefile`, macOS on APFS). Files share storage with the store until edited, so editing in place is safe. Unpacks where cloning fails.
- copy: Copy from the global store. Use this when editing files in `node_modules` in place, since a hardlink shares its content with every project.
- unpack: Unpack each package tarball, skipping the global store.

A hardlinked package is copied right before its install scripts run, so they don't change its files in the store; a cloned one needs no copy. An invalid `VLT_STORE_LINKER` warns and uses `unpack`. See [Global store](https://docs.vlt.io/client/commands/cache.md#global-store).

Valid options: "auto", "hardlink", "clone", "copy", "unpack"

### `--brotli-tarballs`

Resolve to the Brotli (`.tar.br`) tarball when the registry advertises one for a version, transferring far less than the gzip `.tgz`. On by default; `--no-brotli-tarballs` always resolves to the `.tgz`.

A `.tar.br` is its own artifact, not a re-encoding of the `.tgz`: it hashes differently, and the registry labels it with its own RFC 9530 `Repr-Digest`, which is what verifies the download. So a version installed this way records _that_ hash in `vlt-lock.json`, alongside a flag marking which artifact the entry describes.

An existing lockfile keeps whichever artifact it already pinned, the same as any other resolved URL — set `--no-brotli-tarballs` before the versions are resolved to pin `.tgz` files instead.

Registries that advertise no alternates are unaffected.

### `--tag=<tag>`

Default `dist-tag` to install

### `--before=<date>`

Do not install any packages published after this date

### `--os=<os>`

The operating system to use as the selector when choosing packages based on their `os` value.

### `--arch=<arch>`

CPU architecture to use as the selector when choosing packages based on their `cpu` value.

### `--node-version=<version>`

Node version to use when choosing packages based on their `engines.node` value.

### `--git-shallow`

Set to force `--depth=1` on all git clone actions. When set explicitly to false with --no-git-shallow, then `--depth=1` will not be used.

When not set explicitly, `--depth=1` will be used for git hosts known to support this behavior.

### `--fetch-retries=<n>`

Number of retries to perform when encountering network errors or likely-transient errors from git hosts.

### `--fetch-retry-factor=<n>`

The exponential backoff factor to use when retrying requests due to network issues.

### `--fetch-retry-mintimeout=<n>`

Number of milliseconds before starting first retry

### `--fetch-retry-maxtimeout=<n>`

Maximum number of milliseconds between two retries

### `--telemetry`

Anonymous usage telemetry, on by default. Opt out with `--no-telemetry`, `VLT_TELEMETRY=0`, `DO_NOT_TRACK=1` or `"telemetry": false` in `vlt.json` `config`. Sent in one attempt at exit, no retries; failures are ignored.

### `-i<name> --identity=<name>`

Provide a string to define an identity for storing auth information when logging into registries.

Authentication tokens will be stored in the XDG data directory, in `vlt/auth/${identity}/keychain.json`.

If no identity is provided, then the default `''` will be used, storing the file at `vlt/auth/keychain.json`.

May only contain lowercase alphanumeric characters.

### `-w<ws> --workspace=<ws>`

Set to limit the spaces being worked on when working on workspaces.

Can be paths or glob patterns matching paths.

Specifying workspaces by package.json name is not supported.

Can be set multiple times

### `--workspace-group=<workspace-group>`

Specify named workspace group names to load and operate on when doing recursive operations on workspaces.

Can be set multiple times

### `-r --recursive`

Run an operation across multiple workspaces.

No effect when used in non-monorepo projects.

Implied by setting --workspace or --workspace-group. If not set, then the action is run on the project root.

### `-b --bail`

When running scripts across multiple workspaces, stop on the first failure.

### `-B --no-bail`

When running scripts across multiple workspaces, continue on failure, running the script for all workspaces.

### `--config=<all | user | project>`

Specify which configuration to show or operate on when running `vlt config` commands, and which file `vlt skills link` saves `allow-skills` to and `vlt build` saves `allow-scripts` to.

For read operations (`get`, `pick`, `list`): `all` shows merged configuration from both user and project files (default).

For write operations (`set`, `delete`, `edit`): defaults to `project`. `user` shows/modifies only user-level configuration, `project` shows/modifies only project-level configuration.

Valid options: "all", "user", "project"

### `--editor=<program>`

The blocking editor to use for `vlt config edit` and any other cases where a file should be opened for editing.

Defaults to the `EDITOR` or `VISUAL` env if set, or `notepad.exe` on Windows, or `vi` elsewhere.

### `--script-shell=<program>`

The shell to use when executing `package.json#scripts` (either as lifecycle scripts or explicitly with `vlt run`) and `vlt exec`.

If not set, defaults to `/bin/sh` on POSIX systems, and `cmd.exe` on Windows.

When no argument is provided to `vlt exec`, the `SHELL` environment variable takes precedence if set.

### `--fallback-command=<command>`

The command to run when the first argument doesn't match any known commands.

For pnpm-style behavior, set this to 'run-exec'. e.g:

```bash title="Terminal"
​​$ ​​vlt config set fallback-command=run-exec
```

Valid options:

```
"cache", "config", "exec", "exec-local",
"help", "init", "install", "login", "logout",
"list", "ls", "pkg", "query", "run-exec", "run", "serve",
"token", "uninstall", "exec-cache", "whoami"
```

### `--package=<p>`

When running `vlt exec`, this allows you to explicitly set the package to search for bins. If not provided, then vlt will interpret the first argument as the package, and attempt to run the default executable.

### `--view=<output>`

Configures the output format for commands. Valid options: "human", "json", "mermaid", "count"

### `--dashboard-root=<path>`

The root directory to use for the dashboard browser-based UI. If not set, the user home directory is used.

Can be set multiple times

### `-D --save-dev`

Save installed packages to a package.json file as devDependencies

### `-O --save-optional`

Save installed packages to a package.json file as optionalDependencies

### `--save-peer`

Save installed packages to a package.json file as peerDependencies

### `-P --save-prod`

Save installed packages into dependencies specifically. This is useful if a package already exists in devDependencies or optionalDependencies, but you want to move it to be a non-optional production dependency.

### `--save-types`

For each added registry package that ships no TypeScript types of its own (no `types`, `typings` or `typesVersions` field, no `types` condition in its root `exports` entry), also save the newest non-deprecated `@types/*` package in the same major version (major.minor for `0.x`) to `devDependencies` (`@scope/pkg` → `@types/scope__pkg`). If that major has none, the `@types/*` `latest` version is used when it is older and not deprecated. Skipped when there is no such version, the `@types/*` package is already a dependency (any version), or the package comes from a different registry than `@types/*`.

Enable for every install with `"config": { "save-types": true }` in `vlt.json`; turn off for one run with `--no-save-types`.

### `--migrate-workspaces`

On by default. `vlt install` saves workspaces read from the `workspaces` field of the root `package.json` or from `pnpm-workspace.yaml` to the project `vlt.json`, which then takes precedence. Each install also saves dependencies that link a workspace by a plain range or dist-tag as `workspace:*`. Set `--no-migrate-workspaces` or `"config": { "migrate-workspaces": false }` in `vlt.json` to skip this; an already saved `workspaces` field stays until removed. See [Workspaces](https://docs.vlt.io/client/workspaces.md#saving-workspaces-to-vltjson).

### `--save-config`

Save the registry and git host options given on the command line or via `VLT_*` env (`--registry`, `--registries`, `--default-registry-alias`, `--scoped-registries`, `--jsr-registries`, `--git-hosts`, `--git-host-archives`) to the project `vlt.json` (or the user one with `--config=user`) after a successful `install`, `add` or `update`. Values a config file already has are left alone. See [Registries](https://docs.vlt.io/client/registries.md#saving-registries-given-to-install).

### `--allow-scripts=<query>`

Run the lifecycle scripts of installed packages matching this DSS query. Default `:not(*)`: no scripts run.

`vlt install` and `vlt update` save `--allow-scripts=<query>` to the project `vlt.json`; `vlt build [<query>]` sets, saves and applies it. See [`vlt build`](https://docs.vlt.io/client/commands/build.md#allow-scripts).

### `--allow-skills=<query>`

Link the agent skills (folders with a `SKILL.md`) shipped by installed packages matching this DSS query into the project's agent skill dirs (see `--skills-dir`) after `install`, `ci`, `update` or `uninstall`. End a selector with `:skill(<name>, …)` to pick single skills (`*` globs, double-quoted names). Unset (the default) or `:not(*)` links nothing and skips all skills work.

`vlt install --allow-skills=<query>` saves the query to the project `vlt.json`; `vlt skills link [<query>]` sets, saves and applies it.

Example: `--allow-skills="#agent-browser:skill(agent-browser)"` links the `agent-browser` skill from a package with the same name. See [`vlt skills`](https://docs.vlt.io/client/commands/skills.md#pick-skills).

### `--skills-dir=<path>`

Dirs to link agent skills into, relative to the project root. Can be set multiple times. Each dir must be inside the project, not in `node_modules`.

| Value                      | Meaning                                                                                                      |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| unset                      | detect, see [Where skills are linked](https://docs.vlt.io/client/commands/skills.md#where-skills-are-linked) |
| `[]` in `vlt.json`         | link nothing                                                                                                 |
| `--skills-dir=`            | link nothing                                                                                                 |
| `null` in `vlt.json`       | back to detection                                                                                            |
| a list on the command line | replaces the `vlt.json` list                                                                                 |

### `--update-notifier`

On by default. Checks for newer vlt versions in a detached process, at most once per check interval (24 hours by default). A later command prints a cached update notice to stderr after its output. The same notice is shown at most once per check interval.

```
Update available: vlt 1.8.0 -> 1.8.1
vlt install -g vlt@1.8.1
```

The second line is the command that updates vlt to that version, see [Updating vlt](https://docs.vlt.io/client/commands/install.md#updating-vlt).

Disable with `--no-update-notifier`, `"config": { "update-notifier": false }` in `vlt.json`, `VLT_UPDATE_NOTIFIER=0`, or any non-empty `VLT_NO_UPDATE_NOTIFIER` or `NO_UPDATE_NOTIFIER` value (including `0`). `VLT_UPDATE_NOTIFIER=1` turns it on; any other value, including `true`, turns it off.

Checks and notices are skipped in CI, with non-TTY stderr, with any view other than `human` (the default view is `json` when stdout is piped or redirected), while `vlt install -g vlt` updates vlt, for commands run from a package script, for a vlt installed in a project's `node_modules`, and for development builds and ephemeral installs through `vlx` or `npx`. They are also skipped for `--help`, `--version`, failing commands, `vlt ci`, and `vlt exec` (`vlx`), whatever it runs. `VLT_OFFLINE=1`, `VLT_OFFLINE=true`, and `npm_config_offline=true` also suppress them. This does not put other vlt commands into an offline mode.

The check asks vlt's [public npm mirror](https://docs.vlt.io/registry/public-mirror.md), `https://registry.vlt.io/upstream/npm/`, whatever registry is configured. Each check is one anonymous request to registry.vlt.io; failures stay silent, and a failed check is retried after an hour (or after the check interval, if shorter). State is stored in `update-check.json` under vlt's XDG state directory.

### `--update-check-interval`

Seconds between update checks and repeated notices. Defaults to `86400` (24 hours); must be a positive number. Can also be set as `VLT_UPDATE_CHECK_INTERVAL` or in the `config` object in `vlt.json`. An invalid `VLT_UPDATE_CHECK_INTERVAL` uses the default.

### `-v --version`

Print the version

### `-h --help`

Print helpful information
