Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Universal AI Studio: Open-Source AI Social Media Automation & Scheduler

The Ultimate Open-Source AI Social Media Post Generator & Automation Tool for Content Creators & AI Agents
Streamline WordPress, YouTube, Instagram, Facebook Page, Meta Threads, Telegram, Bluesky, Mastodon, Discord, Pinterest, TikTok, LinkedIn, and X from one unified Localhost Web GUI & Python API suite.

Universal AI Studio - Open-Source AI Social Media Scheduler Dashboard

License: MIT Python Version Platform Build Status


πŸ“‹ Table of Contents


🌟 Executive Overview

Universal AI Studio is an open-source, local-first automation platform built to solve the fragmentation of digital content creation. Content creators and AI software engineers often have to manually cross-post articles, format social media updates, edit video metadata, and manage API keys across multiple platforms.

Universal AI Studio centralizes your publishing workflow into a local Dashboard, Composer, Scheduler, Analytics view, and Credential Manager at http://localhost:5000.

Why Choose Universal AI Studio?

  • Free Hootsuite & Buffer Alternative: Self-host your own social media scheduling without expensive monthly subscriptions.
  • AI Social Media Post Generator: Native AI Agent Integration designed out-of-the-box for AI coding assistants like Google Antigravity, Cursor, Claude, ChatGPT, and Windsurf.
  • 13-Platform Engine Registry: All social engines inherit from BaseEngine and are discovered through config/platforms.json.
  • Cross-Platform Composer: One payload can be adapted for character limits, links, hashtags, and platform-specific formats.
  • Local Scheduler & Analytics: SQLite stores the post queue, post history, and local analytics snapshots on your PC.
  • πŸ”’ 100% Zero Key Leaks: All credentials remain local inside your .env file. No cloud servers, no third-party telemetry, no chat-key leaks.
  • πŸ“ Dynamic Image Aspect Ratios: Automatically generates branded, high-resolution graphics for Google Discover (16:9 - 1200x675), YouTube Thumbnails (16:9 - 1280x720), Instagram Posts (1:1 - 1080x1080), and Instagram Reels / Stories (9:16 - 1080x1920).
  • πŸ“’ 100% English Telegram Broadcasting: Smart cross-matching algorithm that scans your live WordPress site and YouTube Channel, pairs related videos with blog posts, and broadcasts clean English updates to your Telegram Channel.

πŸ—οΈ System Architecture & Data Flow

flowchart TD
    User([πŸ‘€ User / AI Agent]) -->|Localhost GUI / CLI| App[πŸ’» app.py / Localhost:5000]
    
    subgraph Security Layer
        ENV[πŸ”’ .env Credential Manager]
    end
    
    App --> ENV
    
    subgraph Engine Suite
        WP[πŸ“ WPEngine]
        YT[πŸ“Ή YTEngine]
        TG[✈️ TGEngine]
        IG[πŸ“Έ IGEngine]
        FB[πŸ“˜ FBEngine]
        TH[🧡 ThreadsEngine]
        IMG[🎨 ImageUtils]
    end
    
    App --> WP
    App --> YT
    App --> TG
    App --> IG
    App --> FB
    App --> TH
    WP --> IMG
    
    subgraph External Platforms
        WP_API[🌐 Hostinger / Live WordPress REST API]
        YT_API[🎬 YouTube Data API v3]
        TG_API[πŸ“’ Telegram Bot API]
        META_API[πŸ“± Meta Graph API v19.0]
    end
    
    WP -->|Publish Drafts & Images| WP_API
    YT -->|Scan & Edit Metadata| YT_API
    TG -->|Broadcast Blog + Video Matches| TG_API
    IG -->|Publish Photos & Reels| META_API
    FB -->|Publish Page Feed| META_API
    TH -->|Publish Threads| META_API
Loading

✨ Key Features & Capabilities

1. πŸ“ WordPress Automation Engine (core/wp_engine.py)

  • AI Blog Generation: Generates 1,500+ word structured technical articles with table of contents.
  • Rank Math 100/100 SEO: Injects JSON-LD schema, robots meta tags (max-image-preview:large), focus keywords, meta descriptions, and clean URL slugs.
  • Google Discover Ready: Automatically creates 1200x675 (16:9 HD) featured images to prevent 1024x1024 square crop penalty in Google Discover feeds.
  • Live Hostinger Publishing: Direct REST API upload of draft content, featured images, and metadata.

2. πŸ“Ή YouTube Data API Engine (core/yt_engine.py)

  • Channel Video Scanner: Fetches all channel uploads, titles, description snippets, tag counts, and privacy status.
  • Live Metadata Editor: Batch update YouTube titles, tags (up to 500 chars), descriptions, and chapters.
  • HD Thumbnail Generator: Renders 1280x720 (16:9 HD) custom styled thumbnails with brand overlays.

