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

xalen-sdk

v0.3.0

Published

XALEN SDK — AI Infrastructure for the Faith Economy. OpenAI-compatible.

Readme

xalen-sdk

The official JavaScript / TypeScript SDK for the XALEN AI API — one OpenAI-compatible endpoint for 200+ AI models (chat, embeddings, image generation, speech) plus Vedic / Western / KP / Vastu astrology. It is a drop-in for the OpenAI SDK.

Installation

npm install xalen-sdk

Quick Start

import XALEN from 'xalen-sdk';

const client = new XALEN({ apiKey: 'xln_live_your_key_here' });

const response = await client.chat.completions.create({
  model: 'grok-4.5',
  messages: [{ role: 'user', content: 'Explain retrieval-augmented generation in two sentences.' }],
});

console.log(response.choices[0].message.content);

Every method from the OpenAI SDK works unchanged — you are talking to https://api.xalen.io/v1.

Authentication

Pass apiKey: 'xln_live_...' or set the environment variable:

export XALEN_API_KEY=xln_live_your_key_here

API keys start with xln_live_. Get one at xalen.io/dashboard.

Streaming

const stream = await client.chat.completions.create({
  model: 'deepseek-v3',
  messages: [{ role: 'user', content: 'Write a haiku about the monsoon.' }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || '');
}

Embeddings

const result = await client.embeddings.create({
  model: 'text-embedding-3-small',
  input: ['The quick brown fox', 'A lazy dog sleeps'],
});
console.log(result.data[0].embedding.slice(0, 5));

Image Generation

const image = await client.images.generate({
  model: 'dall-e-3',
  prompt: 'A serene Himalayan temple at sunrise, watercolor style',
  n: 1,
});
console.log(image.data[0].url ?? image.data[0].b64_json?.slice(0, 40));

Text to Speech

import fs from 'node:fs';

const speech = await client.audio.speech.create({
  model: 'tts-1',
  voice: 'alloy',
  input: 'Welcome to XALEN, AI infrastructure for the faith economy.',
});
fs.writeFileSync('welcome.mp3', Buffer.from(await speech.arrayBuffer()));

Wallet Balance

const balance = await client.getBalance();
console.log(balance); // { balance: 42.5, currency: 'usd', ... }

API Base URL

Default: https://api.xalen.io/v1. Override with new XALEN({ baseURL: '...' }).

Documentation

Full API docs: xalen.io/docs

License

MIT