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

modal-ts

v0.8.1

Published

Unofficial Modal SDK for JavaScript/TypeScript

Readme

modal-ts

日本語

Unofficial Modal SDK for TypeScript/JavaScript. Forked from modal-labs/libmodal (Apache-2.0).

Install

npm install modal-ts

Quick Start

import { ModalClient } from "modal-ts";

const modal = new ModalClient();

// Call a deployed function
const echo = await modal.functions.fromName("my-app", "echo");
const result = await echo.remote(["Hello world!"]);
console.log(result);

// Run a sandbox
const app = await modal.apps.fromName("my-app", { createIfMissing: true });
const image = modal.images.fromRegistry("alpine:3.21");
const sb = await modal.sandboxes.create(app, image, { command: ["echo", "hi"] });
console.log(await sb.stdout.readText());
await sb.terminate();

Authentication

Set environment variables or configure ~/.modal.toml:

export MODAL_TOKEN_ID=ak-...
export MODAL_TOKEN_SECRET=as-...

Features

  • Functions - Call deployed Modal functions and classes
  • Sandboxes - Create and manage sandboxes with exec, stdin/stdout, tunnels, filesystem access
  • Queues - Distributed FIFO queues with partition support
  • Volumes - Persistent storage
  • Images - Build container images from registries, Dockerfiles, ECR, GCP Artifact Registry
  • Secrets - Manage environment secrets
  • Deploy - Deploy apps, functions, and classes via gRPC API

Development

bun install           # Install deps + generate proto
bun run typecheck     # Type check
bun run lint          # Biome lint
bun run format        # Biome format
bun run build         # Build (esbuild + tsc)
bun run test          # Run tests (vitest)

Differences from upstream

This fork diverges from modal-labs/libmodal:

  • TypeScript-only - Go SDK removed
  • No Python dependency - Test infrastructure and release scripts rewritten in TypeScript
  • Bun - Uses Bun instead of npm
  • Biome - Uses Biome instead of ESLint + Prettier
  • Strict TypeScript - verbatimModuleSyntax, noUncheckedIndexedAccess, exactOptionalPropertyTypes enabled. No any, no @ts- directives
  • esbuild - Direct esbuild instead of tsup

License

Apache-2.0. Proto definitions from modal-labs/modal-client (Apache-2.0).