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

@aisahub/vibe-analytics

v0.1.0

Published

TypeScript client library for Vibe Analytics BI Bot API - Natural language to chart generation

Readme

@aisahub/vibe-analytics

TypeScript client library for Vibe Analytics BI Bot API - Natural language to chart generation.

Installation

npm install @aisahub/vibe-analytics

Peer Dependencies

Install the adapters you need:

# For Sequelize support
npm install sequelize

# For Prisma support
npm install @prisma/client

# For TypeORM support
npm install typeorm

# For Firebase streaming (optional)
npm install firebase-admin

Quick Start

import {
  ChartManager,
  SequelizeAdapter,
  SequelizeSchemaProvider,
  FirebaseStreamingProvider
} from '@aisahub/vibe-analytics';

// Initialize adapters
const storage = new SequelizeAdapter(models.ChartRequest, sequelize);
const schemaProvider = new SequelizeSchemaProvider(db);

// Optional: Firebase for real-time updates
const streaming = new FirebaseStreamingProvider({
  credentials: {
    projectId: process.env.FIREBASE_CHARTS_PROJECT_ID!,
    privateKey: Buffer.from(process.env.FIREBASE_CHARTS_PRIVATE_KEY_BASE64!, 'base64').toString('utf8'),
    privateKeyId: process.env.FIREBASE_CHARTS_PRIVATE_KEY_ID!,
    clientEmail: process.env.FIREBASE_CHARTS_CLIENT_EMAIL!,
    clientId: process.env.FIREBASE_CHARTS_CLIENT_ID!,
    clientX509CertUrl: process.env.FIREBASE_CHARTS_CLIENT_X509_CERT_URL!,
  },
  databaseURL: process.env.FIREBASE_CHARTS_URL!,
});

// Create the chart manager
const chartManager = new ChartManager({
  apiUrl: process.env.BI_BOT_API_URL!,
  apiKey: process.env.BI_BOT_SECRET_KEY!,
  storage,
  schemaProvider,
  streaming, // optional
});

// Create a chart from natural language
const chart = await chartManager.createChart('Show sales by region');

// Get all charts
const charts = await chartManager.getAllCharts();

// Refresh all charts with fresh data
const result = await chartManager.refreshAllCharts();
console.log(`Refreshed ${result.successfulCharts}/${result.totalCharts} charts`);

// Refresh a single chart
const updatedChart = await chartManager.refreshChart(chartId);

// Delete a chart
await chartManager.deleteChart(chartId);

Features

  • TypeScript Support: Full type definitions for autocomplete and type safety
  • Multiple ORMs: Built-in support for Sequelize, Prisma, and TypeORM
  • Real-time Updates: Optional Firebase streaming for chart refresh progress
  • Retry Logic: Exponential backoff with jitter for resilient API calls
  • Concurrency Control: Batch processing with configurable concurrency
  • Framework Agnostic: Works with Express, Fastify, or standalone
  • Extensible: Easy to create custom storage and schema adapters

Documentation

Project Status

🎉 Beta Ready - v0.1.0 (75% Complete)

This library is ready for beta testing! The following components are complete:

  • [x] Project structure and configuration
  • [x] TypeScript type definitions
  • [x] Error classes
  • [x] Core utilities (retry, concurrency, validators)
  • [x] BiBotClient (API client)
  • [x] Storage adapters (Sequelize, Prisma, TypeORM, InMemory)
  • [x] Schema providers (Sequelize, Prisma, TypeORM, Manual)
  • [x] Streaming providers (Firebase, NoOp)
  • [x] ChartProcessor (chart refresh orchestration)
  • [x] ChartManager (high-level API)
  • [x] Examples (Express + Sequelize, Custom Storage, Standalone)
  • [x] Documentation (API, Migration Guide, Adapter Guide)
  • [ ] Tests (in progress)
  • [ ] Publishing (pending)

Ready to use! Check out the examples to get started.

Development

# Install dependencies
npm install

# Build the library
npm run build

# Run tests
npm test

# Run tests with coverage
npm test:coverage

# Lint code
npm run lint

# Build and watch for changes
npm run build:watch

License

MIT

Support

For issues and questions, please open an issue on GitHub.