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

@mediamonks/canopy

v0.0.7

Published

Canopy SDK — data, files, auth, AI and internal services for Canopy projects.

Readme

@mediamonks/canopy (SDK)

The browser/worker SDK for Canopy projects — the data plane and nothing else (infrastructure stays out of it by design; docs/03-architecture.md).

import { createCanopy } from "/_api/data/v1/sdk.js";
const canopy = createCanopy();

await canopy.db.collection("todos").insert({ text: "hi", done: false });
await canopy.blob.put("avatar.png", file);
await canopy.ai.chat({ messages: [{ role: "user", content: "…" }] });
await canopy.auth.user();
  • db — document collections (portable across targets; insert/get/find/update/delete plus per-collection search() — real full-text on SQLite targets, substring fallback on Postgres), and the raw sql() escape hatch (NOT portable: SQL passes through untranslated in the target's own dialect — ask db.dialect() whether you're on "sqlite" or "postgres").
  • blob — files on the project's isolated prefix (put/get/list/delete), typed Blob downloads, short-lived signed URLs via getUrl().
  • aichat(options) / chatStream(options) (options carry messages plus optional model, temperature, maxTokens) and an OpenAI-compatible endpoint(), budget-capped per project by the platform.
  • authuser() / logout().
  • services — platform-provided services: list() and get(name).fetch(...).

All paths are built in one place (src/client.ts): ${baseUrl}/data/v1/… with baseUrl defaulting to /_api, so the same code runs on a project host (gateway-scoped), under canopy dev (proxied), and in project workers (env.CANOPY.fetch).

Two distributions, one version

The platform serves the built bundle at /data/v1/sdk.js — always version-matched to the API it fronts, which is what scaffolded projects import. The npm package exists for typed/bundled projects; after a breaking API change npm consumers must update and redeploy (docs/09-plane-split.md §5).

vp pack builds; apps/api/scripts/embed-sdk.mjs embeds the fresh build into canopy-api (always rebuilds — a stale dist must never ship). Publish via the staged workflow (root CLAUDE.md), SDK before CLI.