3. ✈️ Telegram Channel Broadcast Engine (core/tg_engine.py)

  • Smart Blog & Video Matching: Cross-matches live WordPress articles with related YouTube videos based on keyword overlap and direct links.
  • 100% English Broadcasting: Formats clean, publication-ready messages with titles, bulleted summaries, live blog links, YouTube video links, and hashtags.
  • Clean Channel Management: Built-in function to prune or delete test message IDs via Telegram Bot API deleteMessage.

4. πŸ“² Meta Social Suite (core/ig_engine.py, core/fb_engine.py, core/threads_engine.py)

  • Instagram Photo & Reels: Uploads 1:1 photos and 9:16 vertical Reels via Meta Graph API v19.0.
  • Facebook Page Feed: Post updates, custom links, and media directly to your brand page.
  • Meta Threads: Broadcast short tech updates to Threads.

⚑ Quick Start: 1-Click AI Setup

If you use an AI Coding Assistant (Google Antigravity, Cursor, Claude, ChatGPT, or Windsurf), setup takes under 30 seconds:

  1. Clone this repository:
    git clone https://github.com/Sadhi-Team-16/Universal-AI-Studio.git
    cd Universal-AI-Studio
  2. Open UNIVERSAL_AI_PROMPT.md, copy the entire prompt text, and paste it into your AI assistant.
  3. The AI assistant will automatically:
    • Create .env from .env.example
    • Install required dependencies (pip install -r requirements.txt)
    • Test live connection status
    • Start the Localhost Web GUI at http://localhost:5000

πŸ› οΈ Manual Installation & Setup Guide

1. Prerequisites

  • Python: Version 3.9 or higher installed on your computer.
  • Git: Installed on your system.

2. Clone the Repository

git clone https://github.com/Sadhi-Team-16/Universal-AI-Studio.git
cd Universal-AI-Studio

3. Setup Virtual Environment (Recommended)

On Windows:

python -m venv .venv
.venv\Scripts\activate

On Linux / macOS:

python3 -m venv .venv
source .venv/bin/activate

4. Install Dependencies

pip install -r requirements.txt

5. Create Local .env Configuration

cp .env.example .env

πŸ”‘ Step-by-Step API Key & Credential Setup

