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

@heysalad/ai

v0.2.0

Published

Unified AI provider interface for workflow automation

Readme

@heysalad/ai

Unified AI provider interface for workflow automation. Build AI-powered workflows that work across OpenAI, Anthropic, AWS Bedrock, Google Vertex, and more.

Features

  • 🔄 Multi-Provider Support: OpenAI, Anthropic (+ Bedrock, Vertex, Groq coming soon)
  • 🎯 Unified API: Same interface across all providers
  • 🛠️ Action System: Built-in workflow actions (chat, verify, webhook)
  • 🔐 Security First: Verification system for human-in-the-loop workflows
  • 📦 TypeScript Native: Full type safety and autocomplete
  • 🚀 OpenClaw Ready: Designed for workflow automation

Installation

npm install @heysalad/ai

Quick Start

import { createClient } from '@heysalad/ai';

// Create client
const client = createClient();

// Configure providers
client.configureProvider('openai', {
  apiKey: process.env.OPENAI_API_KEY!,
  defaultModel: 'gpt-4-turbo',
});

client.configureProvider('anthropic', {
  apiKey: process.env.ANTHROPIC_API_KEY!,
  defaultModel: 'claude-opus-4-6',
});

// Chat with default provider
const response = await client.chat({
  model: 'gpt-4-turbo',
  messages: [
    { role: 'user', content: 'Hello, world!' }
  ],
});

console.log(response.content);

// Chat with specific provider
const anthropicResponse = await client.chat({
  model: 'claude-opus-4-6',
  messages: [
    { role: 'user', content: 'Analyze this code...' }
  ],
}, 'anthropic');

Streaming

const stream = client.stream({
  model: 'gpt-4-turbo',
  messages: [
    { role: 'user', content: 'Write a story...' }
  ],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.delta);
}

Actions & Workflows

// Register custom action
client.actions.register({
  type: 'custom',
  name: 'send-email',
  description: 'Send an email notification',
  execute: async (params) => {
    // Your email logic here
    return { sent: true, messageId: '123' };
  },
});

// Execute action
const result = await client.actions.execute('send-email', {
  to: '[email protected]',
  subject: 'Hello',
  body: 'World',
});

Provider Support

| Provider | Status | Models | |----------|--------|--------| | OpenAI | ✅ Ready | GPT-4, GPT-3.5, etc. | | Anthropic | ✅ Ready | Claude Opus, Sonnet, Haiku | | AWS Bedrock | 🔄 Coming Soon | All Bedrock models | | Google Vertex | 🔄 Coming Soon | Gemini, PaLM | | Hugging Face | 🔄 Coming Soon | Open source models | | DeepSeek | 🔄 Coming Soon | DeepSeek models | | Mistral | 🔄 Coming Soon | Mistral models | | Groq | 🔄 Coming Soon | Fast inference |

Configuration

client.configureProvider('openai', {
  apiKey: 'sk-...',
  baseURL: 'https://api.openai.com/v1', // Optional
  defaultModel: 'gpt-4-turbo',
  timeout: 60000, // 60 seconds
  retries: 3,
  metadata: { /* custom metadata */ },
});

Advanced Usage

Multiple Providers

// Use different providers for different tasks
const summary = await client.chat({
  model: 'gpt-4-turbo',
  messages: [{ role: 'user', content: 'Summarize...' }],
}, 'openai');

const analysis = await client.chat({
  model: 'claude-opus-4-6',
  messages: [{ role: 'user', content: 'Analyze deeply...' }],
}, 'anthropic');

List Models

const models = await client.listModels('openai');
console.log(models);

OpenClaw Integration

// Perfect for OpenClaw workflows
import { createClient } from '@heysalad/ai';

const ai = createClient();
ai.configureProvider('anthropic', {
  apiKey: process.env.ANTHROPIC_API_KEY!,
});

// Use in OpenClaw workflow
async function analyzeAndAct(input: string) {
  const analysis = await ai.chat({
    model: 'claude-opus-4-6',
    messages: [
      { role: 'system', content: 'You are a workflow automation expert.' },
      { role: 'user', content: input },
    ],
  });

  // Execute workflow action
  await ai.actions.execute('webhook', {
    url: 'https://api.example.com/action',
    data: { result: analysis.content },
  });
}

License

MIT

Links