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

@socialsforai/ai-sdk

v0.1.0

Published

SocialsForAI tools for the Vercel AI SDK: let a model publish, schedule and measure posts on X, LinkedIn, Bluesky, Mastodon, Telegram, Discord and more.

Readme

@socialsforai/ai-sdk

SocialsForAI tools for the Vercel AI SDK: let a model publish, schedule and measure posts on X, LinkedIn, Bluesky, Mastodon, Telegram, Discord, Slack, Nostr and more.

npm install @socialsforai/ai-sdk ai
import { generateText, stepCountIs } from "ai";
import { socialsTools } from "@socialsforai/ai-sdk";

const { text } = await generateText({
  model,
  tools: socialsTools(), // reads SOCIALSFORAI_API_KEY
  stopWhen: stepCountIs(8),
  prompt: "Announce our webhooks launch on LinkedIn and Bluesky. Dry-run first and show me the text.",
});

It works the same with streamText and the Agent class.

Tools

| Tool | What it does | | --- | --- | | list_accounts | Connected accounts and their ids | | list_platforms | Networks, their limits and what each supports | | create_connect_link | A link for the account owner to connect accounts | | create_post | Publish or schedule (dry runs, threads, auto_thread, scheduled_at: "best", repeat, approvals, replies) | | create_posts | Up to 50 posts at once, such as a content calendar | | get_post, list_posts | Status and links per account | | get_post_metrics | Likes, reposts, replies, views | | list_replies | What people replied under a post, so the model can answer them | | list_events | What happened since last time: failures, approvals, reconnections | | delete_post | Off by default; pass includeDestructive: true or name it in tools |

Errors come back to the model as { error: { code, message, fix } }, so it can read the fix and act on it. Publishing sends an idempotency key, so a retried call never posts twice.

socialsTools({ tools: ["list_accounts", "create_post"] }); // only some tools
socialsTools({ apiKey: "sk_..." });                         // an explicit key
socialsTools({ client: new SocialsForAI({ apiKey }) });     // your own client

To keep a person in the loop, give the model a key that requires approval. Every post then waits until someone approves it at a link:

const socials = new SocialsForAI({ apiKey: process.env.SOCIALSFORAI_ADMIN_KEY });
const { key } = await socials.keys.create({ name: "agent", scopes: ["posts:write"], require_approval: true });
socialsTools({ apiKey: key });

The same tools are available in Python for LangChain, CrewAI and the OpenAI Agents SDK (pip install socialsforai), and over MCP at https://socialsforai.com/api/mcp.