MoneyPrinterV2

Automate the process of making money online.

30,929 stars Python Markdown Skills API Spec #automation#cli#json#money
AI Prompts & Specs

Repository: FujiwaraChoki/MoneyPrinterV2


Stars: 29863

CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

MoneyPrinterV2 (MPV2) is a Python 3.12 CLI tool that automates four online workflows:
1. YouTube Shorts — generate video (LLM script → TTS → images → MoviePy composite) and upload via Selenium
2. Twitter/X Bot — generate and post tweets via Selenium
3. Affiliate Marketing — scrape Amazon product info, generate pitch, share on Twitter
4. Local Business Outreach — scrape Google Maps (Go binary), extract emails, send cold outreach via SMTP

There is no web UI, no REST API, no test suite, no CI, and no linting config.

Running the Application

bash

First-time setup


cp config.example.json config.json # then fill in values
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

macOS quick setup (auto-configures Ollama, ImageMagick, Firefox profile)


bash scripts/setup_local.sh

Preflight check (validates services are reachable)


python scripts/preflight_local.py

Run


python src/main.py

The app must be run from the project root. python src/main.py adds src/ to sys.path, so all imports use bare module names (e.g., from config import , not from src.config import ).

Architecture

Entry Points


- src/main.py — interactive menu loop (primary)
- src/cron.py — headless runner invoked by the scheduler as a subprocess: python src/cron.py <platform> <account_uuid>

Provider Pattern


Two service categories use a string-based dispatch pattern configured in config.json:

| Category | Config key | Options |
|---|---|---|
| LLM | ollama_model | Ollama (via ollama Python SDK). If empty, user picks from available models at startup. |
| Image gen | — | nanobanana2 (Gemini image API) |
| STT | stt_provider | local_whisper, third_party_assemblyai |

LLM always uses the local Ollama server. Image generation always uses Nano Banana 2.

Key Modules


- src/llm_provider.py — unified generate_text(prompt) function using the Ollama Python SDK
- src/config.py — 30+ getter functions, each re-reads config.json on every call (no caching). ROOT_DIR = project root, computed as os.path.dirname(sys.path[0])
- src/cache.py — JSON file persistence in .mp/ directory (accounts, videos, posts, products)
- src/constants.py — menu strings, Selenium selectors (YouTube Studio, X.com, Amazon)
- src/classes/YouTube.py — most complex class; full pipeline: topic → script → metadata → image prompts → images → TTS → subtitles → MoviePy combine → Selenium upload
- src/classes/Twitter.py — Selenium automation against x.com
- src/classes/AFM.py — Amazon scraping + LLM pitch generation
- src/classes/Outreach.py — Google Maps scraper (requires Go) + email sending via yagmail
- src/classes/Tts.py — KittenTTS wrapper

Data Storage


All persistent state lives in .mp/ at the project root as JSON files (youtube.json, twitter.json, afm.json). This directory also serves as scratch space for temporary WAV, PNG, SRT, and MP4 files — non-JSON files are cleaned on each run by rem_temp_files().

Browser Automation


Selenium uses pre-authenticated Firefox profiles (never handles login). The profile path is stored per-account in the cache JSON and also in config.json as a default.

CRON Scheduling


Uses Python's schedule library (in-process, not OS cron). The scheduled job spawns subprocess.run(["python", "src/cron.py", platform, account_id]).

Configuration

All config lives in config.json at the project root. See config.example.json for the full template and docs/Configuration.md for reference. Key external dependencies to configure:
- ImageMagick — required for MoviePy subtitle rendering (imagemagick_path)
- Firefox profile — must be pre-logged-in to target platforms (firefox_profile)
- Ollama — for LLM text generation (via ollama Python SDK)
- Nano Banana 2 — for image generation (Gemini image API)
- Go — only needed for Outreach (Google Maps scraper)

Contributing

PRs go against main. One feature/fix per PR. Open an issue first. Use WIP label for in-progress PRs.


README.md

MoneyPrinter V2

Sponsored by Post Bridge

<a href="https://www.post-bridge.com/?ref=moneyprinter">
<img src="docs/repo/PostBridgeBanner.png" alt="Post Bridge integration banner" width="720" />
</a>


![madewithlove](https://github.com/FujiwaraChoki/MoneyPrinterV2)

![Buy Me A Coffee](https://www.buymeacoffee.com/fujicodes)
![GitHub license](https://github.com/FujiwaraChoki/MoneyPrinterV2/blob/main/LICENSE)
![GitHub issues](https://github.com/FujiwaraChoki/MoneyPrinterV2/issues)
![GitHub stars](https://github.com/FujiwaraChoki/MoneyPrinterV2/stargazers)
![Discord](https://dsc.gg/fuji-community)

An Application that automates the process of making money online.
MPV2 (MoneyPrinter Version 2) is, as the name suggests, the second version of the MoneyPrinter project. It is a complete rewrite of the original project, with a focus on a wider range of features and a more modular architecture.

Note: MPV2 needs Python 3.12 to function effectively.

Watch the YouTube video here

Features

- [x] Twitter Bot (with CRON Jobs => scheduler)
- [x] YouTube Shorts Automator (with CRON Jobs => scheduler)
- [x] Affiliate Marketing (Amazon + Twitter)
- [x] Find local businesses & cold outreach

Versions

MoneyPrinter has different versions for multiple languages developed by the community for the community. Here are some known versions:

- Chinese: MoneyPrinterTurbo

If you would like to submit your own version/fork of MoneyPrinter, please open an issue describing the changes you made to the fork.

Installation

⚠️ If you are planning to reach out to scraped businesses per E-Mail, please first install the Go Programming Language.

bash
git clone https://github.com/FujiwaraChoki/MoneyPrinterV2.git

cd MoneyPrinterV2

Copy Example Configuration and fill out values in config.json


cp config.example.json config.json

Create a virtual environment


python -m venv venv

Activate the virtual environment - Windows


.\venv\Scripts\activate

Activate the virtual environment - Unix


source venv/bin/activate

Install the requirements


pip install -r requirements.txt

Usage

bash

Run the application


python src/main.py

Documentation

All relevant documents can be found here.

Scripts

For easier usage, there are some scripts in the scripts directory that can be used to directly access the core functionality of MPV2 without the need for user interaction.

All scripts need to be run from the root directory of the project, e.g. bash scripts/upload_video.sh.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Check out docs/Roadmap.md for a list of features that need to be implemented.

Code of Conduct

Please read CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.

License

MoneyPrinterV2 is licensed under Affero General Public License v3.0. See LICENSE for more information.

Acknowledgments

- KittenTTS
- gpt4free

Disclaimer

This project is for educational purposes only. The author will not be responsible for any misuse of the information provided. All the information on this website is published in good faith and for general information purposes only. The author does not make any warranties about the completeness, reliability, and accuracy of this information. Any action you take upon the information you find on this website (FujiwaraChoki/MoneyPrinterV2) is strictly at your own risk. The author will not be liable for any losses and/or damages in connection with the use of our website.