FujiwaraChoki/MoneyPrinterV2
Overview
MoneyPrinterV2 (MPV2) is an open-source Python 3.12 application designed to automate various online money-making workflows. It provides a CLI-driven interface for automating YouTube Shorts creation and uploads, Twitter bot posting, affiliate marketing (Amazon + Twitter), and local business outreach (scraping and cold emailing). The project is a complete rewrite of the original MoneyPrinter, focusing on modularity, extensibility, and support for a broader feature set.
Key workflows include:
- YouTube Shorts Automation: Generates scripts using LLMs, creates images via Gemini (Nano Banana 2), synthesizes voice with KittenTTS, composes videos with MoviePy, and uploads via Selenium.
- Twitter Bot: Automates tweet generation (LLM) and posting using Selenium with pre-authenticated Firefox profiles.
- Affiliate Marketing: Scrapes Amazon product pages, generates pitches using LLMs, and posts them to Twitter.
- Outreach: Scrapes local businesses from Google Maps (via a Go-based scraper), extracts emails, and sends cold outreach via SMTP.
Architecture
MPV2 is structured as a CLI-first application with a modular codebase. The main entry point is src/main.py, which presents an interactive menu for users to manage accounts, run bots, and schedule jobs. Core logic for each workflow is encapsulated in dedicated classes (e.g., YouTube, Twitter, AFM, Outreach) under the src/classes/ directory (not shown in the file list but referenced in documentation and code). Configuration is read from config.json, with a template provided for easy setup.
Persistent state (accounts, posts, videos, products) is stored as JSON files in the .mp/ directory at the project root, managed by src/cache.py. The app uses a provider pattern for LLM, image generation, and speech-to-text (STT) services, with selection and configuration handled via the config file. LLM tasks are performed using a local Ollama server, while image generation relies on the Gemini API (Nano Banana 2). Browser automation is handled via Selenium, using pre-authenticated Firefox profiles for seamless posting/uploading.
Key Features
- Interactive CLI: Menu-driven interface for managing YouTube/Twitter accounts, affiliate products, and outreach campaigns (src/main.py).
- LLM Integration: Unified text generation via Ollama, with model selection at startup or via config (src/llm_provider.py).
- Image & Video Automation: AI image generation (Gemini), TTS (KittenTTS), and video composition (MoviePy) for YouTube Shorts.
- Browser Automation: Selenium-based automation for Twitter and YouTube, using persistent Firefox profiles.
- Affiliate Marketing: Amazon scraping, pitch generation, and Twitter posting (docs/AffiliateMarketing.md).
- Local Business Outreach: Google Maps scraping (Go binary), email extraction, and SMTP outreach.
- Scheduling: In-process CRON jobs using the
schedulelibrary, spawning subprocesses for headless automation (src/cron.py). - Extensive Documentation: Detailed guides for configuration, features, and contributing in the
docs/directory.
Configuration & Extensibility
All configuration is managed via config.json, supporting settings for API keys, provider URLs, threading, SMTP credentials, and more. The app supports environment variable fallbacks for sensitive keys. The modular structure, provider pattern, and clear separation of concerns make it straightforward to extend or adapt the tool for new platforms or workflows. Scripts in the scripts/ directory assist with setup, preflight checks, and direct invocation of core automation flows.
Example Usage
git clone https://github.com/FujiwaraChoki/MoneyPrinterV2.git
cd MoneyPrinterV2
cp config.example.json config.json
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python src/main.py
For more details, see the README and Configuration Guide.