=== BrainyPress ===
Contributors: mrnaveedshah
Tags: ai-auto-blogger, wordPress-automation, auto-blogging, content-automation, auto-content-creation
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.8
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

The Ultimate Fully Automated AI Blogger. Runs 24/7 on Auto-Pilot or Manual Mode. Generates Human-Like, SEO-Ranked Content for ANY Niche using Free Gemini API.

== Description ==

**Meet BrainyPress v2.8: Your Free Auto-Writer for WordPress.**

BrainyPress is a fully automated content machine designed to rank on Google. Whether you want to run it on **Auto-Pilot (Server Cron)** while you sleep or trigger posts **Manually**, BrainyPress handles it all.

Unlike old-school spinners, BrainyPress uses **Google Gemini 2.0 Flash (Free API)** with **Real-Time Search Grounding** to write factually accurate, human-quality articles that readers love.

### 🌟 Why is BrainyPress Different?

* **⚡ Fully Automated (Set & Forget):** Just set a schedule (e.g., "Post every hour"). BrainyPress runs 24/7 in the background, generating fresh content even while you are offline.
* **🧠 Liquid AI Logic (All Niches Supported):** No rigid templates! The AI adapts instantly to **ANY Niche**.
    * *Crypto/Finance:* Writes deep technical analysis & price predictions.
    * *Food/Recipes:* Writes mouth-watering steps with ingredients.
    * *News/Sports:* Writes journalistic breaking reports.
    * *Tech/Reviews:* Writes pros/cons and spec comparisons.
* **🔗 Smart SEO Engine:** Automatically weaves **Internal Links** to your older posts and adds high-authority **External Links** (Wikipedia, News) to boost SEO authority.
* **🔍 Real-Time Google Data:** Fetches live 2026 data (Prices, Scores, News) before writing. No outdated hallucinations.
* **✍️ 100% Human-Style Writing:** Uses "Storytelling Mode" to avoid robotic lists. The content flows naturally to bypass AI detectors.

### 🚀 Key Features

* **Auto-Run & Manual Modes:** Total control. Run bulk batches instantly or schedule them for drip-feeding.
* **Twitter (X) Auto-Posting:** Viral marketing built-in. Automatically tweets your new posts.
* **Free to Use:** Built on the generous Free Tier of Gemini API. Zero monthly fees.
* **Crash-Proof:** Optimized SQL logic ensures it handles 100+ posts without crashing your server.

**Turn your WordPress site into a money-making auto-blog today with BrainyPress.**

### External Services Disclosure

This plugin relies on third-party API services to function. API keys are stored securely in your database.

**1. Google Gemini API (by Google)**
* **Usage:** Generates article text, performs web searches, and structures HTML.
* **Privacy:** [Google Privacy Policy](https://policies.google.com/privacy) | [Terms](https://ai.google.dev/terms)

**2. Twitter / X API (by X Corp)**
* **Usage:** Posts updates to your social feed.
* **Privacy:** [Twitter Privacy Policy](https://twitter.com/en/privacy)

== Installation ==

1.  Upload the `brainypress` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Go to **BrainyPress** settings.
4.  **Connect Brain:** Enter your Free Google Gemini API Key.
5.  **Create Automation:** Select a Category and write your **Custom Prompt**.
6.  **Run:** The AI will follow your instructions exactly to generate unique content.

== Frequently Asked Questions ==

= How does "Real-Time Grounding" work? =
We use Gemini's built-in `Google Search_retrieval` tool. When the AI generates a post, it performs a live search query to gather the most recent information before writing.

= Is any user data tracked? =
No. BrainyPress does not track user behavior or collect personal data. All API communications happen directly between your WordPress server and the respective service providers (Google/Twitter).

= Does this plugin use its own API keys? =
No. For your security and control, you must provide your own API keys for both Google Gemini and Twitter. This ensures you have full ownership of your data and usage limits

= What is "Liquid AI" Logic? =
In previous versions, the plugin had fixed structures (Intro -> H2 -> Conclusion). In v2.8, we removed these limits. The AI now decides the structure based on your Prompt. If you ask for a "Table," it makes a table. If you ask for a "Story," it writes a story.

= How does the Smart Linking work? =
The plugin fetches a random related post from your database and instructs the AI to "weave" that link into the middle of a sentence where it makes sense contextually. It does not just dump links at the bottom.

= Is it really Free? =
Yes! The plugin software is free, and it uses the "Gemini 2.0 Flash" model, which currently has a generous free tier provided by Google.

= Will it create duplicate content? =
No. v2.8 includes a "Variation ID" system and an "Avoid List." The AI is told exactly which topics it has already covered to ensure every batch produces unique angles.

== Screenshots ==

1.  **The Dashboard:** Clean Neubrutalism design for managing tasks.
2.  **Smart Prompting:** Example of how the AI follows custom instructions.
3.  **The Result:** A generated article showing Internal Links and Real-Time Data.

== Changelog ==

= 2.8 (Major Update) =
* **New:** **Liquid AI Engine** - Removed hardcoded HTML structures. AI now strictly obeys the User Prompt for formatting.
* **New:** **Smart Linking System** - Auto-inserts contextual Internal Links and Authority External Links.
* **New:** **Crash Protection** - Replaced heavy WP functions with direct SQL queries for duplicate checking (10x faster).
* **New:** **Avoidance Logic** - Passes recently published titles to AI to prevent topic repetition.
* **Fix:** Resolved "Stuck at Posting" timeout issues on slower servers.

= 2.7 =
* Added Post Status (Draft/Publish).
* Added Twitter Auto-Post.
* Upgraded to Gemini 2.0.