---
title: "@vltpkg/cli-sdk: config — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/cli-sdk/config"
image: "https://docs.vlt.io/og/client/api-reference/cli-sdk/config"
lang: "en"
---

# config

Module that handles all vlt configuration needs

Project-level configs are set in a `vlt.json` file in the local project if present, and are layered over the user-level configs in the appropriate XDG config path. See `./merge-layers.ts` for the layering rules.

Command-specific configuration can be specified by putting options in a field in the `command` object. For example:

```json
{
  "registry": "https://registry.npmjs.org/",
  "command": {
    "publish": {
      "registry": "http://registry.internal"
    }
  }
}
```

## Classes

### Config

Defined in: src/cli-sdk/src/config/index.ts:312

Class that handles configuration for vlt.

Call [Config.load](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#load) to get one of these.

#### Constructors

##### new Config()

```ts
new Config(jack, projectRoot): Config
```

Defined in: src/cli-sdk/src/config/index.ts:483

###### Parameters

| Parameter     | Type      | Default value |
| ------------- | --------- | ------------- |
| `jack`        | `Jack`<…> | `definition`  |
| `projectRoot` | `string`  | `...`         |

###### Returns

[`Config`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#config)

#### Properties

| Property                    | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Default value  | Description                                                                                                                                                                                                                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command?`                  | \| `"version"` \| `"registry"` \| `"cache"` \| `"config"` \| `"skills"` \| `"query"` \| `"help"` \| `"access"` \| `"bugs"` \| `"build"` \| `"ci"` \| `"deploy"` \| `"create"` \| `"deprecate"` \| `"dist-tag"` \| `"docs"` \| `"exec"` \| `"exec-local"` \| `"init"` \| `"install"` \| `"login"` \| `"logout"` \| `"list"` \| `"outdated"` \| `"pack"` \| `"ping"` \| `"pkg"` \| `"profile"` \| `"publish"` \| `"repo"` \| `"run-exec"` \| `"run"` \| `"setup"` \| `"token"` \| `"uninstall"` \| `"unpublish"` \| `"update"` \| `"exec-cache"` \| `"view"` \| `"whoami"` | `undefined`    | Which command name to use for overriding with command-specific values, determined from the argv when parse() is called.                                                                                                                                                                                  |
| `commands`                  | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `undefined`    | `Record<alias, canonical name>` to dereference command aliases.                                                                                                                                                                                                                                          |
| `commands.?`                | `"help"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'help'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.access`           | `"access"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'access'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.add`              | `"install"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'install'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.b`                | `"build"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'build'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.bugs`             | `"bugs"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'bugs'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.build`            | `"build"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'build'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.cache`            | `"cache"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'cache'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.ci`               | `"ci"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | `'ci'`         | -                                                                                                                                                                                                                                                                                                        |
| `commands.config`           | `"config"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'config'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.create`           | `"create"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'create'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.deploy`           | `"deploy"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'deploy'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.deprecate`        | `"deprecate"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `'deprecate'`  | -                                                                                                                                                                                                                                                                                                        |
| `commands.dist-tag`         | `"dist-tag"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `'dist-tag'`   | -                                                                                                                                                                                                                                                                                                        |
| `commands.docs`             | `"docs"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'docs'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.exec`             | `"exec"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'exec'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.exec-cache`       | `"exec-cache"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | `'exec-cache'` | -                                                                                                                                                                                                                                                                                                        |
| `commands.exec-local`       | `"exec-local"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | `'exec-local'` | -                                                                                                                                                                                                                                                                                                        |
| `commands.h`                | `"help"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'help'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.help`             | `"help"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'help'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.i`                | `"install"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'install'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.info`             | `"view"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'view'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.init`             | `"init"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'init'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.install`          | `"install"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'install'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.list`             | `"list"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'list'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.login`            | `"login"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'login'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.logout`           | `"logout"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'logout'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.ls`               | `"list"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'list'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.outdated`         | `"outdated"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `'outdated'`   | -                                                                                                                                                                                                                                                                                                        |
| `commands.p`                | `"pkg"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `'pkg'`        | -                                                                                                                                                                                                                                                                                                        |
| `commands.pack`             | `"pack"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'pack'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.ping`             | `"ping"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'ping'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.pkg`              | `"pkg"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `'pkg'`        | -                                                                                                                                                                                                                                                                                                        |
| `commands.profile`          | `"profile"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'profile'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.pub`              | `"publish"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'publish'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.publish`          | `"publish"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'publish'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.q`                | `"query"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'query'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.query`            | `"query"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'query'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.r`                | `"run"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `'run'`        | -                                                                                                                                                                                                                                                                                                        |
| `commands.registry`         | `"registry"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `'registry'`   | -                                                                                                                                                                                                                                                                                                        |
| `commands.repo`             | `"repo"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'repo'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.rm`               | `"uninstall"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `'uninstall'`  | -                                                                                                                                                                                                                                                                                                        |
| `commands.run`              | `"run"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `'run'`        | -                                                                                                                                                                                                                                                                                                        |
| `commands.run-exec`         | `"run-exec"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `'run-exec'`   | -                                                                                                                                                                                                                                                                                                        |
| `commands.run-script`       | `"run"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | `'run'`        | -                                                                                                                                                                                                                                                                                                        |
| `commands.rx`               | `"run-exec"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | `'run-exec'`   | -                                                                                                                                                                                                                                                                                                        |
| `commands.setup`            | `"setup"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'setup'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.show`             | `"view"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'view'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.skills`           | `"skills"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'skills'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.token`            | `"token"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `'token'`      | -                                                                                                                                                                                                                                                                                                        |
| `commands.u`                | `"update"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'update'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.uninstall`        | `"uninstall"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `'uninstall'`  | -                                                                                                                                                                                                                                                                                                        |
| `commands.unpublish`        | `"unpublish"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | `'unpublish'`  | -                                                                                                                                                                                                                                                                                                        |
| `commands.update`           | `"update"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'update'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.version`          | `"version"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `'version'`    | -                                                                                                                                                                                                                                                                                                        |
| `commands.view`             | `"view"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'view'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.whoami`           | `"whoami"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | `'whoami'`     | -                                                                                                                                                                                                                                                                                                        |
| `commands.x`                | `"exec"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `'exec'`       | -                                                                                                                                                                                                                                                                                                        |
| `commands.xc`               | `"exec-cache"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | `'exec-cache'` | -                                                                                                                                                                                                                                                                                                        |
| `commands.xl`               | `"exec-local"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | `'exec-local'` | -                                                                                                                                                                                                                                                                                                        |
| `commandValues`             | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `{}`           | Command-specific config values                                                                                                                                                                                                                                                                           |
| `commandValues.access?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.bugs?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.build?`      | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.cache?`      | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.ci?`         | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.config?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.create?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.deploy?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.deprecate?`  | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.dist-tag?`   | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.docs?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.exec?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.exec-cache?` | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.exec-local?` | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.help?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.init?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.install?`    | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.list?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.login?`      | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.logout?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.outdated?`   | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.pack?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.ping?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.pkg?`        | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.profile?`    | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.publish?`    | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.query?`      | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.registry?`   | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.repo?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.run?`        | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.run-exec?`   | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.setup?`      | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.skills?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.token?`      | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.uninstall?`  | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.unpublish?`  | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.update?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.version?`    | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.view?`       | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `commandValues.whoami?`     | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `undefined`    | -                                                                                                                                                                                                                                                                                                        |
| `explicit`                  | [`ConfigData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdata)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | `{}`           | Values set on the command line or via `VLT_*` env for this run. Record fields hold only those `key=value` pairs, not the ones from config files. `VLT_*` env left as a parent vlt process wrote it only counts for what was explicit in that parent.                                                     |
| `globalBinDir?`             | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `undefined`    | `--global-bin-dir` from cli, env or user config, set with `globalRoot`.                                                                                                                                                                                                                                  |
| `globalRoot?`               | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `undefined`    | Global project root, set when `--global` switched to it.                                                                                                                                                                                                                                                 |
| `jack`                      | `Jack`<…>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | `undefined`    | The [JackSpeak](https://npmjs.com/jackspeak) object representing vlt's configuration                                                                                                                                                                                                                     |
| `positionals?`              | `string`\[]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | `undefined`    | positional arguments to the vlt process                                                                                                                                                                                                                                                                  |
| `projectRoot`               | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | `undefined`    | The root of the project where a vlt.json, vlt.json, package.json, or .git was found. Not necessarily the `process.cwd()`, though that is the default location. Never walks up as far as `$HOME`. So for example, if a project is in `~/projects/xyz`, then the highest dir it will check is `~/projects` |
| `values?`                   | `OptionsResults`<…>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | `undefined`    | Parsed values in effect                                                                                                                                                                                                                                                                                  |

#### Accessors

##### layers

###### Get Signature

```ts
get layers(): Readonly<{
  project: Partial<PairsAsRecords>;
  user: Partial<PairsAsRecords>;
}>
```

Defined in: src/cli-sdk/src/config/index.ts:817

The raw config data from each `vlt.json` file, normalized to record form, before the layers are merged together. `undefined` for a layer with no file, or a file with no `config` field.

###### Returns

`Readonly`<{ `project`: `Partial`<[`PairsAsRecords`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#pairsasrecords)>; `user`: `Partial`<[`PairsAsRecords`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#pairsasrecords)>; }>

##### options

###### Get Signature

```ts
get options(): ConfigOptions
```

Defined in: src/cli-sdk/src/config/index.ts:334

A flattened object of the parsed configuration

###### Returns

[`ConfigOptions`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configoptions)

#### Methods

##### abort()

```ts
abort(): void
```

Defined in: src/cli-sdk/src/config/index.ts:421

Abort requests still in flight

###### Returns

`void`

##### addConfigToFile()

```ts
addConfigToFile(
   this, 
   which, 
values): Promise<void>
```

Defined in: src/cli-sdk/src/config/index.ts:735

Fold in the provided fields with the existing properties in the config file.

###### Parameters

| Parameter | Type                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------ |
| `this`    | [`ParsedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#parsedconfig)                    |
| `which`   | [`WhichConfig`](https://docs.vlt.io/client/api-reference/vlt-json/reference.md#whichconfig)                  |
| `values`  | `NonNullable`<[`ConfigFileData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configfiledata)> |

###### Returns

`Promise`<`void`>

##### deleteConfigKeys()

```ts
deleteConfigKeys(
   this, 
   which, 
fields): Promise<boolean>
```

Defined in: src/cli-sdk/src/config/index.ts:878

Deletes the specified config fields from the named file Returns `true` if anything was changed.

###### Parameters

| Parameter | Type                                                                                        |
| --------- | ------------------------------------------------------------------------------------------- |
| `this`    | [`ParsedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#parsedconfig)   |
| `which`   | [`WhichConfig`](https://docs.vlt.io/client/api-reference/vlt-json/reference.md#whichconfig) |
| `fields`  | `string`\[]                                                                                 |

###### Returns

`Promise`<`boolean`>

##### editConfigFile()

```ts
editConfigFile(
   this, 
   which, 
edit): Promise<void>
```

Defined in: src/cli-sdk/src/config/index.ts:931

Edit the user or project configuration file.

If the file isn't present, then it starts with `{}` so the user has something to work with.

If the result is not valid, or no config settings are contained in the file after editing, then it's restored to what it was before, which might mean deleting the file.

###### Parameters

| Parameter | Type                                                                                        |
| --------- | ------------------------------------------------------------------------------------------- |
| `this`    | [`ParsedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#parsedconfig)   |
| `which`   | [`WhichConfig`](https://docs.vlt.io/client/api-reference/vlt-json/reference.md#whichconfig) |
| `edit`    | (`file`) => `void` \| `Promise`<`void`>                                                     |

###### Returns

`Promise`<`void`>

##### get()

```ts
get<K>(k): OptionsResults<…>[K]
```

Defined in: src/cli-sdk/src/config/index.ts:712

Get a configuration value.

Note: `key=value` pair configs are returned as a string array. To get them as an object, use [Config#getRecord](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#getrecord).

###### Type Parameters

| Type Parameter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `K` _extends_ \| `"version"` \| `"color"` \| `"no-color"` \| `"registry"` \| `"default-registry-alias"` \| `"registries"` \| `"scoped-registries"` \| `"jsr-registries"` \| `"git-hosts"` \| `"git-host-archives"` \| `"cache"` \| `"path"` \| `"config"` \| `"store-linker"` \| `"tag"` \| `"before"` \| `"os"` \| `"arch"` \| `"libc"` \| `"node-version"` \| `"git-shallow"` \| `"update-check-interval"` \| `"fetch-retries"` \| `"fetch-retry-factor"` \| `"fetch-retry-mintimeout"` \| `"fetch-retry-maxtimeout"` \| `"stale-while-revalidate-factor"` \| `"identity"` \| `"workspace"` \| `"workspace-group"` \| `"global"` \| `"global-dir"` \| `"global-bin-dir"` \| `"skills"` \| `"no-modify-path"` \| `"scope"` \| `"target"` \| `"if-present"` \| `"recursive"` \| `"bail"` \| `"no-bail"` \| `"all"` \| `"editor"` \| `"script-shell"` \| `"fallback-command"` \| `"help"` \| `"access"` \| `"view"` \| `"package"` \| `"call"` \| `"loglevel"` \| `"verbose"` \| `"dashboard-root"` \| `"save-dev"` \| `"save-exact"` \| `"save-optional"` \| `"save-peer"` \| `"save-prod"` \| `"save-types"` \| `"save-config"` \| `"migrate-workspaces"` \| `"save-prefix"` \| `"expect-results"` \| `"dry-run"` \| `"force"` \| `"expect-lockfile"` \| `"frozen-lockfile"` \| `"lockfile-only"` \| `"brotli-tarballs"` \| `"allow-scripts"` \| `"allow-skills"` \| `"skills-dir"` \| `"git-tag-version"` \| `"commit"` \| `"otp"` \| `"publish-directory"` \| `"telemetry"` \| `"update-notifier"` \| `"yes"` |

###### Parameters

| Parameter | Type |
| --------- | ---- |
| `k`       | `K`  |

###### Returns

`OptionsResults`<…>\[`K`]

##### getRecord()

```ts
getRecord(k): RecordString
```

Defined in: src/cli-sdk/src/config/index.ts:688

Get a `key=value` list option value as an object.

For example, a list option with a vlaue of `['key=value', 'xyz=as=df' ]` would be returned as `{key: 'value', xyz: 'as=df'}`

Results are memoized, so subsequent calls for the same key will return the same object. If new strings are added to the list, then the memoized value is _not_ updated, so only use once configurations have been fully loaded.

If the config value is not set at all, an empty object is returned.

###### Parameters

| Parameter | Type                                                                                                                                                                                       |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `k`       | \| `"registries"` \| `"scoped-registries"` \| `"jsr-registries"` \| `"git-hosts"` \| `"git-host-archives"` \| `"workspace"` \| `"workspace-group"` \| `"dashboard-root"` \| `"skills-dir"` |

###### Returns

[`RecordString`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#recordstring)

##### globalProject()

```ts
globalProject(): 
  | undefined
  | {
  binDir: string;
  root: string;
}
```

Defined in: src/cli-sdk/src/config/index.ts:465

The global project (`--global-dir`, `--global-bin-dir`: cli > env > user config, never a project `vlt.json`): the one switched to by `--global`, or the one `vlt setup` offers PATH setup for.

###### Returns

\| `undefined` | { `binDir`: `string`; `root`: `string`; }

##### loadConfigFile()

```ts
loadConfigFile(args?): Promise<Config>
```

Defined in: src/cli-sdk/src/config/index.ts:976

Find the local config file and load both it and the user-level config in the XDG config home.

When `args` select a `--global` command, the global project is used instead of the current one.

###### Parameters

| Parameter | Type        |
| --------- | ----------- |
| `args`?   | `string`\[] |

###### Returns

`Promise`<[`Config`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#config)>

##### parse()

```ts
parse(args): Config & object
```

Defined in: src/cli-sdk/src/config/index.ts:495

Parse the arguments and set configuration and positionals accordingly.

###### Parameters

| Parameter | Type        | Default value  |
| --------- | ----------- | -------------- |
| `args`    | `string`\[] | `process.argv` |

###### Returns

[`Config`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#config) & `object`

##### reloadFromDisk()

```ts
reloadFromDisk(): Promise<void>
```

Defined in: src/cli-sdk/src/config/index.ts:1086

Force a complete reload of config files from disk. This clears all caches and re-reads config files. Useful for long-running processes that need to pick up config changes.

###### Returns

`Promise`<`void`>

##### resetOptions()

```ts
resetOptions(projectRoot): void
```

Defined in: src/cli-sdk/src/config/index.ts:407

Reset the options value, optionally setting a new project root to recalculate the options.

###### Parameters

| Parameter     | Type     |
| ------------- | -------- |
| `projectRoot` | `string` |

###### Returns

`void`

##### writeConfigFile()

```ts
writeConfigFile(
   this, 
   which, 
values): Promise<void>
```

Defined in: src/cli-sdk/src/config/index.ts:722

Write the config values to the user or project config file.

###### Parameters

| Parameter | Type                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------ |
| `this`    | [`ParsedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#parsedconfig)                    |
| `which`   | [`WhichConfig`](https://docs.vlt.io/client/api-reference/vlt-json/reference.md#whichconfig)                  |
| `values`  | `NonNullable`<[`ConfigFileData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configfiledata)> |

###### Returns

`Promise`<`void`>

##### load()

```ts
static load(
   projectRoot, 
   argv, 
allowGlobal): Promise<ParsedConfig>
```

Defined in: src/cli-sdk/src/config/index.ts:1120

Load the configuration and return a Promise to a [Config](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#config) object

###### Parameters

| Parameter     | Type        | Default value  | Description                                |
| ------------- | ----------- | -------------- | ------------------------------------------ |
| `projectRoot` | `string`    | `...`          | -                                          |
| `argv`        | `string`\[] | `process.argv` | -                                          |
| `allowGlobal` | `boolean`   | `true`         | switch to the global project on `--global` |

###### Returns

`Promise`<[`ParsedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#parsedconfig)>

## Type Aliases

### ConfigData

```ts
type ConfigData = ConfigDataNoCommand & object;
```

Defined in: src/cli-sdk/src/config/index.ts:247

Config data can be any options, and also a 'command' field which contains command names and override options for that command.

#### Type declaration

| Name       | Type                                              |
| ---------- | ------------------------------------------------- |
| `command`? | `{ [k in keyof Commands]?: ConfigDataNoCommand }` |

---

### ConfigDataNoCommand

```ts
type ConfigDataNoCommand = { [k in keyof OptionsResults<ConfigDefinitions>]?: OptionsResults<ConfigDefinitions>[k] };
```

Defined in: src/cli-sdk/src/config/index.ts:237

---

### ConfigDefinitions

```ts
type ConfigDefinitions = Unwrap<typeof definition>;
```

Defined in: src/cli-sdk/src/config/index.ts:297

The base config definition set as a type

---

### ConfigFileData

```ts
type ConfigFileData = ConfigFileDataNoCommand & object;
```

Defined in: src/cli-sdk/src/config/index.ts:265

Config data as it appears in the config field of the vlt.json, with kv pair lists stored as `Record<string, string>` and

#### Type declaration

| Name       | Type                                                  |
| ---------- | ----------------------------------------------------- |
| `command`? | `{ [k in keyof Commands]?: ConfigFileDataNoCommand }` |

---

### ConfigFileDataNoCommand

```ts
type ConfigFileDataNoCommand = { [k in keyof ConfigDataNoCommand]: k extends OptListKeys<ConfigDataNoCommand> ? RecordString | string[] : ConfigDataNoCommand[k] };
```

Defined in: src/cli-sdk/src/config/index.ts:253

---

### ConfigFileLayer

```ts
type ConfigFileLayer = Partial<PairsAsRecords>;
```

Defined in: src/cli-sdk/src/config/index.ts:108

One `vlt.json` file's `config` object, in record form. Every field is optional, since a config file only sets what it sets.

---

### ConfigOptions

```ts
type ConfigOptions = Omit<ConfigOptionsNoExtras, "path"> & Pick<SpecOptions, "catalog" | "catalogs"> & object;
```

Defined in: src/cli-sdk/src/config/index.ts:281

#### Type declaration

| Name          | Type                                                                                                        | Description                      |
| ------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------- |
| `monorepo`?   | [`Monorepo`](https://docs.vlt.io/client/api-reference/workspaces/reference.md#monorepo)                     | -                                |
| `packageInfo` | [`PackageInfoClient`](https://docs.vlt.io/client/api-reference/package-info/reference.md#packageinfoclient) | -                                |
| `packageJson` | [`PackageJson`](https://docs.vlt.io/client/api-reference/package-json/reference.md#packagejson)             | -                                |
| `projectRoot` | `string`                                                                                                    | -                                |
| `scurry`      | [`PathScurry`](https://isaacs.github.io/path-scurry/)                                                       | -                                |
| `signal`      | `AbortSignal`                                                                                               | aborted when the command fails   |
| `storeRoot`   | `string`                                                                                                    | global store root, under `cache` |

---

### ConfigOptionsNoExtras

```ts
type ConfigOptionsNoExtras = { [k in keyof OptionsResults<ConfigDefinitions>]: k extends RecordField ? RecordString : k extends "command" ? never : OptionsResults<ConfigDefinitions>[k] };
```

Defined in: src/cli-sdk/src/config/index.ts:271

---

### LoadedConfig

```ts
type LoadedConfig = ParsedConfig;
```

Defined in: src/cli-sdk/src/config/index.ts:1151

A fully loaded [Config](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#config) object

---

### OptListKeys\<O>

```ts
type OptListKeys<O> = Exclude<StringListKeys<O>[keyof StringListKeys<O>], undefined>;
```

Defined in: src/cli-sdk/src/config/index.ts:302

#### Type Parameters

| Type Parameter |
| -------------- |
| `O`            |

---

### PairsAsRecords

```ts
type PairsAsRecords = ConfigOptionsNoExtras & object;
```

Defined in: src/cli-sdk/src/config/index.ts:98

#### Type declaration

| Name       | Type                                                |
| ---------- | --------------------------------------------------- |
| `command`? | `{ [k in keyof Commands]?: ConfigOptionsNoExtras }` |

---

### ParsedConfig

```ts
type ParsedConfig = Config & object;
```

Defined in: src/cli-sdk/src/config/index.ts:1142

#### Type declaration

| Name          | Type                                                                                                                  |
| ------------- | --------------------------------------------------------------------------------------------------------------------- |
| `command`     | `NonNullable`<[`Config`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#config)\[`"command"`]>            |
| `positionals` | `string`\[]                                                                                                           |
| `values`      | `OptionsResults`<[`ConfigDefinitions`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configdefinitions)> |

---

### RecordPairs

```ts
type RecordPairs = Record<string, unknown>;
```

Defined in: src/cli-sdk/src/config/index.ts:73

---

### RecordString

```ts
type RecordString = Record<string, string>;
```

Defined in: src/cli-sdk/src/config/index.ts:74

---

### StringListKeys\<O>

```ts
type StringListKeys<O> = { [k in keyof O]: O[k] extends string[] | undefined ? k : never };
```

Defined in: src/cli-sdk/src/config/index.ts:299

#### Type Parameters

| Type Parameter |
| -------------- |
| `O`            |

## Variables

### kCustomInspect

```ts
const kCustomInspect: typeof kCustomInspect;
```

Defined in: src/cli-sdk/src/config/index.ts:71

## Functions

### assertRegistryKeys()

```ts
function assertRegistryKeys(registries, file): void
```

Defined in: src/cli-sdk/src/config/index.ts:114

`registries` alias names are used as spec prefixes, where `~` is reserved, and an empty name has nothing to prefix with.

#### Parameters

| Parameter    | Type      |
| ------------ | --------- |
| `registries` | `unknown` |
| `file`       | `string`  |

#### Returns

`void`

---

### configWriteTarget()

```ts
function configWriteTarget(conf, fallback): WhichConfig
```

Defined in: src/cli-sdk/src/config/index.ts:1160

Which `vlt.json` a command that persists settings should write to.

`--config=user` and `--config=project` are explicit. Anything else means the caller's own default, since `--config` also takes `all` (its default, meaningful only for `vlt config` reads).

#### Parameters

| Parameter  | Type                                                                                                       |
| ---------- | ---------------------------------------------------------------------------------------------------------- |
| `conf`     | `Pick`<[`ParsedConfig`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#parsedconfig), `"get"`> |
| `fallback` | [`WhichConfig`](https://docs.vlt.io/client/api-reference/vlt-json/reference.md#whichconfig)                |

#### Returns

[`WhichConfig`](https://docs.vlt.io/client/api-reference/vlt-json/reference.md#whichconfig)

---

### expandHome()

```ts
function expandHome(p): string
```

Defined in: src/cli-sdk/src/config/index.ts:199

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `p`       | `string` |

#### Returns

`string`

---

### pairsToRecords()

```ts
function pairsToRecords(obj): PairsAsRecords
```

Defined in: src/cli-sdk/src/config/index.ts:134

#### Parameters

| Parameter | Type                                                                                                                                   |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `obj`     | \| `OptionsResults`<…> \| `NonNullable`<[`ConfigFileData`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#configfiledata)> |

#### Returns

[`PairsAsRecords`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#pairsasrecords)

---

### recordsToPairs()

```ts
function recordsToPairs(obj): RecordPairs
```

Defined in: src/cli-sdk/src/config/index.ts:155

#### Parameters

| Parameter | Type                                                                                    |
| --------- | --------------------------------------------------------------------------------------- |
| `obj`     | [`RecordPairs`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#recordpairs) |

#### Returns

[`RecordPairs`](https://docs.vlt.io/client/api-reference/cli-sdk/config.md#recordpairs)

## References

### commands

Re-exports [commands](https://docs.vlt.io/client/api-reference/cli-sdk/config/definition.md#commands-1)

### Commands

Re-exports [Commands](https://docs.vlt.io/client/api-reference/cli-sdk/config/definition.md#commands)

### definition

Re-exports [definition](https://docs.vlt.io/client/api-reference/cli-sdk/config/definition.md#definition)

### isRecordField

Re-exports [isRecordField](https://docs.vlt.io/client/api-reference/cli-sdk/config/definition.md#isrecordfield)

### recordFields

Re-exports [recordFields](https://docs.vlt.io/client/api-reference/cli-sdk/config/definition.md#recordfields)
