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

# Reference

## Type Aliases

### ManiCheck\<T>

```ts
type ManiCheck<T> = object;
```

Defined in: index.ts:49

#### Type Parameters

| Type Parameter                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------- |
| `T` _extends_ [`Packumentish`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#packumentish) |

#### Type declaration

| Name         | Type                                                                                                           |
| ------------ | -------------------------------------------------------------------------------------------------------------- |
| `deprecated` | `boolean`                                                                                                      |
| `mani`       | [`PickManifestish`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#pickmanifestisht)<`T`> |
| `platform`   | `boolean`                                                                                                      |
| `prerelease` | `boolean`                                                                                                      |
| `version`    | [`Version`](https://docs.vlt.io/client/api-reference/semver/reference.md#version)                              |

---

### Manifestish

```ts
type Manifestish = 
  | Pick<Manifest, "engines" | "os" | "cpu" | "libc">
| Pick<RevDocEntry, "engines" | "os" | "cpu" | "libc">;
```

Defined in: index.ts:43

---

### Packumentish

```ts
type Packumentish = 
  | Packument
  | RevDoc;
```

Defined in: index.ts:46

---

### PickManifestish\<T>

```ts
type PickManifestish<T> = T extends RevDoc ? RevDocEntry : Manifest;
```

Defined in: index.ts:47

#### Type Parameters

| Type Parameter                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------- |
| `T` _extends_ [`Packumentish`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#packumentish) |

---

### PickManifestOptions

```ts
type PickManifestOptions = object;
```

Defined in: index.ts:34

#### Type declaration

| Name            | Type                           |
| --------------- | ------------------------------ |
| `arch`?         | `string`                       |
| `before`?       | `Date` \| `number` \| `string` |
| `libc`?         | `string`                       |
| `node-version`? | `string`                       |
| `os`?           | `string`                       |
| `tag`?          | `string`                       |

## Variables

### LDD_PATH

```ts
const LDD_PATH: "/usr/bin/ldd" = '/usr/bin/ldd';
```

Defined in: index.ts:103

Path to the ldd binary used for filesystem-based libc detection.

## Functions

### detectLibc()

```ts
function detectLibc(): undefined | string
```

Defined in: index.ts:185

Detect the libc family (glibc or musl) on Linux systems. First tries filesystem-based detection (/usr/bin/ldd), then falls back to process.report. Returns undefined on non-Linux platforms or if detection fails.

#### Returns

`undefined` | `string`

---

### getFamilyFromFilesystem()

```ts
function getFamilyFromFilesystem(): undefined | null | string
```

Defined in: index.ts:110

Detect libc family by reading the /usr/bin/ldd file. Returns 'glibc', 'musl', null (detection ran but unknown) or undefined (file not readable).

#### Returns

`undefined` | `null` | `string`

---

### getFamilyFromReport()

```ts
function getFamilyFromReport(): null | string
```

Defined in: index.ts:134

Detect libc family by using process.report.getReport(). Returns 'glibc', 'musl', or null if detection fails.

#### Returns

`null` | `string`

---

### pickManifest()

```ts
function pickManifest<T>(
   packument, 
   wanted, 
opts): undefined | PickManifestish<T>
```

Defined in: index.ts:270

Choose the most appropriate manifest from a packument.

If `before` is set in the options, then the packument MUST be a full non-minified Packument object. Otherwise, a minified packument is fine.

#### Type Parameters

| Type Parameter                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------- |
| `T` _extends_ [`Packumentish`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#packumentish) |

#### Parameters

| Parameter   | Type                                                                                                                                                                         |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `packument` | `T`                                                                                                                                                                          |
| `wanted`    | \| `string` \| [`Range`](https://docs.vlt.io/client/api-reference/semver/reference.md#range) \| [`Spec`](https://docs.vlt.io/client/api-reference/spec/module_index.md#spec) |
| `opts`      | [`PickManifestOptions`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#pickmanifestoptions)                                                             |

#### Returns

`undefined` | [`PickManifestish`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#pickmanifestisht)<`T`>

---

### platformCheck()

```ts
function platformCheck(
   mani, 
   nodeVersion, 
   wantOs?, 
   wantArch?, 
   wantLibc?): boolean
```

Defined in: index.ts:215

Call with a manifest and the node version and process platform/arch/libc to check whether a version is suitable for the current platform.

#### Parameters

| Parameter     | Type                                                                                             |
| ------------- | ------------------------------------------------------------------------------------------------ |
| `mani`        | [`Manifestish`](https://docs.vlt.io/client/api-reference/pick-manifest/reference.md#manifestish) |
| `nodeVersion` | `string` \| [`Version`](https://docs.vlt.io/client/api-reference/semver/reference.md#version)    |
| `wantOs`?     | `string`                                                                                         |
| `wantArch`?   | `string`                                                                                         |
| `wantLibc`?   | `string`                                                                                         |

#### Returns

`boolean`

---

### resetLibcCache()

```ts
function resetLibcCache(): void
```

Defined in: index.ts:174

Reset the cached libc detection result. For testing only.

#### Returns

`void`
