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

universal-ai-sdk

v2.0.2

Published

A **unified AI SDK for Node.js/TypeScript** that lets you talk to **multiple AI providers (OpenAI, Anthropic/Claude, DeepSeek, etc.)** with **one simple API**. No need to learn multiple SDKs β€” just plug in your API key and go! πŸš€

Readme

universal-ai-sdk

A unified AI SDK for Node.js/TypeScript that lets you talk to multiple AI providers (OpenAI, Anthropic/Claude, DeepSeek, etc.) with one simple API.
No need to learn multiple SDKs β€” just plug in your API key and go! πŸš€


Features

  • One API for multiple AI providers
  • Supports OpenAI, Anthropic (Claude), DeepSeek (more coming soon)
  • TypeScript support out of the box
  • Switch providers easily (no code changes needed)
  • Normalized response format ({ text, raw })

Installation

npm install universal-ai-sdk
πŸ”‘ Setup
Add your API keys to a .env file or system environment variables:

ini

OPENAI_API_KEY=sk-xxxx
ANTHROPIC_API_KEY=sk-ant-xxxx
DEEPSEEK_API_KEY=sk-deep-xxxx
 Usage
Example 1: OpenAI (ChatGPT)
ts

import { chat } from "universal-ai-sdk";

async function run() {
  const res = await chat({
    provider: "openai",
    model: "gpt-4",
    messages: [{ role: "user", content: "Tell me a joke about cats" }],
  });

  console.log(res.text);
}

run();
Example 2: Switch to Anthropic (Claude)
ts

const res = await chat({
  provider: "anthropic",
  model: "claude-3-opus",
  messages: [{ role: "user", content: "Tell me a joke about cats" }],
});

console.log(res.text);
Example 3: DeepSeek
ts

const res = await chat({
  provider: "deepseek",
  model: "deepseek-chat",
  messages: [{ role: "user", content: "Write a haiku about the moon" }],
});

console.log(res.text);
API Reference
chat(options: AIRequest): Promise<AIResponse>
AIRequest
ts

{
  provider: "openai" | "anthropic" | "deepseek";
  model: string;
  messages: { role: "system" | "user" | "assistant"; content: string }[];
  stream?: boolean; // (coming soon)
}
AIResponse
ts

{
  text: string; // normalized AI reply
  raw: any;     // full provider response
}
 Roadmap
 Streaming responses (async generator)

 Token usage tracking

 Support for embeddings & images

 CLI tool (npx universal-ai "Hello" --provider openai)

 More providers (Gemini, Groq, Mistral, Llama 3, etc.)

 Contributing
Pull requests, issues, and new provider integrations are welcome! πŸŽ‰

πŸ“œ License
MIT Β© 2025 Muhammad Abdullah
πŸ“§ Email: [email protected]

yaml