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

socialrails

v1.0.0

Published

CLI for SocialRails — schedule posts, manage accounts, generate AI content, and view analytics from your terminal.

Readme

socialrails

Official CLI for SocialRails — schedule posts, manage accounts, generate AI content, and view analytics from your terminal.

All output is JSON to stdout, making it ideal for scripting, CI/CD pipelines, and AI agent integrations.

Installation

npm install -g socialrails

Setup

Set your API key as an environment variable:

export SOCIALRAILS_API_KEY="sr_live_your_key_here"

Get your key from Dashboard > Settings > API Keys.

Optionally override the API URL (defaults to https://socialrails.com/api/v1):

export SOCIALRAILS_API_URL="https://socialrails.com/api/v1"

Commands

Schedule a post

socialrails posts:create -c "Check out our new feature!" -p twitter -s "2026-03-15T14:30:00Z"

Create a draft

socialrails posts:create -c "Draft post for review" -p linkedin

Create a thread (Twitter/Threads)

socialrails posts:create --thread \
  -c "1/ Here's why we built SocialRails" \
  -c "2/ Managing 9 platforms is chaos" \
  -c "3/ One API to schedule everywhere" \
  -c "4/ Try it free at socialrails.com" \
  -p twitter -s "2026-03-15T14:30:00Z"

Batch post to multiple platforms

socialrails posts:batch -c "Big announcement!" --platforms twitter,linkedin,facebook -s "2026-03-15T14:30:00Z"

List posts

socialrails posts:list --status scheduled --platform twitter --limit 10

Delete a post

socialrails posts:delete <post-id>

View analytics

socialrails analytics --period 30d --platform twitter

List connected accounts

socialrails accounts

Get account settings & capabilities

socialrails accounts:settings <account-id>

Generate AI content

socialrails ai:generate --prompt "Write a tweet about our product launch" --platform twitter --tone excited

Upload media

From a local file:

socialrails upload ./image.jpg --type image

From a URL:

socialrails upload --url "https://example.com/photo.jpg" --type image

Get workspace info

socialrails workspace

Workflow Examples

Schedule a post with media

# 1. Upload the image
MEDIA=$(socialrails upload ./hero.jpg --type image | jq -r '.data.key')

# 2. Schedule the post with the uploaded media
socialrails posts:create \
  -c "New blog post is live!" \
  -p twitter \
  -s "2026-03-15T14:30:00Z" \
  -m "$MEDIA"

AI-powered content calendar

# Generate content for each day of the week
for day in Monday Tuesday Wednesday Thursday Friday; do
  CONTENT=$(socialrails ai:generate \
    --prompt "Write a LinkedIn post about productivity tips for $day" \
    --platform linkedin \
    --tone professional | jq -r '.data.content')

  socialrails posts:create -c "$CONTENT" -p linkedin -s "2026-03-15T09:00:00Z"
done

Cross-platform scheduling

# Same content everywhere
socialrails posts:batch \
  -c "We just hit 10,000 users! Thank you all." \
  --platforms twitter,linkedin,facebook,threads,bluesky \
  -s "2026-03-15T12:00:00Z"

AI Agent Guide

The CLI outputs JSON to stdout and errors to stderr, making it easy for AI agents (Claude, GPT, etc.) to use:

  1. Discover accounts: socialrails accounts to list connected platforms
  2. Check capabilities: socialrails accounts:settings <id> to learn character limits and settings
  3. Generate content: socialrails ai:generate --prompt "..." to create platform-optimized content
  4. Schedule posts: socialrails posts:create -c "..." -p <platform> -s "..."
  5. Verify: socialrails posts:list --status scheduled to confirm scheduling
  6. Monitor: socialrails analytics --period 7d to check performance

Error responses always use exit code 1 with JSON on stderr:

{"error":{"code":"BAD_REQUEST","message":"Content must be 5000 characters or fewer."}}

Supported Platforms

Twitter/X, LinkedIn, Facebook, Instagram, TikTok, Bluesky, Pinterest, Threads, YouTube.

Documentation

License

MIT