# ts-pantry

> A library & CLI for managing packages

Latest version **0.11.60** (published 2026-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-pantry
pnpm add ts-pantry
yarn add ts-pantry
bun add ts-pantry
```

Provides the command `ts-pantry`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.11.60 |
| Published | 2026-09-10 |
| First published | 2025-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 7.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Chris Breuer <chris@stacksjs.com> |
| Maintainers | chrisbreuer |
| Keywords | pantry, typescript, bun, package, cli, library, package-manager |

## Links

- npm: https://www.npmjs.com/package/ts-pantry
- Repository: https://github.com/pantry-pm/pantry
- Homepage: https://github.com/pantry-pm/pantry/tree/main/packages/ts-pantry#readme
- Issues: https://github.com/pantry-pm/pantry/issues
- npm.io page: https://npm.io/package/ts-pantry

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.11.60 (latest) — 2026-09-10
- 0.11.59 — 2026-09-10
- 0.11.58 — 2026-09-09
- 0.11.57 — 2026-09-09
- 0.11.56 — 2026-09-09
- 0.11.55 — 2026-09-04
- 0.11.53 — 2026-09-04
- 0.11.52 — 2026-09-04
- 0.11.50 — 2026-09-04
- 0.11.48 — 2026-09-02
- 0.11.47 — 2026-09-02
- 0.11.46 — 2026-09-02
- 0.11.45 — 2026-08-28
- 0.11.44 — 2026-08-28
- 0.11.43 — 2026-08-25
- … 88 more at https://npm.io/package/ts-pantry/versions

## README

# ts-pantry

TypeScript types for Pantry package manager configuration with **full type validation** for package names and versions.

## Installation

```bash
bun add -d ts-pantry
```

## Usage

```typescript
import type { PantryConfig } from 'ts-pantry'

export const config: PantryConfig = {
  dependencies: {
    'bun.com': '^1.3.0',      // ✅ Valid
    'sqlite.org': '^3.47.2',  // ✅ Valid
    // 'bun.com': '^999.999.999',  // ❌ TypeScript error: invalid version!
    // 'fake-pkg': 'latest',      // ❌ TypeScript error: package doesn't exist!
  },

  services: {
    enabled: true,
    autoStart: true,
    database: {
      connection: 'sqlite',
      name: 'myapp',
    },
  },

  verbose: true,
}

export default config
```

## Features

- **Full Type Validation**: Package names and versions are validated at compile time
- **IntelliSense Support**: Get autocomplete for all 3000+ packages from the pkgx registry
- **Version Validation**: Invalid versions trigger TypeScript errors
- **Zero Configuration**: Just import and use - no additional setup required
- **App Store Automation**: Provision macOS identifiers, capabilities, certificates,
  and profiles, then manage App Store versions and processed builds

## App Store Connect

Pantry owns the provider-neutral Apple distribution layer used by release actions
and framework integrations. Authentication defaults to
`APP_STORE_CONNECT_API_KEY_ID`, `APP_STORE_CONNECT_API_ISSUER_ID`, and
`APP_STORE_CONNECT_API_KEY_PATH`.

Provisioning is plan-only unless `checkOnly: false` is explicitly passed. It
reuses active certificates and profiles and never revokes existing resources.
Apple requires the initial app record to be created manually in App Store
Connect; Pantry reports that remaining action in its result.

```bash
# Generate the two private-key/CSR pairs locally.
ts-pantry app-store:csr --name "Example Desktop"

# Safe plan (no Apple resources are changed).
ts-pantry app-store:provision \
  --bundle-id com.example.desktop \
  --name "Example Desktop"

# Apply after supplying CSRs for any missing certificates.
ts-pantry app-store:provision \
  --bundle-id com.example.desktop \
  --name "Example Desktop" \
  --app-certificate-csr .pantry/apple/mac-app-distribution.csr \
  --installer-certificate-csr .pantry/apple/mac-installer-distribution.csr \
  --apply
```

```typescript
import {
  AppStoreConnectClient,
  ensureAppStoreVersions,
  provisionMacApp,
  waitForAppStoreBuilds,
} from 'ts-pantry'

const plan = await provisionMacApp({
  identifier: 'com.example.desktop',
  name: 'Example Desktop',
  capabilities: ['APP_GROUPS'],
})

const client = new AppStoreConnectClient()
const app = await client.findApp('com.example.desktop')
if (app) {
  const versions = await ensureAppStoreVersions(client, app.id, [
    { platform: 'MAC_OS', version: '1.0.0' },
  ])
  await waitForAppStoreBuilds(client, app.id, versions, '42')
}
```

## Type Definitions

### `PantryConfig`

Main configuration interface for Pantry with all available options.

### `Dependencies`

Type-safe dependency specification with version constraints.

### Helper Functions

- `definePantryConfig(config)` - Helper to define configuration with full type safety
- `defineDependencies(deps)` - Helper to define dependencies with type checking
- `definePackageList(packages)` - Helper to define package arrays

## License

MIT

---
_Source: https://npm.io/package/ts-pantry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
