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

@umituz/web-ai-content

v1.0.4

Published

AI-powered content generation suite with platform-specific optimization, sentiment analysis, and SEO tools

Readme

@umituz/web-ai-content

AI-powered content generation suite with platform-specific optimization, sentiment analysis, SEO tools, and A/B testing capabilities.

Features

✅ Content Generation

  • Blog Generator - SEO-optimized blog posts with schema markup
  • Social Media Content - Platform-specific posts (Twitter, LinkedIn, Instagram, Threads, TikTok)
  • Video Scripts - Engaging scripts with visual cues and CTAs
  • Content Calendar - Automated content scheduling
  • Voice Content - Emotion-controlled script generation

✅ Analysis & Optimization

  • Sentiment Analysis - Detect emotions and sentiment (7 emotions)
  • SEO Optimizer - Advanced SEO scoring and optimization
  • Keyword Analysis - Density, prominence, and suggestions
  • A/B Testing Predictor - Predict engagement and compare variants

✅ Additional Tools

  • Hashtag Generator - Smart hashtag suggestions
  • Image Prompt Generator - AI image prompts for Midjourney/DALL-E
  • Multi-Platform Generator - Generate content for all platforms at once

Installation

npm install @umituz/web-ai-content
# or
yarn add @umituz/web-ai-content
# or
pnpm add @umituz/web-ai-content

Quick Start

1. Set up API Key

Get your API key from Anthropic Console

# .env.local
ANTHROPIC_API_KEY=your_api_key_here

2. Use the Hook

import { useBlogGenerator } from '@umituz/web-ai-content';

function BlogGenerator() {
  const { generateBlog, isGenerating, generatedBlog, error } = useBlogGenerator({
    apiKey: process.env.ANTHROPIC_API_KEY!,
  });

  const handleGenerate = async () => {
    await generateBlog({
      topic: 'The Future of AI in 2025',
      blogType: 'tutorial',
      targetKeywords: ['AI', 'machine learning', 'future technology'],
      tone: 'professional',
      wordCount: 1500,
      targetAudience: 'tech enthusiasts and developers',
      seoOptimization: true,
      includeImages: true,
      includeSchema: true,
      language: 'English',
    });
  };

  return (
    <div>
      <button onClick={handleGenerate} disabled={isGenerating}>
        {isGenerating ? 'Generating...' : 'Generate Blog Post'}
      </button>

      {error && <div className="error">{error}</div>}

      {generatedBlog && (
        <article>
          <h1>{generatedBlog.title}</h1>
          <div dangerouslySetInnerHTML={{ __html: generatedBlog.content }} />
          <div>SEO Score: {generatedBlog.seoScore}/100</div>
        </article>
      )}
    </div>
  );
}

Hooks

useAIContent

Main hook that provides access to all AI content generation features.

import { useAIContent } from '@umituz/web-ai-content';

const { generateSocialContent, analyzeSentiment, optimizeSEO } = useAIContent({
  apiKey: process.env.ANTHROPIC_API_KEY!,
});

// Generate social media post
await generateSocialContent({
  topic: 'New product launch',
  platform: 'twitter',
  tone: 'enthusiastic',
  hashtags: true,
});

// Analyze sentiment
await analyzeSentiment('This product is amazing!');

// Optimize for SEO
await optimizeSEO({
  content: 'Your content here',
  keywords: ['keyword1', 'keyword2'],
});

useBlogGenerator

Specialized hook for blog post generation.

import { useBlogGenerator } from '@umituz/web-ai-content';

const { generateBlog, isGenerating, generatedBlog } = useBlogGenerator({
  apiKey: process.env.ANTHROPIC_API_KEY!,
});

useSocialContentGenerator

Specialized hook for social media content generation.

import { useSocialContentGenerator } from '@umituz/web-ai-content';

const { generateForAllPlatforms, generatedContents } = useSocialContentGenerator({
  apiKey: process.env.ANTHROPIC_API_KEY!,
});

// Generate for all platforms
await generateForAllPlatforms('New feature announcement', 'professional');

API Reference

Blog Generation

interface BlogGenerationRequest {
  topic: string;
  blogType: 'tutorial' | 'listicle' | 'review' | 'opinion' | 'howto';
  targetKeywords: string[];
  tone: 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational';
  wordCount: number;
  targetAudience: string;
  seoOptimization: boolean;
  includeImages: boolean;
  includeSchema: boolean;
  language?: string;
}

Social Media Generation

interface SocialContentRequest {
  topic: string;
  platform: 'twitter' | 'linkedin' | 'instagram' | 'threads' | 'tiktok' | 'facebook';
  tone: 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational';
  hashtags?: boolean;
  maxLength?: number;
  targetAudience?: string;
  includeCallToAction?: boolean;
}

Sentiment Analysis

interface SentimentAnalysisResult {
  sentiment: 'positive' | 'neutral' | 'negative';
  confidence: number; // 0-1
  emotions: Array<{
    emotion: 'happy' | 'excited' | 'calm' | 'sad' | 'angry' | 'surprised' | 'fearful' | 'disgusted';
    score: number; // 0-1
  }>;
}

SEO Optimization

interface SEOOptimizationResult {
  optimized: string;
  score: number; // 0-100
  suggestions: string[];
  addedKeywords: string[];
  removedFillerWords: number;
  readabilityImprovements: string[];
  metaDescription?: string;
  titleSuggestions?: string[];
}

Platform Specifications

Each platform has optimized specifications:

| Platform | Max Length | Style | |----------|-----------|-------| | Twitter | 280 | Concise, thread-friendly | | LinkedIn | 3000 | Professional, insightful | | Instagram | 2200 | Visual, emoji-rich | | Threads | 500 | Conversational | | TikTok | 150 | Catchy, trending | | Facebook | 63206 | Conversational, shareable |

Examples

Generate Content Calendar

const calendar = await generateContentCalendar('tech startup', 30);
// Returns 30 days of content ideas with platforms and engagement predictions

A/B Testing Prediction

const predictions = await predictABTest({
  variants: [
    { id: '1', content: 'Variant A', contentType: 'social', tone: 'casual' },
    { id: '2', content: 'Variant B', contentType: 'social', tone: 'professional' },
  ],
  targetAudience: 'millennials',
  platform: 'twitter',
  goals: ['engagement', 'clicks'],
});

Voice Script with Emotion

const script = await generateVoiceScript(
  'Product announcement',
  'excited',
  30 // 30 seconds
);

Architecture

This package follows Domain-Driven Design (DDD) principles:

src/
├── domain/           # Types, interfaces, entities
├── application/      # Services, business logic
├── infrastructure/   # External integrations
└── presentation/     # React hooks, UI utilities

License

MIT © umituz

Support

For issues and questions, please visit the GitHub repository.