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.

SystemManager (exposed as client.system) provides methods for inspecting the Podman service itself: health checks, host information, disk usage, version details, and registry authentication. PodmanClient also exposes several of these as top-level convenience getters so you don’t need to go through client.system for common reads.

Methods

ping()

client.system.ping(): Promise<boolean>
Sends a HEAD /_ping request and returns true if the service responds successfully, false otherwise. Use this to verify connectivity before performing other operations.
const alive = await client.system.ping();
console.log("Podman reachable:", alive);
The same result is available via the convenience getter:
const alive = await client.ping;

info()

client.system.info(): Promise<Record<string, unknown>>
Sends GET /info and returns host-level information about the Podman installation — OS, kernel, cgroup driver, number of containers, storage driver, and more.
const info = await client.system.info();
console.log(info["OSType"], info["KernelVersion"]);
Convenience getter equivalent:
const info = await client.info;

version(options?)

client.system.version(options?: { apiVersion?: boolean }): Promise<Record<string, unknown>>
Sends GET /version and returns the Podman version object. Pass { apiVersion: false } to strip the APIVersion field from the response.
// Full version object
const ver = await client.system.version();
console.log(ver["Version"]);

// Strip APIVersion from the response
const ver2 = await client.system.version({ apiVersion: false });
Convenience getter equivalent (no option to strip APIVersion):
const ver = await client.version;

df()

client.system.df(): Promise<Record<string, unknown>>
Sends GET /system/df and returns a disk-usage summary covering containers, images, volumes, and build cache.
const usage = await client.system.df();
console.log(usage);
Convenience getter equivalent:
const usage = await client.df;

login(username, options?)

client.system.login(
  username: string,
  options?: LoginOptions,
): Promise<Record<string, unknown>>
Authenticates to a container registry by posting credentials to /auth (using the Docker-compatible endpoint). Returns the registry response, which typically includes a token or status message.

LoginOptions

OptionTypeDescription
passwordstringRegistry password or access token.
emailstringAccount email address (some registries require this).
registrystringRegistry server address (maps to serveraddress in the API payload).
tlsVerifybooleanWhether to verify the registry TLS certificate.
const result = await client.system.login("myuser", {
  password: "s3cr3t",
  registry: "registry.example.com",
  tlsVerify: true,
});
console.log(result["Status"]);
Credentials are sent in the request body as plain JSON. Use TLS-verified endpoints (tlsVerify: true) and avoid logging the return value if it contains tokens.

Convenience getters on PodmanClient

PodmanClient exposes four read-only getters that each return a Promise. They are shorthand for the corresponding client.system.* calls:
GetterEquivalent to
client.pingclient.system.ping()
client.versionclient.system.version()
client.infoclient.system.info()
client.dfclient.system.df()
const [alive, ver, info, usage] = await Promise.all([
  client.ping,
  client.version,
  client.info,
  client.df,
]);

Build docs developers (and LLMs) love