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

@kast-cms/sdk

v0.3.2

Published

Official TypeScript SDK for the Kast CMS API

Readme

@kast-cms/sdk

Official TypeScript SDK for the Kast CMS API

npm version npm downloads License: MIT TypeScript Node.js

A fully-typed, zero-dependency TypeScript client for every Kast CMS resource — content, media, SEO, forms, users, webhooks, and more.


Installation

# npm
npm install @kast-cms/sdk

# pnpm
pnpm add @kast-cms/sdk

# yarn
yarn add @kast-cms/sdk

Quick Start

import { KastClient } from '@kast-cms/sdk';

const kast = new KastClient({
  baseUrl: 'https://your-kast-api.com',
  apiKey: process.env.KAST_API_KEY,
});

// Fetch all entries for a content type
const { data, meta } = await kast.entries('blog-post').list();
console.log(`Found ${meta.total} posts`);

// Get a single entry
const { data: post } = await kast.entries('blog-post').findOne('entry-id');

// Create an entry
const { data: newPost } = await kast.entries('blog-post').create({
  fields: { title: 'Hello World', body: 'My first post' },
  status: 'PUBLISHED',
});

Authentication

The SDK supports two authentication methods:

API Key (recommended for server-side)

const kast = new KastClient({
  baseUrl: 'https://your-kast-api.com',
  apiKey: 'kast_live_xxxxxxxxxxxxxxxx',
});

Bearer Token (for user sessions)

const kast = new KastClient({
  baseUrl: 'https://your-kast-api.com',
  accessToken: userAccessToken,
});

// Or set it dynamically after login:
kast.setAccessToken(token);

Resources

The client exposes a resource for every Kast API domain:

| Resource | Description | | -------------------- | ------------------------------------------------ | | kast.entries(type) | CRUD for content entries, versioning, scheduling | | kast.contentTypes | Manage content type schemas | | kast.media | Upload and manage media files | | kast.seo | Per-entry SEO metadata | | kast.forms | Form definitions and submissions | | kast.menus | Navigation menu management | | kast.locales | Internationalisation and locale config | | kast.users | User management | | kast.roles | Role and permission management | | kast.webhooks | Webhook registration and management | | kast.plugins | Plugin registry | | kast.tokens | API token management | | kast.agentTokens | MCP / AI agent token management | | kast.audit | Audit log queries | | kast.dashboard | Dashboard stats and activity | | kast.settings | Global CMS settings | | kast.trash | Soft-deleted content recovery | | kast.versions | Content version history | | kast.auth | Authentication flows | | kast.health | API health check |


Examples

Fetch entries with pagination

const page = await kast.entries('product').list({
  limit: 20,
  cursor: undefined,
  locale: 'en',
  status: 'PUBLISHED',
});

// Next page
if (page.meta.hasNextPage) {
  const next = await kast.entries('product').list({
    limit: 20,
    cursor: page.meta.cursor,
  });
}

Upload media

const formData = new FormData();
formData.append('file', file);

const { data: media } = await kast.media.upload(formData);
console.log(media.url);

Manage locales

// List all locales
const { data: locales } = await kast.locales.list();

// Create a new locale
await kast.locales.create({ code: 'ar', name: 'Arabic', direction: 'RTL' });

Query audit logs

const logs = await kast.audit.list({
  action: 'ENTRY_PUBLISHED',
  limit: 50,
});

Register a webhook

await kast.webhooks.create({
  name: 'Revalidate blog',
  url: 'https://my-site.com/api/revalidate',
  events: ['ENTRY_PUBLISHED', 'ENTRY_UNPUBLISHED'],
  secret: process.env.WEBHOOK_SECRET,
});

Custom Fetch (Edge / Next.js)

You can pass a custom fetch implementation — useful for Next.js caching:

import { KastClient } from '@kast-cms/sdk';

const kast = new KastClient({
  baseUrl: process.env.KAST_API_URL!,
  apiKey: process.env.KAST_API_KEY!,
  // Next.js extended fetch with ISR revalidation
  fetch: (url, init) => fetch(url, { ...init, next: { revalidate: 60 } }),
});

TypeScript

Every resource method is fully typed. Import types directly:

import type {
  ContentEntrySummary,
  ContentEntryDetail,
  ApiListResponse,
  KastClientOptions,
} from '@kast-cms/sdk';

Links


About Kast

Kast is an open-source, AI-native, developer-first headless CMS built on NestJS + Next.js. It ships with a built-in MCP server for AI agent control, first-class SEO tooling, and RTL/i18n support from day one.


Author

Built and maintained by Oday Bakkouroday-bakkour.com


License

MIT © 2026 Oday Bakkour