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

@naturali/sdk

v0.80.1

Published

TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs

Readme

@naturali/sdk

TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs.

pnpm add @naturali/sdk

Usage

import { NaturaliClient } from '@naturali/sdk';

const naturali = new NaturaliClient({
  token: process.env.NATURALI_TOKEN, // nat_sk_… or a session access JWT
});

const { data, error } = await naturali.agents.listAgents({
  path: { project_id: 'proj_V1StGXR8Z5jdHi6B' },
  query: { limit: 10 },
});

if (error) {
  // The platform's error envelope, typed: { error: { code, message, details } }
  console.error(error);
} else {
  console.log(data.data);
}

A method never throws on a non-2xx response — it resolves to { data, error }, so the machine-readable code (approval_required, budget_exceeded, access_denied, …) is available as typed data.

Options

The client always talks to https://api.naturali.ai — the only naturali.ai API origin, and not configurable.

| Option | Purpose | | --- | --- | | token | Sent as Authorization: Bearer …. Accepts a nat_sk_… API key or a session access JWT. | | headers | Merged last, so it can override the header above or add your own. |

There is no project option: a project-scoped operation takes project_id in its path, and that is the only thing the API authorizes against.

Call shape

Each resource property mirrors a generated service class, with the configured HTTP client already bound. Arguments follow the spec's own structure and snake_case field names:

await naturali.sessions.addSessionMessage({
  path: { project_id, agent_id, session_id },
  body: { message: 'What is the capital of France?' },
});

await naturali.knowledge.queryKnowledgeCollection({
  path: { project_id, collection_id },
  body: { query: 'refund policy', limit: 5 },
});

Resources: agents, apiKeys, auth, channels, contacts, generations, knowledge, models, projects, providers, sessions, tools, traces.

naturali.http exposes the underlying client for interceptors or a one-off request (naturali.http.get({ url: '/health' })).

Types

Every schema in the specs is exported as a type:

import type { Agent, AgentCreate, ErrorResponse } from '@naturali/sdk';

created_at / updated_at are handed to callers as Date objects; everything else matches the wire shape exactly.

Generation

src/generated/ is build output — never edit it, and never commit it. It is rebuilt from api/openapi/v1/*.yaml by pnpm generate, which typecheck, test and build all run first. See ../README.md for the pipeline.

The only hand-written source is src/naturaliClient.ts.

Versioning

Releases are automatic, and the version is shared with the API and with @naturali/cli — one number, one git tag, three packages. @naturali/[email protected] is the client for API 0.28.0, so the version you installed names the contract you are holding.

Any change to api/openapi/v1/*.yaml regenerates this package and publishes it, because the specs are what it is generated from — so a new version can mean the API gained a resource, not that the hand-written client changed.

fix:/chore: changes release a patch and feat: a minor, inferred from the squashed commit subject. Every case publishes on merge, breaking changes included. See the repository's PIPELINE.md and CHANGELOG.md.