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

@getalai/client

v0.0.2

Published

This SDK provides convenient access to Alai's API methods for authentication, presentation management, slide generation, and theme retrieval.

Readme

📘 Alai SDK – Usage Guide

This SDK provides convenient access to Alai's API methods for authentication, presentation management, slide generation, and theme retrieval.


🔐 Auth Module

alai.auth.Authenticate

Authenticates a user via email and password using Alai's password grant method.

Usage

import { alai } from '@getalai/client';

const token = await alai.auth.Authenticate({
  email: "[email protected]",
  password: "securePassword123"
});

Returns

Promise<IToken>

Throws

An error if authentication fails.


🖼️ Presentation Module

alai.presentation.CreateNewPresentation

Creates a new presentation with a title and a theme.

Usage

const presentation = await alai.presentation.CreateNewPresentation({
  presentation_title: "Climate Change Overview",
  theme_id: "theme_xyz"
});

Returns

Promise<IPresentation>

alai.presentation.MakePresentationShareable

Generates a public link for the specified presentation.

Usage

const { link } = await alai.presentation.MakePresentationShareable({
  presentation_id: "presentation_123"
});

Returns

Promise<{ link: string }>

alai.presentation.UpdatePresentationTheme

Updates the theme of an existing presentation.

Usage

const updatedPresentation = await alai.presentation.UpdatePresentationTheme({
  presentation_id: "presentation_123",
  theme_id: "new_theme_id"
});

alai.presentation.UpdatePresentationTitle

Updates the title of a presentation.

Usage

await alai.presentation.UpdatePresentationTitle({
  presentation_id: "presentation_123",
  presentation_title: "New Title"
});

alai.presentation.GetPresentationQuestions

Fetches all questions linked to a given presentation.

Usage

const questions = await alai.presentation.GetPresentationQuestions({
  presentation_id: "presentation_123"
});

Returns

Promise<IQuestion[]>

alai.presentation.CalibrateTone

Adjusts the tone of given text for a presentation.

Usage

const result = await alai.presentation.CalibrateTone({
  presentation_id: "presentation_123",
  original_text: "This is a sample paragraph.",
  tone_type: "INSPIRATIONAL",
  tone_instructions: null
});

Returns

Promise<{ sample_text: string }>

alai.presentation.CalibrateVerbosity

Adjusts the verbosity of text based on specified levels and tone.

Usage

const result = await alai.presentation.CalibrateVerbosity({
  presentation_id: "presentation_123",
  original_text: "This is a detailed explanation...",
  verbosity_level: 2,
  previous_verbosity_level: 4,
  tone_type: "CASUAL",
  tone_instructions: null
});

alai.presentation.GetThemes

Retrieves a list of all available presentation themes.

Usage

const themes = await alai.presentation.GetThemes();

Returns

Promise<ITheme[]>

🧩 Slides Module

alai.slides.GenerateSlidesOutline

Generates slide outlines using a WebSocket.

Usage

const result = await alai.slides.GenerateSlidesOutline({
  presentation_id: "presentation_123",
  slide_order: 1,
  raw_context: "Climate change is a pressing issue...",
  presentation_instructions: "Make it beginner-friendly",
  slide_range: "1-5",
  presentation_questions: []
});

alai.slides.CreateSlides

Creates slides and their variants using outline data.

Usage

const { presentation, slide, variants } = await alai.slides.CreateSlides({
  presentation_id: "presentation_123",
  presentation_instructions: "Explain with simple language",
  raw_context: "Global warming trends...",
  slide_id: "slide_001",
  slide_outlines: [], // Populate with IOutline[]
  starting_slide_order: 1,
  update_tone_verbosity_calibration_status: true
});

alai.slides.SetActiveVariant

Sets a chosen variant as the active one for a slide.

Usage

await alai.slides.SetActiveVariant({
  slide_id: "slide_001",
  variant_id: "variant_456"
});

alai.slides.UpdateSlideEntity

Updates the content or metadata of a slide.

Usage

await alai.slides.UpdateSlideEntity({
  id: "slide_001",
  content: "Updated content here...",
  order: 2
});

alai.slides.SetSlideStatus

Sets the status of a slide.

Usage

await alai.slides.SetSlideStatus({
  slide_id: "slide_001",
  slide_status: "DEFAULT"
});

alai.slides.PickSlideVariant

Manually pick a variant to be used for a slide.

Usage

await alai.slides.PickSlideVariant({
  slide_id: "slide_001",
  variant_id: "variant_456"
});

alai.slides.CreateAndStreamSlides

Creates and streams slide data and its variants over WebSocket.

Usage

const result = await alai.slides.CreateAndStreamSlides({
  presentation_id: "presentation_123",
  slide_id: "slide_001",
  // additional parameters depending on implementation
});