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

mboaai-sdk

v1.0.18

Published

Lightweight JavaScript SDK for calling MboaAI agents

Readme

MboaAI JavaScript SDK

Tiny, framework-agnostic helper to talk to MboaAI agents from Node, React, Vue, Angular, Svelte or plain-browser JS.

  • ✅ One-line init({ apiKey })
  • ✅ await T.translate(text, targetLang, type?)
  • ✅ Graceful fallback → returns original text when the agent fails
  • ✅ UMD and ESM builds (works with import or require)
  • ✅ TypeScript types included

🛠 Installation

npm i mboaai-sdk           # or  yarn add mboaai-sdk  /  pnpm add …

🚀 Quick start

import { T } from "mboaai-sdk";

await T.init({
  apiKey: "yourKey",     // ← required
  defaultType: "website",        // optional: default pipeline
});

const de = await T.translate("Bonjour tout le monde", "DE");      // uses defaultType
console.log(de);   // → „Hallo zusammen“

const it = await T.translate("Hello!", "IT", "standard");         // override pipeline
console.log(it);   // → „Ciao!“

Node (CommonJS)

const { T } = require("mboaai-sdk");

(async () => {
  await T.init({ apiKey: process.env.MBOAAI_KEY });
  console.log(await T.translate("Salut", "EN"));
})();

Plain browser (UMD script tag)

<script src="https://cdn.jsdelivr.net/npm/mboaai-sdk"></script>
<script>
  (async () => {
    await MboaAI.T.init({ apiKey: "yourKey" });
    const es = await MboaAI.T.translate("Wie geht's?", "ES");
    console.log(es);
  })();
</script>

📚 API

| Method | Description | | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | await T.init(opts) | Establishes SSE connection and stores your API key. Call once. | | await T.translate(text, lang, type?) | Returns translated string, or original text on error. type defaults to the value given in init() (else "standard"). |

TranslateType

"standard" | "website" | any string Future pipelines (e.g. "legal", "marketing") are accepted automatically.


📝 Example – Straight-up translation

import { T } from "mboaai-sdk";

(async () => {
  /* 1)  Initialise once */
  await T.init({
    apiKey : "yourKey",                          // your secret key
    defaultType : "website",                       // optional
  });

  /* 2)  Translate a French marketing line into English (defaultType = "website") */
  const fr = "Découvrez nos nouvelles chaussures de sport éco-responsables !";
  const en = await T.translate(fr, "EN");          // → uses “website” pipeline
  console.log("English:", en);

  /* 3)  Translate the same line into Italian using the “standard” pipeline */
  const it = await T.translate(fr, "IT", "standard");
  console.log("Italian:", it);
})();

⚠️ Error handling

  • If the agent returns malformed JSON or network fails, the SDK logs a warning and returns the original text unchanged so your UI never breaks.

📦 Bundle details

| File | Format | Usage | | ------------------------ | ------ | ------------------------------------ | | dist/mboaai-sdk.esm.js | ESM | modern bundlers, Node ≥16 import | | dist/mboaai-sdk.umd.js | UMD | <script> tag, CommonJS require() |

The build is minified with Terser and ships its TypeScript typings (index.d.ts).


🛡 License

MIT © 2025 MboaAI.