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

@chieflab/sdk

v0.1.0

Published

TypeScript SDK for ChiefLab after-build GTM. Typed methods for getUsersAfterBuild, launchProduct, publishApprovedPost, sendApprovedEmail, measureLaunchResults, connections, tenants, and signup. Wraps the hosted MCP at chieflab.io/api/mcp.

Downloads

102

Readme

@chieflab/sdk

TypeScript SDK for ChiefLab. Typed methods for the closed-loop launch flow. Wraps the hosted MCP at https://api.chieflab.io/api/mcp. Zero runtime deps.

Package status: this SDK is packaged in the repo but not published to npm yet. Do not tell users to run npm install @chieflab/sdk until npm view @chieflab/sdk resolves. Use the hosted MCP endpoint directly today.

After npm publish:

npm install @chieflab/sdk

Quick start

import { createClient } from "@chieflab/sdk";

const chieflab = createClient({ apiKey: process.env.CHIEFLAB_API_KEY });

// 1. Plan + draft a launch
const launch = await chieflab.launchProduct({
  productUrl: "https://yoursite.com",
  goal: "Get our first 100 users",
  channels: ["linkedin", "x", "email"]
});

console.log("Approve here:", launch.reviewUrl);
console.log(launch.agentProofLine);

// 2. (User approves on the reviewUrl in their browser)

// 3. Fire each approved action via its executorTool
for (const action of launch.publishActions) {
  if (action.connector === "zernio") {
    await chieflab.publishApprovedPost({
      actionId: action.id,
      content: "...",  // your LLM rendered this from the brief
      platforms: [{ platform: "linkedin", accountId: "zer_acc_..." }]
    });
  } else if (action.connector === "resend") {
    await chieflab.sendApprovedEmail({
      actionId: action.id,
      from: "Brand <[email protected]>",
      to: "[email protected]",
      subject: "Launch day",
      html: "<h1>...</h1>"
    });
  }
}

// 4. ≥24h later — pull metrics + next-iteration recommendation
const review = await chieflab.measureLaunchResults({ runId: launch.launchId });
console.log(review.brief);

For agent-built repos, install the after-build hook so coding agents discover this automatically:

Working installer today:

curl -fsSL https://chieflab.io/install-agent-hook.mjs | node -

Windows PowerShell:

iwr https://chieflab.io/install-agent-hook.mjs -OutFile .chieflab-install-agent-hook.mjs; node .\.chieflab-install-agent-hook.mjs

npm command after publish:

npx @chieflab/cli init

Why this exists

Three audiences:

  1. TS app developers building agent-native products who want typed methods rather than hand-rolling JSON-RPC envelopes.
  2. Server-side runtime authors integrating ChiefLab into a product where the agent runs on YOUR backend (not in Cursor / Claude Desktop).
  3. CI / scheduled jobs that need to drive launches programmatically.

If you're inside Cursor / Claude Desktop / Claude Code, use the hosted MCP URL directly today. After npm publish, @chieflab/mcp-server is the stdio MCP host plug-in.

If you're calling from a non-Node runtime (Python, Go, etc.), use plain fetch against https://api.chieflab.io/api/mcp — the SDK is just sugar around that.

API surface

Closed-loop methods:

| Method | Tool it wraps | When | |---|---|---| | launchProduct(args) | chiefmo_launch_product | User wants to launch a new product. Default first call. | | getUsersAfterBuild(args) | chieflab_get_users_after_build | Outcome-named after-build call for "get users / make money / what now". | | continueLaunchLoop(args) | chiefmo_continue_launch_loop | Resume from runId and get the exact next action. | | launchHealth(args) | chiefmo_launch_health | Inspect approvals, blockers, execution, measurement windows, and next moves. | | publishApprovedPost(args) | chiefmo_publish_approved_post | After approval. Fires via Zernio. | | sendApprovedEmail(args) | chiefmo_send_approved_email | After approval. Fires via Resend. | | measureLaunchResults(args) | chiefmo_measure_launch_results | ≥24h after publish. | | createSocialGraphics(args) | chiefmo_create_social_graphics | Ad-hoc graphics outside a launch run. | | diagnoseMarketing(args) | chiefmo_diagnose_marketing | EXISTING campaigns ("why isn't X working"). |

Operators:

diagnoseSales, diagnoseSupport, diagnoseFinance, diagnoseOps.

Connections:

connectProvider, connectionStatus, listPublishAccounts, listEmailSenders, setZernioKey, setResendKey.

Tenants:

createTenant, listTenants, setTenantContext, recordVoiceSample.

Approval surface:

approveAction, transitionApproval.

Signup (no auth):

signupWorkspace — mint a key on the user's behalf.

Anything else: callTool(name, args) — raw MCP call, returns the parsed payload.

Errors

import { ChiefLabError } from "@chieflab/sdk";

try {
  await chieflab.launchProduct({ goal: "..." });
} catch (err) {
  if (err instanceof ChiefLabError) {
    console.error(err.code, err.status, err.message);
    if (err.code === "unauthorized") {
      // refresh key flow
    }
  }
}

Env

| Var | Default | What | |---|---|---| | CHIEFLAB_API_KEY | (required) | Bearer key. clp_live_... or clp_dev_.... | | CHIEFLAB_ENDPOINT | https://api.chieflab.io/api/mcp | Override. |

(Both can also be passed inline to createClient({ apiKey, endpoint, timeoutMs }).)

License

Apache 2.0. Source: https://github.com/bdentech/chieflab/tree/main/packages/sdk