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.
PodmanClient is the top-level entry point for the podman-ts SDK. It holds a lazily-initialized set of resource managers and a public api property that exposes the underlying APIClient for raw HTTP calls. You create one instance per application and reuse it across requests.
Constructor
baseUrl or connection is provided, the client reads the active service from containers.conf. If the active service is a Podman machine, its URL is used; otherwise the local Unix socket is used.
Full URL to the Podman service, e.g.
"http+unix:///run/podman/podman.sock" or "tcp://127.0.0.1:8080". When set, connection is ignored.Named connection from
containers.conf or podman-connections.json. Ignored if baseUrl is provided.API version prefix override. Default:
"v5.0.0".Request timeout in milliseconds. When omitted, requests do not time out.
Path to an SSH identity file. Used when connecting over
ssh://.Static factory methods
PodmanClient.fromEnv
PodmanClient whose base URL is read from the environment. Checks CONTAINER_HOST, then DOCKER_HOST, then falls back to the local Unix socket.
fromEnv (exported function)
PodmanClient.fromEnv(). Mirrors the Python SDK convention.
DockerClient alias
DockerClient is a named export that aliases PodmanClient. It exists for Docker SDK compatibility and is identical in every way.
Public property
| Property | Type | Description |
|---|---|---|
api | APIClient | The underlying low-level HTTP client. Use it to make requests not covered by the resource managers. |
Resource manager getters
Each getter is lazily initialized — the manager instance is created on first access and reused on subsequent accesses.| Getter | Type | Description |
|---|---|---|
containers | ContainersManager | Create, list, inspect, start, stop, remove, and exec into containers. |
images | ImagesManager | Pull, push, build, list, tag, and remove images. |
networks | NetworksManager | Create, list, inspect, connect, and remove networks. |
volumes | VolumesManager | Create, list, inspect, and remove volumes. |
pods | PodsManager | Create, list, inspect, start, stop, and remove pods. |
secrets | SecretsManager | Create, list, inspect, and remove secrets. |
manifests | ManifestsManager | Create and manage image manifest lists. |
quadlets | QuadletsManager | Read and write Quadlet unit files on the host. |
events | EventsManager | Stream or list Podman events. |
system | SystemManager | Ping, version, info, df, and login operations. |
kube | KubeManager | Generate and apply Kubernetes YAML; generate systemd units. |
artifacts | ArtifactsManager | Push, pull, and manage OCI artifacts. |
Convenience properties
These properties delegate toSystemManager and return Promises. They are shorthand for the equivalent client.system.*() calls.
| Property | Return type | Equivalent to |
|---|---|---|
ping | Promise<boolean> | client.system.ping() |
version | Promise<Record<string, unknown>> | client.system.version() |
info | Promise<Record<string, unknown>> | client.system.info() |
df | Promise<Record<string, unknown>> | client.system.df() |
Instance methods
close
using declaration below.
[Symbol.dispose]
close() automatically when the client goes out of scope inside a using block.