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

@stablebaseline/sdk

v0.4.2

Published

TypeScript SDK for the Stable Baseline REST API. End-to-end agent-managed company brain — docs, diagrams, plans, and a self-learning Knowledge Graph. 184 tools across 19 categories.

Downloads

1,118

Readme

@stablebaseline/sdk

npm Tools

TypeScript SDK for the Stable Baseline REST API — the simplest, most complete, end-to-end agent-managed company brain. Living docs, 40+ visual diagrams, plans, and a self-learning Knowledge Graph. 184 tools across 19 categories.

Install

npm install @stablebaseline/sdk

Quick start

import { StableBaseline } from "@stablebaseline/sdk";

// Mint an API key at https://app.stablebaseline.io/settings/mcp-keys
const sb = new StableBaseline({ apiKey: process.env.SB_API_KEY! });

const orgs = await sb.tools.listOrganisations({});
console.log(orgs);

const doc = await sb.tools.createDocument({
  folderId: "folder-uuid",
  title: "Q4 architecture",
  cdmd: "# Architecture\n\nThis document covers...",
});
console.log(`Created ${doc.friendlyId} (${doc.id})`);

const search = await sb.tools.kg_search({
  query: "compliance posture",
  mode: "global",
});
console.log(search.entities);

Auth

Two equivalent paths:

// API key (mint at app.stablebaseline.io/settings/mcp-keys, prefix sta_)
new StableBaseline({ apiKey: "sta_..." });

// OAuth 2.1 access token (interactive flow against api.stablebaseline.io/oauth/token)
new StableBaseline({ accessToken: "..." });

Both go in the Authorization: Bearer <...> header.

Tool catalogue

184 tools across 19 categories. The full list lives at stablebaseline.io/docs/mcp/tools. Highlights:

| Category | Sample tools | |---|---| | navigation | listOrganisations, listWorkspaces, listProjects, getProjectHierarchy, searchTools | | documents | createDocument, getDocument, editDocument, findAndReplaceTextInDocument, deleteDocument | | diagrams | insertDiagramInDocument, listDiagramTypes, getCdmdLanguageGuide | | plans | createPlan, createTask, getPlanHierarchy, previewTaskDependencyCascade | | improvements | createImprovement, searchImprovements, addImprovementEvidence | | knowledge_graph | kg_search, kg_get_entity, kg_related_documents | | members / teams / permissions | full org control plane | | billing | previewSubscriptionChange, applySubscriptionChange, purchaseCreditPackage |

Discover what's available at runtime:

const { tools } = await sb.listTools();
console.log(`${tools.length} tools available`);

Error handling

Errors throw StableBaselineToolError with status, code, message, and optional details:

import { StableBaseline } from "@stablebaseline/sdk";
import type { ToolError } from "@stablebaseline/sdk";

try {
  await sb.tools.createDocument({ folderId: "missing", title: "X", cdmd: "..." });
} catch (err) {
  const e = err as ToolError;
  if (e.code === "permission_denied") { /* ... */ }
  if (e.status === 404) { /* ... */ }
}

Type safety

Types are auto-generated from the live OpenAPI spec at https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1/openapi.json via openapi-typescript. To regenerate locally:

npm run codegen   # fetches spec + writes src/types.generated.ts
npm run build

A regen runs automatically before every npm publish via prepublishOnly, so each released version of the SDK matches the live API surface.

Other surfaces

This SDK is one of three first-party clients:

| Surface | Package | Use case | |---|---|---| | TypeScript SDK (this) | @stablebaseline/sdk | Node, browsers, Deno, Bun | | CLI | @stablebaseline/cli (binary sb) | Shells, scripts, CI/CD | | Python SDK | stablebaseline (PyPI) | Python apps, data work |

All three share the same auth, same tool surface, same handlers. The MCP server itself is the source of truth — see the public-facing repo.

License

MIT — see LICENSE at the repo root. The Stable Baseline product itself is proprietary SaaS at stablebaseline.io.