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

# Reference

## Type Aliases

### PromptFn()

```ts
type PromptFn = (pkgSpec, path, resolution) => Promise<string>;
```

Defined in: vlx/src/index.ts:25

Provide a promptFn which is `()=>Promise<string>` if you want to confirm before installing things. If it returns a string that does not start with the letter 'y', then operation will be aborted. If not provided, consent is assumed.

#### Parameters

| Parameter    | Type                                                                         |
| ------------ | ---------------------------------------------------------------------------- |
| `pkgSpec`    | [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec) |
| `path`       | `string`                                                                     |
| `resolution` | `string`                                                                     |

#### Returns

`Promise`<`string`>

---

### VlxInfo

```ts
type VlxInfo = VlxManifest["vlx"] & object;
```

Defined in: vlx/src/index.ts:32

The info about a given vlx installation

#### Type declaration

| Name       | Type     | Description                                                                                                                                                   |
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `arg0`?    | `string` | Full path to the inferred default binary for the dependency if it exists.                                                                                     |
| `name`     | `string` | name of the package that is being run                                                                                                                         |
| `path`     | `string` | path to the synthetic project for non-local installs, to the current projectRoot if the resolution is local, or a private shim dir for local directory specs. |
| `resolved` | `string` | resolution of the package installed, for non-local installs, or a file URL into the node_modules for project local installs.                                  |
| `version`? | `string` | version of the package being run                                                                                                                              |

---

### VlxManifest

```ts
type VlxManifest = NormalizedManifest & object;
```

Defined in: vlx/src/index.ts:10

#### Type declaration

| Name              | Type                                                                                                           | Description                                                         |
| ----------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| `vlx`?            | `object`                                                                                                       | -                                                                   |
| `vlx.integrity`?  | [`Integrity`](https://docs.vlt.io/client/api-reference/types/reference.md#integrity-2)                         | -                                                                   |
| `vlx.signatures`? | [`Resolution`](https://docs.vlt.io/client/api-reference/package-info/reference.md#resolution)\[`"signatures"`] | -                                                                   |
| `vlx.spec`?       | `string`                                                                                                       | the spec this was installed for, to run again when its host is away |

---

### VlxOptions

```ts
type VlxOptions = SpecOptions & PackageInfoClientOptions & PackageInfoClientRequestOptions & InstallOptions & object;
```

Defined in: vlx/src/index.ts:58

#### Type declaration

| Name       | Type      |
| ---------- | --------- |
| `package`? | `string`  |
| `yes`?     | `boolean` |

## Functions

### delete()

```ts
function delete(
   keys, 
   remover, 
options): Promise<string[]>
```

Defined in: vlx/src/delete.ts:15

#### Parameters

| Parameter | Type                                                                                                     |
| --------- | -------------------------------------------------------------------------------------------------------- |
| `keys`    | `string`\[]                                                                                              |
| `remover` | [`RollbackRemove`](https://docs.vlt.io/client/api-reference/rollback-remove/reference.md#rollbackremove) |
| `options` | [`VlxOptions`](https://docs.vlt.io/client/api-reference/vlx/reference.md#vlxoptions)                     |

#### Returns

`Promise`<`string`\[]>

---

### info()

```ts
function info(
   path, 
   options, 
   manifest?): …
```

Defined in: vlx/src/info.ts:10

#### Parameters

| Parameter   | Type                                                                                                                                                                                                                                                                          |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path`      | `string`                                                                                                                                                                                                                                                                      |
| `options`   | [`VlxOptions`](https://docs.vlt.io/client/api-reference/vlx/reference.md#vlxoptions)                                                                                                                                                                                          |
| `manifest`? | [`Override`](https://docs.vlt.io/client/api-reference/types/reference.md#overridet-r)<[`Manifest`](https://docs.vlt.io/client/api-reference/types/reference.md#manifest), [`NormalizedFields`](https://docs.vlt.io/client/api-reference/types/reference.md#normalizedfields)> |

#### Returns

…

---

### install()

```ts
function install(
   spec, 
   options, 
promptFn?): Promise<…>
```

Defined in: vlx/src/install.ts:22

Install a given package spec in the appropriate folder, if it's not already present.

#### Parameters

| Parameter   | Type                                                                                     |
| ----------- | ---------------------------------------------------------------------------------------- |
| `spec`      | `string` \| [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec) |
| `options`   | [`VlxOptions`](https://docs.vlt.io/client/api-reference/vlx/reference.md#vlxoptions)     |
| `promptFn`? | [`PromptFn`](https://docs.vlt.io/client/api-reference/vlx/reference.md#promptfn)         |

#### Returns

`Promise`<…>

---

### list()

```ts
function list(): AsyncGenerator<string, void, unknown>
```

Defined in: vlx/src/list.ts:5

#### Returns

`AsyncGenerator`<`string`, `void`, `unknown`>

---

### resolve()

```ts
function resolve(
   positionals, 
   options, 
promptFn?): Promise<undefined | string>
```

Defined in: vlx/src/resolve.ts:17

Figure out the `arg0` to use for an exec command.

If `undefined` is returned, then the caller should spawn an interactive shell, or in multi-workspace mode, raise an error.

#### Parameters

| Parameter     | Type                                                                                 |
| ------------- | ------------------------------------------------------------------------------------ |
| `positionals` | `string`\[]                                                                          |
| `options`     | [`VlxOptions`](https://docs.vlt.io/client/api-reference/vlx/reference.md#vlxoptions) |
| `promptFn`?   | [`PromptFn`](https://docs.vlt.io/client/api-reference/vlx/reference.md#promptfn)     |

#### Returns

`Promise`<`undefined` | `string`>
