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

@archastro/sdk

v0.7.0

Published

TypeScript SDK for the ArchAstro Platform API (Node, browser, React Native)

Readme

@archastro/sdk

TypeScript SDK for the ArchAstro Platform API.

Documentation

API reference documentation is published at archastro.github.io/archastro-js.

Use this site in two layers:

  • Start with the guides when you are wiring the SDK into an app, worker, or internal tool.
  • Use the API reference when you know the resource or method you need.

Install

npm install @archastro/sdk

Choose An Auth Mode

Most app integrations use a publishable API key plus a user access token:

import { PlatformClient } from "@archastro/sdk";

const client = PlatformClient.withToken(
  process.env.ARCHASTRO_API_KEY ?? "",
  process.env.ARCHASTRO_ACCESS_TOKEN ?? "",
);

Server-side org bots and workers can also use an app-scoped user token directly:

const client = new PlatformClient({
  accessToken: process.env.ARCHASTRO_ACCESS_TOKEN,
});

Set baseUrl only for local development or staging:

import { PlatformClient } from "@archastro/sdk";

const client = PlatformClient.withToken(
  process.env.ARCHASTRO_API_KEY ?? "",
  process.env.ARCHASTRO_ACCESS_TOKEN ?? "",
  process.env.ARCHASTRO_PLATFORM_BASE_URL,
);

Quickstart

const me = await client.users.me();
const teams = await client.teams.list();

console.log(me.id, me.email, teams);

React Native / Expo

Native mobile works out of the box — no Node ws / events polyfills. Use PlatformClient.forApp so session storage, passwordless OTP, and auto-refresh stay behind one client (not a parallel session helper):

import { PlatformClient, ApiChatChannel, type SessionStorage } from "@archastro/sdk";

const client = PlatformClient.forApp({
  publishableKey: process.env.EXPO_PUBLIC_PUBLISHABLE_KEY!,
  baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL!,
  storage, // your SessionStorage (SecureStore / AsyncStorage)
});

await client.restore();
// client.passwordless… → client.signIn(tokens, user)
await client.agents.list();
const socket = client.createSocket();

See React Native guide.

Integration Guides

  • Authentication: choose the right token strategy for browser sessions, server-side app integrations, and org workers.
  • React Native / Expo: session storage, passwordless auth, and chat channels without Node polyfills.
  • Integration scenarios: read the current user, list teams, and create an agent with snippets that were smoke-tested against the local platform dev harness.

Common Resource Pattern

Resources hang directly off PlatformClient and under client.v1:

await client.agents.list();
await client.agents.create({
  name: "Support triage",
  identity: "You triage support requests and keep replies concise.",
});

The generated API surface includes typed REST resources, auth helpers, and channel clients. The lower-level Phoenix Channel client is documented in src/phx_channel/README.md.