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

@supaproxy/sdk

v0.6.0

Published

TypeScript SDK for SupaProxy. Typed API client for building dashboards and integrations.

Downloads

1,157

Readme

@supaproxy/sdk

npm License: MIT

TypeScript SDK for SupaProxy. Typed API client for building dashboards and integrations.

Alpha: API surface may change without notice.

Install

pnpm add @supaproxy/sdk
# or
npm install @supaproxy/sdk

Authentication

SupaProxy uses cookie-based auth (httpOnly JWT). The SDK sends credentials: 'include' by default so cookies are attached to every request.

import { SupaProxyClient } from '@supaproxy/sdk';

const client = new SupaProxyClient('http://localhost:3001');

// Sign up (creates org, user, and first workspace)
await client.auth.signup({
  org_name: 'Acme Corp',
  admin_name: 'Jane',
  admin_email: '[email protected]',
  admin_password: 'securepassword',
  workspace_name: 'Support',
  team_name: 'Engineering',
});

// Log in (sets session cookie)
await client.auth.login({ email: '[email protected]', password: 'securepassword' });

// Check session
const { user } = await client.auth.session();

For server-side usage (Node.js), pass cookies manually via headers:

const client = new SupaProxyClient({
  baseUrl: 'http://localhost:3001',
  headers: { Cookie: 'supaproxy_session=<jwt_token>' },
});

Usage

// Workspaces
const { workspaces } = await client.workspaces.list();
const detail = await client.workspaces.detail('ws-my-workspace');
const result = await client.workspaces.query('ws-my-workspace', { query: 'Hello' });

// Conversations
const convos = await client.conversations.list('ws-my-workspace');
const convo = await client.conversations.get('ws-my-workspace', 'conv-id');

// Org settings
const org = await client.org.get();
const settings = await client.org.settings();

API keys

Workspace API keys allow programmatic access without a session cookie, used by the MCP server and external integrations.

// Create a key (full key returned once, store it securely)
const { id, key, prefix, label } = await client.workspaces.apiKeys.create('ws-id', {
  label: 'My integration',
});
// key looks like: sp_live_a1b2c3d4...

// Create a test key (bypasses rate limits and billing)
const testKey = await client.workspaces.apiKeys.create('ws-id', {
  label: 'CI tests',
  test: true,
});
// key looks like: sp_test_a1b2c3d4...

// List active keys (prefix and metadata only, raw key not returned)
const { keys } = await client.workspaces.apiKeys.list('ws-id');
// keys: [{ id, prefix: 'sp_live_a1b2', label, created_at, last_used_at }]

// Revoke a key immediately
await client.workspaces.apiKeys.revoke('ws-id', keyId);

Error handling

import { SupaProxyClient, SupaProxyError } from '@supaproxy/sdk';

try {
  await client.workspaces.list();
} catch (err) {
  if (err instanceof SupaProxyError) {
    console.error(err.status, err.message); // e.g. 401, "Not authenticated"
  }
}

Types

The SDK re-exports all shared types: entities, API contracts, and config types:

import type { Workspace, Conversation, QueryResponse } from '@supaproxy/sdk';

Limitations

  • No automatic retry or exponential backoff
  • No rate limit handling (429 responses)
  • No request timeout configuration
  • No response caching

Documentation

Full documentation at docs.supaproxy.cloud.

License

MIT. See LICENSE. Managed by Numstack Pty Ltd.