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

@estokad/sdk

v0.1.6

Published

Framework-agnostic TypeScript client for the Estokad content API.

Readme

@estokad/sdk

Framework-agnostic TypeScript client for the Estokad content API. End-to-end typed: your defineType() schemas drive the response types, no codegen step.

Install

pnpm add @estokad/sdk

Quickstart

import { createClient } from '@estokad/sdk'

const cms = createClient({
  workspace: 'my-workspace',
  apiUrl: 'https://api.estokad.com',
  apiKey: process.env.ESTOKAD_API_KEY!,
})

// Fetch a list
const articles = await cms.list('article', { first: 20 })

// Fetch by id or slug
const article = await cms.fetch('article', 'launch-week-day-1')

// Singleton
const settings = await cms.singleton('siteSettings').fetch()

// Mutations (require write or management scope)
await cms.update('article', article.id, { title: 'Updated' })
await cms.publish('article', article.id)

Typing your responses

Declare a ContentTypes interface and the SDK becomes fully typed:

import type { ContentTypes } from '@estokad/sdk'

declare module '@estokad/sdk' {
  interface ContentTypes {
    article: {
      title: string
      body: string
      publishedAt: string | null
    }
    siteSettings: {
      siteName: string
      ga4MeasurementId: string
    }
  }
}

// Now `articles[0].title` is typed as `string`, no `any` anywhere.

In a real project, the type generation step is automatic — see @estokad/cli estokad pull which writes a .estokad/types.ts declaration file alongside your schemas/*.ts files.

Errors

import {
  EstokadError,
  NotFoundError,
  ValidationError,
  RateLimitError,
  UnauthorizedError,
} from '@estokad/sdk'

try {
  await cms.update('article', id, { title: '' })
} catch (err) {
  if (err instanceof ValidationError) {
    console.error('field issues:', err.issues)
  } else if (err instanceof RateLimitError) {
    console.error('retry after seconds:', err.retryAfter)
  }
}

GraphQL escape hatch

const result = await cms.gql<{ article: { title: string } }>(
  `query($id: ID!) { article(id: $id) { title } }`,
  { id: 'launch-week-day-1' },
)

Framework adapters

Don't use this directly — use one of the adapters:

Each wraps createClient with the framework's preferred conventions (cookies, server-side fetch, etc.).

Documentation

Full reference at docs.estokad.com. AI-friendly index at docs.estokad.com/llms.txt.

License

Apache-2.0. Estokad is a Samarkand Industries OÜ product.