Metadata-Version: 2.4
Name: viralanalyzer-cli
Version: 0.2.2
Summary: CLI for ViralAnalyzer — competitive intelligence + AI media generation (subtitles, music, voice, bg-remove) from your terminal. 48 actors, 20 MCP tools.
Author-email: ViralAnalyzer Team <contato@viralanalyzer.com.br>
License: Proprietary
Project-URL: Homepage, https://viralanalyzer.com.br
Project-URL: Documentation, https://api.viralanalyzer.com.br/docs
Project-URL: Repository, https://github.com/Pauloeduspbr/viral-analyzer
Project-URL: Apify Store, https://apify.com/viralanalyzer
Keywords: cli,ai,media,subtitles,music,voice,tts,background-removal,competitive-intelligence,viral,analytics,apify,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: typer[all]>=0.12.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: rich>=13.7.0
Requires-Dist: textual>=0.70.0
Provides-Extra: web
Requires-Dist: textual-serve>=1.1.0; extra == "web"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: respx>=0.21; extra == "dev"
Requires-Dist: coverage>=7.4; extra == "dev"
Requires-Dist: textual-serve>=1.1.0; extra == "dev"

# ViralAnalyzer CLI

> The most complete AI-powered competitive intelligence + media generation platform — from your terminal.

[![PyPI version](https://badge.fury.io/py/viralanalyzer-cli.svg)](https://pypi.org/project/viralanalyzer-cli/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)

---

## What is ViralAnalyzer?

ViralAnalyzer is a **full-stack AI SaaS platform** that combines:

- **Competitive Intelligence** — 43 scrapers monitoring TikTok, Instagram, YouTube, Twitter/X, LinkedIn, Reddit, Google Maps, Amazon, eBay, and 34+ more platforms
- **AI Media Studio** — Generate photorealistic images, cinematic videos, 4K upscaling, music, voice, subtitles, and background removal — all powered by our private HuggingFace Spaces running on NVIDIA H200 GPUs
- **Multi-Model AI Engine** — 5 providers (Gemini, OpenAI, Grok, Anthropic, Groq), 13 models with automatic fallback chains
- **Social Distribution** — Automated posting to 8 platforms (LinkedIn, Twitter, Instagram, Facebook, Threads, TikTok, YouTube, Substack)
- **MCP Server** — 20 tools for AI assistants (Claude Desktop, Cursor, Windsurf, VS Code)

---

## Install

```bash
pip install viralanalyzer-cli
```

## Quick Start

```bash
viral auth login --email you@email.com --password yourpass
viral dashboard stats
viral content list --platform tiktok --limit 10
```

---

## AI Media Studio

Our crown jewel. Generate professional media assets without leaving the terminal. Zero GPU setup needed — everything runs on our cloud infrastructure.

### Photorealistic Image Generation (FLUX.1 Dev — 12B params)

Generate stunning photorealistic images with FLUX.1 Dev, one of the most powerful open-source text-to-image models.

```bash
# Landscape for YouTube thumbnail
viral media generate-image "A futuristic city skyline at golden hour, cinematic" --aspect 16:9

# Square for Instagram
viral media generate-image "Minimalist product photo on marble desk" --aspect 1:1

# Portrait for TikTok/Reels
viral media generate-image "Fashion model in neon-lit Tokyo street" --aspect 9:16

# Batch: 10 unique variations
viral media generate-image "Epic mountain landscape" --count 10
```

**Features**: 3 aspect ratios (16:9, 1:1, 9:16) | Batch up to 10 images | 28 inference steps | Guidance scale control

### 4K AI Upscaling + Face Restoration (Real-ESRGAN + CodeFormer)

Upscale any image or video frame to **4K resolution** with AI super-resolution. Includes face restoration that dramatically improves faces in photos.

```bash
# Upscale image to 4K with face enhancement
viral media enhance-4k https://example.com/photo.jpg --faces --resolution 4K

# Dual output: landscape (16:9) + portrait (9:16) from single image
viral media enhance-4k https://example.com/image.jpg --dual-output
```

**Features**: Real-ESRGAN x4 upscaling | CodeFormer face restoration | 720p to 4K | 1080p to 8K-quality | Dual aspect ratio output | Zero quality loss cropping

### AI Video Generation (Wan2.2 Image-to-Video)

Transform any image into a cinematic video clip. Combined with FLUX.1 image generation and 4K upscaling, this creates a complete text-to-4K-video pipeline.

```bash
# Generate 15s video from image
viral media generate-video https://example.com/hero-image.jpg --duration 15

# Full pipeline: text → image → video → 4K
viral media generate-image "Ocean waves crashing on rocks at sunset" --aspect 16:9
viral media generate-video [image-url] --duration 15
viral media enhance-4k [video-url] --resolution 4K --dual-output
```

**Features**: Wan2.2 I2V model | 15s and 60s clips | Landscape + Portrait | 4K upscaling pipeline | Frame interpolation (24fps to 48fps)

### AI Subtitle Generator (Whisper Large V3 Turbo — 99 Languages)

The most accurate open-source speech recognition, now with stylized burn-in captions.

```bash
# TikTok-style word-by-word highlights
viral media subtitle https://example.com/video.mp4 --style tiktok --lang auto

# Netflix classic subtitles
viral media subtitle https://example.com/movie.mp4 --style netflix --lang pt

# Translate Japanese audio to English subtitles
viral media subtitle https://example.com/anime.mp4 --translate --lang ja

# Export SRT/VTT only (no burn-in)
viral media subtitle https://example.com/podcast.mp3 --style none
```

**Features**: 99 languages | 98% accuracy (WER ~2%) | Word-level timestamps | 10 burn-in styles (TikTok, YouTube, Netflix, Karaoke, Minimal, Bold, Neon, News, Cinematic) | Auto-translate | SRT + VTT + JSON output

### AI Music Generator (MusicGen Large — 3.3B params)

Generate royalty-free, original music tracks from text descriptions.

```bash
# Cinematic film score
viral media music "dramatic orchestral with strings and brass building to crescendo" --style cinematic --duration 60

# LoFi study beats
viral media music "chill lo-fi hip hop with soft piano and vinyl crackle" --style lofi --duration 30

# Corporate video background
viral media music "upbeat motivational for product demo" --style corporate --duration 15

# Brazilian bossa nova
viral media music "nylon guitar with soft percussion, sophisticated" --style bossa --duration 45
```

**Features**: 3.3B parameter model by Meta | 20 style presets (Cinematic, LoFi, Corporate, Epic, EDM, Jazz, Ambient, Rock, Pop, Classical, Hip Hop, Acoustic, Electronic, Reggae, Country, R&B, Metal, Bossa Nova, Funk, World) | Up to 60 seconds | WAV + MP3 | Temperature and guidance control

### AI Background Remover (BiRefNet — Best Edge Accuracy)

Remove backgrounds with the most accurate open-source segmentation model. Replace with transparent, solid color, custom image, or blur.

```bash
# Transparent PNG for e-commerce
viral media remove-bg https://example.com/product.jpg --mode transparent

# White background (Amazon/Shopify standard)
viral media remove-bg https://example.com/item.jpg --mode white

# Custom background image
viral media remove-bg https://example.com/portrait.jpg --mode custom_image --bg-url https://example.com/beach.jpg

# Batch 20 product photos
viral media remove-bg --batch urls.json --mode white
```

**Features**: BiRefNet (state-of-the-art edge detection) | 6 background modes (transparent, white, black, blur, custom color, custom image) | Batch up to 20 images | PNG + WebP output | Segmentation mask included

### AI Voice Generator (Edge TTS — 300+ Neural Voices)

Generate natural, expressive speech from text. Perfect for video narration, podcasts, and voiceovers.

```bash
# Professional narrator (English)
viral media voice "Welcome to our quarterly earnings presentation" --voice narrator --lang en

# Brazilian Portuguese podcast
viral media voice "Neste episodio vamos falar sobre marketing digital" --voice podcast --lang pt

# News anchor style
viral media voice "Breaking: AI surpasses human performance" --voice news --lang en --speed 1.1

# Whisper ASMR style
viral media voice "Close your eyes and relax" --voice whisper --lang en --speed 0.8
```

**Features**: Microsoft Edge TTS neural voices | 8 voice styles (Narrator, Podcast, Commercial, News, Dramatic, Calm, Energetic, Whisper) | 8 languages (EN, PT-BR, ES, FR, DE, JA, KO, ZH) | Speed control 0.5x-2.0x | WAV + MP3

### AI Subtitle Eraser (LAMA Inpainting + EasyOCR)

Remove hardcoded subtitles, watermarks, and text overlays from videos and images. The AI reconstructs the background seamlessly.

```bash
# Auto-detect and remove all text
viral media erase-subtitle https://example.com/movie-with-subs.mp4

# Target bottom third only (faster)
viral media erase-subtitle https://example.com/video.mp4 --region bottom_third

# Remove watermark from image
viral media erase-subtitle https://example.com/watermarked-photo.jpg
```

**Features**: LAMA inpainting (seamless background reconstruction) | EasyOCR text detection (8 languages) | Auto-detect or manual region | Images + Videos | Detection mask output

---

## Media Jobs Management

```bash
# List all media jobs
viral media jobs

# Filter by type
viral media jobs --type music_generator

# Check monthly usage and costs
viral media usage

# Dashboard KPIs
viral media dashboard --days 30
```

---

## Competitive Intelligence (43 Scrapers)

Monitor any platform, any competitor, any market — automatically.

```bash
# Trigger all scrapers
viral pipelines trigger --platform all

# Specific platforms
viral pipelines trigger --platform tiktok
viral pipelines trigger --platform google_maps

# Check pipeline status
viral pipelines runs --limit 10

# Configure targets
viral pipelines configs list
viral pipelines configs set instagram --profiles "@nike,@adidas" --max-posts 20
```

### Platform Coverage (43 Actors)

| Category | Platforms |
|----------|-----------|
| **Social Media** | TikTok, Instagram, YouTube, Twitter/X, Reddit, LinkedIn, Pinterest, Telegram |
| **E-Commerce** | Mercado Livre, Amazon BR, iFood, eBay, Shopify |
| **Reviews** | Google Maps, Reclame Aqui, Trustpilot |
| **Business** | CNPJ Enricher, Government Transparency, Brazil Jobs |
| **Finance** | Yahoo Finance, TradingView, CoinGecko, Sports Betting |
| **Knowledge** | Hacker News, GitHub Trending, Stack Overflow, arXiv, Wikipedia, Open Library, NPM, Steam |
| **Advertising** | Facebook Ads Library |
| **News** | RSS Intelligence, Google Trends, Craigslist |
| **Monitoring** | Website Change Monitor, Brand Visibility, SEO Intelligence, Competitor Hub, Influencer Discovery |

---

## All Command Groups

| Command | Description |
|---------|-------------|
| `viral auth` | Login, register, whoami |
| `viral content` | Browse and search collected content (views, likes, viral score) |
| `viral ideas` | AI-generated content ideas with viral potential scoring |
| `viral trends` | Platform trend analysis and emerging topics |
| `viral profiles` | Manage monitored profiles and targets |
| `viral pipelines` | Pipeline execution and configs (43 scrapers) |
| `viral dashboard` | Dashboard KPIs, history, and snapshots |
| `viral billing` | Plan usage, Stripe billing info |
| `viral ai` | AI model settings, usage tracking, cost monitoring |
| `viral engage` | Social engagement automation and analytics |
| `viral analyze` | Analyze content files for viral potential |
| `viral hub` | Content Hub — format ideas into platform-specific posts |
| `viral media` | **AI Media Studio** (images, video, 4K, subtitles, music, voice, bg-remove, eraser) |
| `viral mcp` | MCP server for AI assistants (20 tools) |

---

## MCP Server (20 Tools)

Integrate ViralAnalyzer directly into AI assistants:

```bash
viral mcp serve
```

Works with **Claude Desktop**, **Cursor**, **Windsurf**, and **VS Code**. 20 tools including:

- Content search and analysis
- Trend discovery
- Idea generation
- Social media posting
- **Image generation** (FLUX.1)
- **Music generation** (MusicGen)
- **Voice generation** (Edge TTS)
- **Subtitle generation** (Whisper)
- **Background removal** (BiRefNet)
- **Subtitle erasure** (LAMA)

---

## Infrastructure

| Component | Technology |
|-----------|-----------|
| **API** | FastAPI on Railway (2 Gunicorn workers) |
| **Database** | PostgreSQL 16 |
| **Cache** | Redis 7 |
| **AI GPU** | 8 HuggingFace Spaces (ZeroGPU — NVIDIA H200) |
| **Scrapers** | 43 Apify actors (Node.js + Crawlee) |
| **Media Actors** | 5 Apify actors (pay-per-event) |
| **Workflows** | 7 n8n workflows (cron + webhooks) |
| **Landing** | Astro + React on Vercel |
| **Payments** | Stripe |

---

## Pricing

| Plan | Price | Scrapers | Media Jobs/mo | AI Models |
|------|-------|----------|---------------|-----------|
| **Trial** | Free | 3 platforms | 5 jobs | Gemini |
| **Starter** | $9/mo | 10 platforms | 50 jobs | GPT-4o-mini |
| **Business** | $29/mo | 25 platforms | 200 jobs | Grok + all |
| **Enterprise** | $99/mo | All 43 | 1000 jobs | All 13 models |

---

## Links

- **Website**: [viralanalyzer.com.br](https://viralanalyzer.com.br)
- **API Docs**: [api.viralanalyzer.com.br/docs](https://api.viralanalyzer.com.br/docs)
- **Apify Store**: [apify.com/viralanalyzer](https://apify.com/viralanalyzer) (48 actors)
- **GitHub**: [github.com/Pauloeduspbr/viral-analyzer](https://github.com/Pauloeduspbr/viral-analyzer)

---

**Built with** FastAPI + Astro + PostgreSQL + Redis + HuggingFace Spaces + Apify + n8n + Stripe

**AI Models**: FLUX.1 Dev (12B) | Wan2.2 I2V | Real-ESRGAN x4 | CodeFormer | MusicGen Large (3.3B) | Whisper V3 Turbo | BiRefNet | LAMA | Edge TTS | Gemini | GPT-4.1 | Grok-4 | Claude Sonnet 4.6 | Groq Llama-4