All credentials must be placed inside your local .env file or saved via the Credential Manager in the Localhost GUI (http://localhost:5000).

1. WordPress REST API Setup

  1. Log in to your WordPress Admin dashboard (https://yourdomain.com/wp-admin).
  2. Go to Users βž” Profile (or Users βž” Edit User).
  3. Scroll down to Application Passwords.
  4. Type a name (e.g. Universal AI Studio) and click Add New Application Password.
  5. Copy the generated 24-character password into your .env:
    LIVE_WP_URL='https://yourdomain.com/wp-json/wp/v2'
    LIVE_WP_USER='your_admin_email@example.com'
    LIVE_WP_APP_PASS='XXXX XXXX XXXX XXXX XXXX XXXX'

2. YouTube Data API v3 Setup

  1. Go to Google Cloud Console.
  2. Create a new project or select an existing project.
  3. Navigate to APIs & Services βž” Library βž” Search for YouTube Data API v3 βž” Click Enable.
  4. Go to APIs & Services βž” Credentials βž” Click Create Credentials βž” Select OAuth client ID.
  5. Choose Application Type: Desktop App βž” Click Create.
  6. Click DOWNLOAD JSON and save the file as client_secret.json in your project root directory.
  7. Update your .env:
    YOUTUBE_CLIENT_SECRET_PATH='client_secret.json'
    YOUTUBE_TOKEN_PATH='token.json'

3. Telegram Bot & Channel Setup

  1. Open Telegram and search for @BotFather.
  2. Send /newbot and follow the prompts to create your bot.
  3. Copy the HTTP API Token provided by BotFather.
  4. Add your newly created bot as an Administrator to your Telegram Channel (with "Post Messages" permission).
  5. Update your .env:
    TELEGRAM_BOT_TOKEN='123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ'
    TELEGRAM_CHANNEL_ID='@your_channel_username'

4. Meta Graph API (Instagram, Facebook & Threads) Setup

  1. Go to Meta for Developers.
  2. Click My Apps βž” Create App βž” Select Business type.
  3. Enable Instagram Graph API, Facebook Login for Business, and Threads API.
  4. Open Tools βž” Graph API Explorer.
  5. Select your App, grant permissions (pages_manage_posts, pages_read_engagement, instagram_basic, instagram_content_publish), and generate a Permanent User Access Token.
  6. Copy your Access Token, Facebook Page ID, and Instagram Account ID into .env:
    META_ACCESS_TOKEN='your_meta_access_token'
    FB_PAGE_ID='your_facebook_page_id'
    INSTAGRAM_ACCOUNT_ID='your_instagram_account_id'
    THREADS_ACCOUNT_ID='your_threads_account_id'

5. Free Open Platform Setup

These platforms do not require paid API access:

BLUESKY_HANDLE='your_handle.bsky.social'
BLUESKY_APP_PASSWORD='your_bluesky_app_password'
MASTODON_INSTANCE_URL='https://mastodon.social'
MASTODON_ACCESS_TOKEN='your_mastodon_access_token'
DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/xxx/yyy'

6. Gated or Paid Platform Setup

Pinterest, TikTok, and LinkedIn require developer approval. X/Twitter requires paid API access for many accounts.

PINTEREST_ACCESS_TOKEN='your_pinterest_access_token'
PINTEREST_BOARD_ID='your_default_board_id'
TIKTOK_CLIENT_KEY='your_tiktok_client_key'
TIKTOK_CLIENT_SECRET='your_tiktok_client_secret'
TIKTOK_ACCESS_TOKEN='your_tiktok_access_token'
LINKEDIN_ACCESS_TOKEN='your_linkedin_access_token'
LINKEDIN_AUTHOR_URN='urn:li:person:your_member_id'
X_API_KEY='your_x_api_key'
X_API_SECRET='your_x_api_secret'
X_ACCESS_TOKEN='your_x_access_token'
X_ACCESS_SECRET='your_x_access_secret'

πŸ–₯️ How to Run & Operate the Studio

Option A: 1-Click Launchers

  • On Windows: Double-click run_studio.bat
  • On Linux / macOS:
    chmod +x run_studio.sh
    ./run_studio.sh

Option B: Terminal Command

python app.py

Open your browser at http://localhost:5000 to access Dashboard, Compose, Schedule, Analytics, and Credentials.


πŸ“ Repository Structure

The current v2 layout adds config/, db/, a shared BaseEngine, dynamic EngineRegistry, ContentAdapter, PostScheduler, AnalyticsCollector, and individual engines for all 13 platforms.

Universal-AI-Studio/
β”œβ”€β”€ app.py                      # Flask Localhost Web Server (GUI)
β”œβ”€β”€ run_studio.bat               # 1-Click Windows Launcher Script
β”œβ”€β”€ run_studio.sh                # 1-Click Linux / macOS Launcher Script
β”œβ”€β”€ AGENTS.md                    # Agentic AI Directives & Execution Manual
β”œβ”€β”€ SETUP_WITH_AI.md             # AI Setup & Installation Guide
β”œβ”€β”€ UNIVERSAL_AI_PROMPT.md       # 1-Click Copy-paste AI Setup Prompt
β”œβ”€β”€ requirements.txt             # Python Package Dependencies
β”œβ”€β”€ .env.example                 # Environment Credentials Template
β”œβ”€β”€ client_secret.json.example   # YouTube OAuth Client Secret Template
β”œβ”€β”€ .gitignore                   # Git Ignore Rules for Secrets & Local Data
β”œβ”€β”€ core/                        # Core Engine Modules
β”‚   β”œβ”€β”€ wp_engine.py             # WordPress Publishing & SEO Engine
β”‚   β”œβ”€β”€ yt_engine.py             # YouTube Data API v3 Engine
β”‚   β”œβ”€β”€ tg_engine.py             # Telegram Channel Broadcast Engine
β”‚   β”œβ”€β”€ ig_engine.py             # Instagram Graph API Engine
β”‚   β”œβ”€β”€ fb_engine.py             # Facebook Page Engine
β”‚   └── threads_engine.py        # Meta Threads Engine
β”œβ”€β”€ utils/                       # Utility Modules
β”‚   β”œβ”€β”€ env_manager.py           # Local .env Manager
β”‚   └── image_utils.py           # Dynamic Image & Watermark Generator
β”œβ”€β”€ templates/                   # Frontend Web GUI
β”‚   └── index.html               # Localhost GUI Dashboard
└── data/                        # Local Reports & Cache (Git Ignored)

❓ Troubleshooting & FAQ

Q1: Port 5000 is already in use error?

Answer: run_studio.bat and app.py automatically kill stalled background processes on port 5000. If needed, manually free port 5000 or change port=5000 in app.py.

Q2: Python UnicodeEncodeError on Windows CMD?

Answer: All scripts in Universal AI Studio automatically invoke sys.stdout.reconfigure(encoding='utf-8') and chcp 65001 to prevent Windows cp1252 character mapping crashes.

Q3: Telegram messages failed to post?

Answer: Ensure your bot is added as an Administrator in your channel with post permissions, and check that TELEGRAM_CHANNEL_ID starts with @ (e.g. @techgvs).

Q4: How do I change default branding?

Answer: Update BRAND_NAME, BRAND_WEBSITE, and BRAND_YOUTUBE_HANDLE inside your local .env file. All generated graphics and footers will adapt automatically!


πŸ“œ Official Links, Branding & Copyright

Β© 2026 Tech GVS. All Rights Reserved.
Distributed under the Open Source MIT License for creators, developers, and AI engineers worldwide.


Keywords: AI social media automation, content automation AI, open-source social media scheduler, Hootsuite alternative open source, free Buffer alternative, AI social media post generator, AI agents for social media, Python social media automation, self-hosted social media management.

About

Open-source AI social media automation tool and content scheduler for creators and AI agents. A free self-hosted Hootsuite & Buffer alternative.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages