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

auraai-sdk

v0.0.8

Published

The official Aura AI SDK

Readme

Aura AI SDK

The official SDK for integrating the Aura AI Chat Widget into your web applications.

This SDK handles the injection of the widget script, provides type-safe configuration, and allows you to bridge your frontend code to the AI agent using Tools and Context.

Features

  • 🚀 Auto-Initialization: Automatically injects and configures the widget.
  • ⚛️ React & Vue Support: Dedicated providers and hooks/composables.
  • 🛠 AI Tools: Register client-side functions that the AI can execute (e.g., "Add to cart", "Change theme").
  • 🧠 AI Context: Feed dynamic app state to the AI (e.g., "Current User", "Page Data").
  • 🛡 Type Safe: Built with TypeScript and Zod.

Installation

npm install auraai-sdk zod
# or
yarn add auraai-sdk zod
# or
pnpm add auraai-sdk zod

Usage with React

1. Setup the Provider

Wrap your application with AuraProvider. This will initialize the widget.

// App.tsx
import { AuraProvider } from "auraai-sdk/react";

function App() {
  return (
    <AuraProvider
      config={{
        apiKey: "YOUR_API_KEY",
      }}
    >
      <YourApp />
    </AuraProvider>
  );
}

2. Registering Tools (Functions for AI) & Contexts (Dynamic App State)

Use the useTool hook to let the AI control your UI. Use the useAuraContext hook to feed dynamic app state to the AI.

import { useAuraContext, useTool } from "auraai-sdk/react";
import z from "zod";

const ProductsPage = () => {
  // Register a tool
  useTool({
    name: "addToCart",
    description: "Adds the current product to the shopping cart",
    displayContent: "Add {quantity} items to Cart",
    parameters: z.object({
      quantity: z.number().describe("Number of items to add"),
    }),
    execute: async ({ quantity }) => {
      console.log("Added", quantity, "items to cart");
      return { success: true, message: `Added ${quantity} items` };
    },
  });

  // Register a context
  useAuraContext("user", () =>
    JSON.stringify({
      name: "user",
      description: "User information",
      data: {
        name: "John Doe",
        age: 30,
        email: "[email protected]",
      },
    })
  );

  return <div>Product Details...</div>;
};

Usage with Vue 3

1. Setup the Plugin

// main.ts
import { createApp } from "vue";
import { createAura } from "auraai-sdk/vue";
import App from "./App.vue";

const app = createApp(App);

app.use(
  createAura({
    apiKey: "YOUR_API_KEY",
  })
);

app.mount("#app");

2. Registering Tools and Contexts

<script setup lang="ts">
import { useContext, useTool } from "auraai-sdk/vue";
import z from "zod";

// Register a tool
useTool({
  name: "alertUser",
  description: "Shows an alert to the user",
  displayContent: "Alert {message}",
  parameters: z.object({ message: z.string().describe("Message to show") }),
  execute: ({ message }) => {
    alert(message);
    return { success: true }; // You should return a value
  },
});

// Register a context
useContext("user", () =>
  JSON.stringify({
    name: "user",
    description: "User information",
    data: {
      name: "John Doe",
      age: 30,
      email: "[email protected]",
    },
  })
);
</script>

Usage with Vanilla JS

import { AuraClient } from "auraai-sdk";
import z from "zod";

// Initialize the chat widget
const client = new AuraClient({
  apiKey: "YOUR_API_KEY",
});

// Register a tool
client.registerTool({
  name: "alertUser",
  description: "Shows an alert to the user",
  displayContent: "Alert {message}",
  parameters: z.object({ message: z.string().describe("Message to show") }),
  execute: ({ message }) => {
    alert(message);
    return { success: true }; // You should return a value
  },
});

// Register a context
client.registerContext("user", () =>
  JSON.stringify({
    name: "user",
    description: "User information",
    data: {
      name: "John Doe",
      age: 30,
      email: "[email protected]",
    },
  })
);

Configuration

| Option | Type | Default | Description | |---|---|---|---| | apiKey | string | Required | Your project API Key from the Aura Dashboard. | | theme | 'light' | 'dark' | 'system' | 'system' | Sets the color scheme of the widget. | | locale | 'en' | 'fa' | 'en' | Sets the language of the UI. | | loadScript | boolean | true | If false, the SDK expects you to manually load the widget script. | | debug | boolean | false | Logs tool execution details to the console. |