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

byeego

v0.1.2

Published

Official Byeego SDK — embed the Byeego AI assistant into any website or app, with a typed browser loader, React bindings, and a Node client for the Developer API.

Readme

@byeego/sdk

Official Byeego SDK. Embed the Byeego AI assistant into any website or app with a typed browser loader, React bindings, and a Node client for the Developer API.

This package is a thin, typed wrapper. The assistant runtime is served from the Byeego backend (/api/sdk.js), so the package stays a few KB and never goes stale — you always get the latest assistant behaviour without bumping a version.

npm install @byeego/sdk
# or: pnpm add @byeego/sdk / yarn add @byeego/sdk

Three entry points:

| Import | Use it for | | --- | --- | | @byeego/sdk | Framework-agnostic browser loader + typed window.Byeego API | | @byeego/sdk/react | <ByeegoWidget /> component and useByeego() hook | | @byeego/sdk/server | Typed Node client for the /v1 Developer API (server-side) |


1. Browser (any framework or plain JS)

import { initByeego } from "@byeego/sdk";

const { api } = await initByeego({
  installKey: "bgo_app_xxx", // public environment install key
});

api.open();                       // open the chat panel
await api.ask("How do refunds work?");
api.track("checkout_started", { plan: "pro" }, "workflow");

Headless (use your own UI, no floating launcher):

const { api } = await initByeego({ installKey: "bgo_app_xxx", widget: false });
const answer = await api.ask("What are your hours?");

Origin

By default the loader fetches the SDK from https://widget.byeego.com. Override it for local development or a custom widget domain:

await initByeego({ installKey: "bgo_app_xxx", origin: "http://localhost:3002" });

2. React / Next.js / Remix

import { ByeegoWidget } from "@byeego/sdk/react";

export default function App() {
  return (
    <>
      {/* your app */}
      <ByeegoWidget installKey="bgo_app_xxx" />
    </>
  );
}

The component renders nothing itself (the launcher + iframe are injected by the runtime), is SSR-safe, and closes the panel on unmount. In Next.js App Router, render it from a Client Component ("use client").

Imperative control with the hook:

import { useByeego } from "@byeego/sdk/react";

function SupportButton() {
  const { api, loading } = useByeego({ installKey: "bgo_app_xxx", widget: false });
  return (
    <button disabled={loading} onClick={() => api?.openSupport()}>
      Need help?
    </button>
  );
}

react is an optional peer dependency — it's only required if you import from @byeego/sdk/react.


3. Server-to-server (Node)

Manage bots, conversations, app installs, leads, and webhooks from your backend with a typed client. Keep the API key server-side only.

import { ByeegoServerClient, ByeegoApiError } from "@byeego/sdk/server";

const byeego = new ByeegoServerClient({
  apiKey: process.env.BYEEGO_API_KEY!, // bgo_live_... or bgo_test_...
});

try {
  const { bots } = await byeego.get<{ bots: unknown[] }>("/bots");
  const created = await byeego.post("/conversations", { bot_id: "bot_123" });
} catch (err) {
  if (err instanceof ByeegoApiError) {
    console.error(err.code, err.status, err.requestId);
  }
}

Reseller keys must scope each call to a managed client. Set it once:

const byeego = new ByeegoServerClient({
  apiKey: process.env.BYEEGO_RESELLER_KEY!,
  clientId: 4021,
});

Base URL defaults to https://connect.byeego.com. For local dev:

new ByeegoServerClient({ apiKey: "bgo_test_...", baseUrl: "http://localhost:3000" });

Browser API reference

initByeego() / loadByeego() resolve the window.Byeego object:

| Method | Description | | --- | --- | | init(options) | Load config, start a session, mount the widget | | identify(identity) | Start a session for a known/signed visitor | | track(name, props?, type?) | Track a product event | | setContext(context) | Update page/screen/feature context | | open() / close() / toggle() | Control the chat panel | | openSupport() / openGuide() / openOnboarding() | Track + open in a mode | | sendMessage(text) | Send a message, get { conversationId, answer } | | ask(text) | Send a message, resolve just the answer string | | config() / session() | Read current config / session |

Development

npm install
npm run build      # emits dist/ with .js + .d.ts for all three entry points
npm run typecheck

License

MIT