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

@playaos/api-client

v0.11.0

Published

Typed API client for PlayaOS — manage camp members, dues, shifts, applications, waivers, and annotations

Readme

@playaos/api-client

Typed JavaScript/TypeScript client for the PlayaOS REST API.

Installation

npm install @playaos/api-client

Quick start

import { createClient } from "@playaos/api-client";

const client = createClient({
  baseUrl: "https://api.playaos.app",
  embedBaseUrl: "https://your-camp.playaos.app",
  apiKey: "pk_live_...",
});

// List members
const members = await client.members.list();

// Filter by role
const admins = await client.members.list({ role: "admin" });

// Get a single member
const member = await client.members.get("uuid-here");

// List applications
const pending = await client.applications.list({ status: "pending", year: 2025 });

// List dues status
const dues = await client.dues.list({ year: 2025 });

// List shifts
const shifts = await client.shifts.list({ publishedOnly: true, year: 2025 });

// Get org config
const org = await client.org.get();

// Submit an application through the embed host
const created = await client.applications.create({
  acknowledged_expectations: true,
  first_name: "Alice",
  last_name: "Smith",
  email: "[email protected]",
  phone: "5551234567",
  birthday: "1990-01-01",
  hometown: "Reno",
  how_heard: "friend",
  burning_man_before: "no",
  shelter_type: "shiftpod_tent",
  ticket_status: "have_ticket",
  build_available: false,
  strike_available: false,
  about_yourself: "I am writing more than fifty characters about myself for this example.",
  agrees_to_principles: true,
});

If your deployment serves both route families from the same host, omit embedBaseUrl and the client will reuse baseUrl.

Route hosts

  • baseUrl is used for authenticated /api/v1/* routes.
  • embedBaseUrl optionally overrides the host for /api/embed/v1/* routes.
  • When embedBaseUrl is omitted, embed requests default to baseUrl.

This is useful when a deployment splits API-key-authenticated routes onto a dedicated API host (for example https://api.playaos.app) but keeps embed routes on a portal host (for example https://your-camp.playaos.app).

Authentication

Generate an API key in Admin → Settings → Developer. Keys use the format pk_live_* and are scoped to specific resources.

Required scopes per endpoint:

| Endpoint | Scope | |----------|-------| | members.list / members.get | members:read | | applications.list | applications:read | | dues.list | dues:read | | shifts.list | shifts:read | | org.get | org:read |

Error handling

import { ApiClientError } from "@playaos/api-client";

try {
  const member = await client.members.get("nonexistent-id");
} catch (err) {
  if (err instanceof ApiClientError) {
    console.error(err.status, err.code, err.message);
    // 404, "NOT_FOUND", "Member not found"
  }
}

MCP server

For AI agent access, use the companion @playaos/mcp package.