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

@guaso-ai/content

v0.19.0

Published

Guaso Content SDK — server-only read client for headless content

Downloads

1,113

Readme

@guaso-ai/content

Server-only SDK for Guaso Content (headless). Reads content via Guaso's HTTP API — never Neon DATABASE_URL.

npm version license

Install

npm i @guaso-ai/content

Usage (RSC / route handlers / server)

import { createClient } from "@guaso-ai/content";
import type { StoreProduct } from "@guaso-ai/content/schemas/templates/store";

const client = createClient({
  siteId: process.env.GUASO_SITE_ID!,
  token: process.env.GUASO_CONTENT_TOKEN!,
});

const home = await client.getEntry("pages/home");
if (home.empty) {
  // show empty state
}

// Typed collection (products-style)
const products = await client.getEntry<StoreProduct[]>("products/products");
if (!products.empty && products.data) {
  // products.data: StoreProduct[]
}

const batch = await client.getEntries(["pages/home", "pages/about"]);

⛔ Do not use the token in the browser.

⛔ There is no listKeys / enumeration API — pass known content keys.

Typed schemas (client-safe)

Catalog shapes live in @guaso-ai/content/schemas (no server-only poison) — usable from UI kits like guaso-blocks:

import type { RichSectionData, GalleryData } from "@guaso-ai/content/schemas/blocks";
import { TEMPLATE_IDS, CANONICAL_BLOCK_PARITY } from "@guaso-ai/content/schemas";

⛔ Do not import schemas via the package root @guaso-ai/content from Client Components — that entry is server-only.

Server-only

This package depends on server-only. Importing the root entry from a Next.js Client Component ("use client") fails the build (poison). Runtime assertServerOnly also throws if window is present (Node/Vite/tests without the react-server condition).

⛔ Never put GUASO_CONTENT_TOKEN in NEXT_PUBLIC_* or any client bundle.

Optional ESLint guard (copy-paste — npm i does not configure ESLint):

// eslint.config.mjs
{
  files: ["**/components/**/*.{ts,tsx}"],
  rules: {
    "no-restricted-imports": [
      "error",
      {
        paths: [
          {
            name: "@guaso-ai/content",
            message:
              "Server-only: importá desde RSC / route handlers, nunca desde Client Components. Token ⛔ NEXT_PUBLIC_*. Schemas tipados: @guaso-ai/content/schemas.",
          },
        ],
      },
    ],
  },
}

Versioning

0.3.0 adds ./schemas exports + generics on ContentEntry / getEntry / getEntries (minor, backward-compatible defaults). Publish via scripts/release.py (OIDC) — see PUBLISH.md.

Disclaimers

  • Server-only (root entry). Never put the content token in the browser or a client bundle.
  • This SDK does not grant Neon access or HTTP write APIs.
  • You need a Guaso headless site + content token issued by Guaso (capability + chat).
  • Software is provided AS IS, without warranty or SLA for the SDK itself.
  • “Guaso” is a trademark; nominative use is OK and does not imply endorsement.
  • The MIT license of this package is not Guaso’s Terms of Service or the Guaso Content capability contract. See https://guaso.link/legal.

License

MIT — see LICENSE and NOTICE.

See llms.txt / llms-full.txt for AI-assisted integration.