npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zlayer/client

v0.11.23

Published

Ergonomic TypeScript SDK for ZLayer. Wraps the auto-generated OpenAPI client (@zlayer/api-client) with convenience methods and a Unix-socket-aware fetch.

Readme

@zlayer/client

Ergonomic TypeScript SDK for the ZLayer container orchestration daemon. Wraps the auto-generated OpenAPI client (@zlayer/api-client) with a Unix-socket-aware fetch and a small surface of convenience methods that mirror the Python SDK.

Install

npm install @zlayer/client

The package depends on @zlayer/api-client (the raw generated client) and on undici for the AF_UNIX fetch transport.

Quickstart

import { Client, ensureDaemon } from "@zlayer/client";

// Download the zlayer binary to ~/.local/share/zlayer/bin/ (userland).
await ensureDaemon();

// Defaults to the platform Unix socket:
//   * Linux:   /var/run/zlayer.sock
//   * macOS:   ~/Library/Application Support/zlayer/run/zlayer.sock
//   * Windows: tcp://127.0.0.1:3669 (HTTP)
const client = new Client();

console.log(await client.ps());

Constructor

new Client({ socket?: string; host?: string; token?: string })

Pass exactly one of socket (Unix domain socket) or host (HTTP base URL, e.g. http://127.0.0.1:3669). Omit both to use the platform default (see above).

Methods

| Method | Verb | Generated target | | ------ | ---- | ---------------- | | deploy(specYaml) | create deployment | DeploymentsApi.createDeployment | | ps({label?}) | list containers | ContainersApi.listContainers | | logs(containerId, {tail?, follow?}) | container logs | ContainersApi.getContainerLogs | | exec(deployment, service, cmd[]) | service exec | POST /deployments/{d}/services/{s}/exec | | build(contextPath, tags, opts?) | start build | BuildApi.startBuildJson | | buildStatus(id) | poll build | BuildApi.getBuildStatus | | runtimes() | list runtime templates | BuildApi.listRuntimeTemplates | | stop(deployment) | delete deployment | DeploymentsApi.deleteDeployment | | status(deployment) | deployment details | DeploymentsApi.getDeployment | | scale(d, s, replicas) | scale service | ServicesApi.scaleService | | kill(containerId, signal?) | kill container | ContainersApi.killContainer | | tag(source, target) | tag image | ImagesApi.tagImageHandler | | pull(reference) | pull image | ImagesApi.pullImageHandler |

Full type definitions ship in dist/index.d.ts. For fine-grained access to the generated request/response shapes, use the client.raw escape hatch:

const resp = await client.raw.deployments.listDeployments();

Binary bootstrap (ensureDaemon)

ensureDaemon() downloads the release tarball from GitHub and extracts the zlayer binary to ~/.local/share/zlayer/bin/zlayer. The URL scheme matches install.py at the repo root.

await ensureDaemon();                          // latest release, userland
await ensureDaemon({ version: "0.10.104" });   // pinned version
await ensureDaemon({ system: true });          // runs `zlayer daemon install` (prompts for sudo)
await ensureDaemon({ force: true });           // redownload even if a match exists

System mode (system: true) first bootstraps the userland binary, then invokes zlayer daemon install with live terminal I/O so the CLI's own sudo prompt reaches the user.

Postinstall opt-in

The postinstall script in package.json is a no-op by default. To have npm install also download the zlayer binary, set ZLAYER_AUTO_INSTALL=1:

ZLAYER_AUTO_INSTALL=1 npm install @zlayer/client

Any failure during an opt-in auto-install is logged but never fails the install itself.

Supported platforms

  • Linux x86_64 / aarch64
  • macOS x86_64 / aarch64
  • Windows users can drive a daemon over HTTP (new Client({ host: "http://localhost:3669" })), but ensureDaemon() itself does not support Windows — install manually via WSL2 or the release tarball.

License

Apache-2.0