Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Pratyay360/podman-ts/llms.txt

Use this file to discover all available pages before exploring further.

This page covers everything you need to get podman-ts installed and importable in your project: runtime and tooling requirements, all supported package managers, module format details, and TypeScript configuration.

Requirements

Before installing, make sure your environment meets these requirements:
  • Bun >= 1.0 — required at runtime. podman-ts uses Bun-native APIs (Bun.fetch for Unix socket connections, Bun.spawn for tar operations). Download at bun.sh.
  • Node >= 20 — supported for tooling (type-checking, linting, bundling) but not for execution.
  • TypeScript >= 5.x — the library ships with .d.ts declarations generated from TypeScript 5.
  • Podman running locally — with an accessible Unix socket or TCP endpoint. Verify with podman info.

Installation

Choose the package manager you’re already using in your project.
npm install @pratyay360/podman-ts
The package is published as @pratyay360/podman-ts on both npm and JSR. The JSR entry point (jsr.json) points directly to the TypeScript source.

ESM and CJS support

The exports field in package.json ships both ESM and CommonJS builds:
FormatEntry pointTypes
ESMdist/index.jsdist/index.d.ts
CJSdist/index.cjsdist/index.d.cts
You can import from either format without any extra configuration. Bundlers and runtimes that respect the exports field (Bun, Node 20+, Vite, esbuild) will resolve the correct build automatically.
The package declares "sideEffects": false, so bundlers can safely tree-shake any managers or utilities you don’t use.

Importing the SDK

After installation, import PodmanClient from the package root:
import { PodmanClient } from "@pratyay360/podman-ts";

const client = new PodmanClient();
You can also import individual managers, error classes, or low-level utilities directly from the same entry point:
import {
  PodmanClient,
  fromEnv,
  APIClient,
  APIError,
  ImageNotFound,
  ContainerError,
} from "@pratyay360/podman-ts";
Run your scripts directly with Bun — no build step needed:
bun run your-script.ts
Bun understands TypeScript natively and will execute .ts files without compilation.

Build docs developers (and LLMs) love