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

@reminix/sdk

v0.5.0

Published

Reminix TypeScript SDK

Readme

@reminix/sdk

Reminix TypeScript SDK

Installation

npm install @reminix/sdk
# or
pnpm add @reminix/sdk
# or
yarn add @reminix/sdk

Quick Start

import { Client } from '@reminix/sdk';

const client = new Client({
  apiKey: 'your-api-key',
});

const project = await client.project.get();
console.log(`Project: ${project.name} (${project.id})`);

Usage

Basic Client Usage

import { Client } from '@reminix/sdk';

const client = new Client({
  apiKey: 'your-api-key',
  baseURL: 'https://api.reminix.com/v1', // Optional, defaults to this
  timeout: 30000, // Optional, defaults to 30000ms
});

Project Operations

import { Client } from '@reminix/sdk';

const client = new Client({
  apiKey: 'your-api-key',
});

// Get current project
const project = await client.project.get();

console.log(`Project ID: ${project.id}`);
console.log(`Project Name: ${project.name}`);
console.log(`Organization ID: ${project.organizationId}`);
console.log(`Slug: ${project.slug}`);
console.log(`Created: ${project.createdAt}`);
console.log(`Updated: ${project.updatedAt}`);

Pagination

For endpoints that return paginated data, use the pagination utilities:

import { Client, PaginatedResponse, paginateAll, collectAll } from '@reminix/sdk';

const client = new Client({
  apiKey: 'your-api-key',
});

// Helper function to fetch a page of events
async function fetchEvents(cursor?: string): Promise<PaginatedResponse<Event>> {
  const response = await client.request<{
    data: Event[];
    nextCursor?: string;
    hasMore: boolean;
  }>('GET', '/events', {
    headers: cursor ? { cursor } : undefined,
  });

  return {
    data: response.data,
    nextCursor: response.nextCursor,
    hasMore: response.hasMore,
  };
}

// Option 1: Iterate through all pages (async generator)
for await (const event of paginateAll(fetchEvents)) {
  console.log(`Event: ${event.id}`);
}

// Option 2: Collect all items into an array
const allEvents = await collectAll(fetchEvents);
console.log(`Total events: ${allEvents.length}`);

Error Handling

import { Client, AuthenticationError, APIError, NetworkError } from '@reminix/sdk';

const client = new Client({
  apiKey: 'your-api-key',
});

try {
  const project = await client.project.get();
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Authentication failed:', error.message);
    console.error('Status code:', error.status);
  } else if (error instanceof APIError) {
    console.error('API error:', error.message);
    console.error('Status:', error.status, error.reason);
  } else if (error instanceof NetworkError) {
    console.error('Network error:', error.message);
  }
}

Configuration

import { Client } from '@reminix/sdk';

// Custom base URL
const client = new Client({
  apiKey: 'your-api-key',
  baseURL: 'https://custom-api.example.com/v1',
});

// Custom timeout
const client = new Client({
  apiKey: 'your-api-key',
  timeout: 60000, // 60 seconds
});

// Custom headers
const client = new Client({
  apiKey: 'your-api-key',
  headers: {
    'X-Custom-Header': 'value',
  },
});

Making Direct Requests

You can also make direct requests using the client:

const client = new Client({
  apiKey: 'your-api-key',
});

// GET request
const data = await client.request('GET', '/endpoint');

// POST request
const result = await client.request('POST', '/endpoint', {
  body: { key: 'value' },
});

// With custom headers
const response = await client.request('GET', '/endpoint', {
  headers: {
    'X-Custom-Header': 'value',
  },
});

Type Safety

The SDK provides full TypeScript type safety. All responses are typed based on the OpenAPI specification:

import { Client } from '@reminix/sdk';
import type { paths } from '@reminix/sdk';

// Response types are automatically inferred
const project = await client.project.get();
// project is typed as GetProjectResponse

// You can also use the generated types directly
type Project = paths['/project']['get']['responses']['200']['content']['application/json'];

License

MIT