{"id":50782971,"url":"https://github.com/hassanrrraza/omnisearch-ai","last_synced_at":"2026-06-12T05:02:18.884Z","repository":{"id":363806035,"uuid":"1264957395","full_name":"hassanrrraza/omnisearch-ai","owner":"hassanrrraza","description":"Open-source AI engine to generate \u0026 optimize blog posts for Google Search Bing Search, AI Overviews, AEO, GEO, and LLM discovery. Powered by Gemini API.","archived":false,"fork":false,"pushed_at":"2026-06-10T13:12:58.000Z","size":177,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T13:13:37.675Z","etag":null,"topics":["aeo","ai-content","ai-seo","answer-engine-optimization","blog-optimizer","generative-engine-optimization","geo","llm","llm-optimization","seo","seo-optimization"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hassanrrraza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-10T10:32:06.000Z","updated_at":"2026-06-10T13:10:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hassanrrraza/omnisearch-ai","commit_stats":null,"previous_names":["hassanrrraza/omnisearch-ai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hassanrrraza/omnisearch-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassanrrraza%2Fomnisearch-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassanrrraza%2Fomnisearch-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassanrrraza%2Fomnisearch-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassanrrraza%2Fomnisearch-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hassanrrraza","download_url":"https://codeload.github.com/hassanrrraza/omnisearch-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassanrrraza%2Fomnisearch-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aeo","ai-content","ai-seo","answer-engine-optimization","blog-optimizer","generative-engine-optimization","geo","llm","llm-optimization","seo","seo-optimization"],"created_at":"2026-06-12T05:02:18.024Z","updated_at":"2026-06-12T05:02:18.878Z","avatar_url":"https://github.com/hassanrrraza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OmniSearch AI\n\n\u003cdiv align=\"center\"\u003e\n\n**The open-source engine for SEO, AEO, GEO, and LLM content optimization.**\n\nGenerate or upgrade blog posts that rank on Google, appear in AI Overviews,\nget cited by ChatGPT and Perplexity, and surface in LLM-powered search —\nall powered by your own Gemini API key.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-black.svg)](LICENSE)\n[![Next.js](https://img.shields.io/badge/Next.js-16-black?logo=next.js)](https://nextjs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue?logo=typescript)](https://typescriptlang.org)\n[![Gemini API](https://img.shields.io/badge/Gemini-2.5_Flash-blue?logo=google)](https://ai.google.dev)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n\n[**Try it in 60 seconds**](#quick-start) ·\n[Report a Bug](https://github.com/hassanrrraza/omnisearch-ai/issues/new?template=bug_report.md) ·\n[Request a Feature](https://github.com/hassanrrraza/omnisearch-ai/issues/new?template=feature_request.md)\n\n\u003cbr\u003e\n\n\u003cimg src=\"public/images/1.webp\" alt=\"OmniSearch AI product screenshot\" width=\"900\"\u003e\n\n\u003c/div\u003e\n\n---\n\n## Table of Contents\n\n- [Why OmniSearch AI?](#why-omnisearch-ai)\n- [Features](#features)\n- [Quick Start](#quick-start)\n- [Command-Line Interface](#command-line-interface)\n- [How It Works](#how-it-works)\n- [Customize the Optimization Engine](#customize-the-optimization-engine)\n- [Project Structure](#project-structure)\n- [Tech Stack](#tech-stack)\n- [Contributing](#contributing)\n- [Maintainer](#maintainer)\n- [License](#license)\n\n---\n\n## Why OmniSearch AI?\n\nMost AI writing tools generate content. OmniSearch AI optimizes it across four\ndistinct discovery channels that most creators ignore:\n\n| Channel | What it means | OmniSearch AI output |\n| :------ | :------------ | :------------------- |\n| **SEO** | Rank on Google | Title tag, meta, slug, keyword placement, schema |\n| **AEO** | Appear in AI Overviews \u0026 answer boxes | Featured snippet, FAQPage schema, PAA-ready FAQ |\n| **GEO** | Get cited by ChatGPT, Perplexity, Claude | Factual density, comparison tables, LLM summary |\n| **LLM** | Surface in AI-powered search | Semantic structure, extractable facts, Q\u0026A format |\n\n\u003e **There is no other open-source tool that handles all four together.**\n\n### Product Screenshots\n\n| | | | |\n| :---: | :---: | :---: | :---: |\n| \u003cimg src=\"public/images/1.webp\" alt=\"OmniSearch AI product screenshot 1\" width=\"720\"\u003e | \u003cimg src=\"public/images/2.webp\" alt=\"OmniSearch AI product screenshot 2\" width=\"720\"\u003e | \u003cimg src=\"public/images/3.webp\" alt=\"OmniSearch AI product screenshot 3\" width=\"720\"\u003e | \u003cimg src=\"public/images/4.webp\" alt=\"OmniSearch AI product screenshot 4\" width=\"720\"\u003e |\n\n---\n\n## Features\n\n### ✦ Create New Blog\n\n- Generate a complete blog post up to 2,500 words from a title + keyword\n- SEO title, meta description, and URL slug auto-generated\n- Featured snippet answer block (40–60 words, Google-extractable)\n- 3-question FAQ section from real PAA (People Also Ask) patterns\n- FAQPage + BreadcrumbList JSON-LD schema ready to paste into your site\n- LLM Summary for AI system comprehension and citation\n- Optimization score across SEO / AEO / GEO / LLM (0–100 each)\n\n### ✦ Optimize Existing Blog\n\n- Paste any existing article and get a fully upgraded version back\n- Preserves your voice and core content\n- Detailed change log: what changed, where, and why\n- Before/after improvement report per optimization category\n- Same full output bundle: metadata, FAQ, schema, LLM summary, scores\n\n### ✦ Export Everything\n\n- Copy Markdown to clipboard\n- Download as `.md`\n- Download as `.html` (styled, ready to preview in browser)\n- Copy all metadata as JSON\n\n---\n\n## Quick Start\n\n### Requirements\n\n- [Node.js](https://nodejs.org/en/download/) (version 18 or higher). Check your version with `node -v`.\n- A free [Gemini API key](https://aistudio.google.com/app/apikey). Follow the instructions on the Google AI Studio page to generate your API key.\n\n### Setup Steps\n\n**1. Clone the repository**\n\n```bash\ngit clone https://github.com/hassanrrraza/omnisearch-ai\ncd omnisearch-ai\n```\n\n**2. Install dependencies**\n\n```bash\nnpm install\n```\n\n**3. Configure your Gemini API key**\n\nCopy the example environment file, then open `.env.local` to add your Gemini API key:\n\n```bash\ncp .env.example .env.local\n```\n\nEdit `.env.local`:\n\n```env\nGEMINI_API_KEY=your_gemini_api_key_here\nGEMINI_MODEL=gemini-2.5-flash\n```\n\nReplace `your_gemini_api_key_here` with the API key you obtained from Google AI Studio.\n\n\u003e **Deploying a public demo?** You do not need to add a production API key.\n\u003e Without `GEMINI_API_KEY`, the app still builds and deploys as a showcase. The\n\u003e generation endpoints return a local-setup message until users clone the repo\n\u003e and add their own key in `.env.local`.\n\n**4. Start the application**\n\n```bash\nnpm run dev\n```\n\nThe application will be accessible at [http://localhost:3000](http://localhost:3000).\n\n---\n\n## Command-Line Interface\n\nOmniSearch AI provides command-line interface (CLI) tools for generating and optimizing content directly from your terminal.\n\n### Generate New Blog Post\n\nTo generate a new blog post using a JSON input file:\n\n```bash\nnpm run generate \u003cpath-to-your-input.json\u003e\n```\n\n**Example input file** (`new-blog.example.json`):\n\n```json\n{\n  \"title\": \"Your Blog Post Title\",\n  \"keyword\": \"your primary keyword\",\n  \"wordCount\": 1500\n}\n```\n\n### Optimize Existing Blog Post\n\nTo optimize an existing blog post from a Markdown file:\n\n```bash\nnpm run optimize:file \u003cpath-to-your-existing-blog.md\u003e \u003cpath-to-your-config.json\u003e\n```\n\n**Example config file** (`optimize-config.example.json`):\n\n```json\n{\n  \"focusKeywords\": [\"keyword1\", \"keyword2\"],\n  \"targetAudience\": \"developers\",\n  \"toneOfVoice\": \"informative\"\n}\n```\n\n### File Mode (No Browser Required)\n\nDrop a JSON file in `/input`, run one command, and get your full output in `/output`.\n\n**Setup:**\n\n```bash\ncp input/new-blog.example.json input/new-blog.json\n# Edit new-blog.json with your blog details\n```\n\n**Generate:**\n\n```bash\nnpm run generate\n```\n\n**Output files written to `/output`:**\n\n```text\noutput/\nyour-slug.md                  ← The blog post\nyour-slug.json                ← Full output bundle\nyour-slug-metadata.json       ← SEO metadata\nyour-slug-schema.json         ← FAQPage JSON-LD\n```\n\n**Terminal output includes scores:**\n\n```text\n--- Optimization Scores ---\nSEO:     88/100\nAEO:     91/100\nGEO:     85/100\nLLM:     89/100\nOverall: 88/100\n```\n\n**Optimize an existing blog:**\n\n```bash\ncp input/existing-blog.example.md input/existing-blog.md\n# Paste your blog content into existing-blog.md\ncp input/optimize-config.example.json input/optimize-config.json\n# Fill in keyword, audience, goal\nnpm run optimize:file\n```\n\n### CLI Mode\n\n```bash\n# From inside the project directory:\nnpx omnisearch-ai new\nnpx omnisearch-ai optimize\n\n# Or use the npm scripts directly:\nnpm run generate\nnpm run optimize:file\n```\n\n---\n\n## How It Works\n\nOmniSearch AI injects three optimization guides as system context into every\nGemini prompt. The guides encode rules for SEO, AEO, and GEO. Gemini applies\nthem to generate or improve your content.\n\n```text\nUser Input\n    ↓\nForm Validation (Zod)\n    ↓\nLoad SEO + AEO + GEO Guides from lib/guides/\n    ↓\nBuild Prompt (lib/prompts/)\n    ↓\nCall Gemini API (server-side only — key never exposed)\n    ↓\nValidate JSON Response (Zod)\n    ↓\nRender: Blog · Metadata · FAQ · Schema · LLM Summary · Score\n    ↓\nExport: .md · .html · clipboard\n```\n\n**Your API key never leaves your machine.** All Gemini calls go through the\nNext.js API route. The key is only read server-side from `.env.local`.\n\n---\n\n## Customize the Optimization Engine\n\nThe three `.md` files in `lib/guides/` are the knowledge base:\n\n```text\nlib/guides/\nseo-optimization-guide.md   ← SEO rules, keyword strategy, E-E-A-T signals\naeo-optimization-guide.md   ← Answer engine rules, FAQPage, featured snippets\ngeo-optimization-guide.md   ← GEO rules, factual density, LLM citation signals\n```\n\n**Replace these files with your own guides** and the engine uses them instead.\nThis makes OmniSearch AI fully adaptable to any niche, brand voice, or\noptimization methodology.\n\n---\n\n## Project Structure\n\n### Directory Overview\n\nHere's an overview of the key directories and files in the project:\n\n| Path | Description |\n| :--- | :---------- |\n| `app/` | Next.js application pages and API routes |\n| `app/api/` | API routes for content generation and optimization |\n| `app/new-blog/` | Page for creating new blog posts |\n| `app/optimize-blog/` | Page for optimizing existing blog posts |\n| `cli/` | Command-line interface tools (`index.js`, `index.ts` entry points) |\n| `components/` | React components used throughout the application |\n| `input/` | Example input files for generation and optimization |\n| `lib/` | Core logic and utilities |\n| `lib/gemini.ts` | Gemini API integration |\n| `lib/file-mode/` | Logic for file-based generation and optimization |\n| `lib/guides/` | Optimization guides used as system context for Gemini |\n| `lib/prompts/` | Gemini prompt definitions |\n| `lib/schemas/` | Zod schemas for input and output validation |\n| `lib/utils/` | General utility functions |\n| `output/` | Directory for output files (e.g., generated blogs) |\n| `public/` | Static assets |\n| `scripts/` | Utility scripts |\n\n### Detailed Layout\n\n```text\nomnisearch-ai/\n├── app/\n│   ├── page.tsx                    # Homepage\n│   ├── new-blog/page.tsx           # Create blog flow\n│   ├── optimize-blog/page.tsx      # Optimize blog flow\n│   └── api/\n│       ├── generate-blog/route.ts  # POST /api/generate-blog\n│       └── optimize-blog/route.ts  # POST /api/optimize-blog\n├── components/\n│   ├── BlogForm.tsx                # New blog form\n│   ├── ExistingBlogForm.tsx        # Optimize blog form\n│   ├── OutputPreview.tsx           # New blog output panel\n│   ├── OptimizeOutputPreview.tsx   # Optimize output panel\n│   ├── PreviewActions.tsx          # Score cards + export buttons\n│   └── SerpPreview.tsx             # Google SERP preview\n├── lib/\n│   ├── gemini.ts                   # Gemini client\n│   ├── guides/                     # SEO · AEO · GEO knowledge base\n│   ├── prompts/                    # Prompt builder functions\n│   ├── schemas/                    # Zod input/output schemas\n│   └── utils/download.ts           # Export helpers\n├── input/                          # Example input files\n├── .env.example                    # Environment variable template\n└── README.md\n```\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n| :---- | :--------- |\n| Framework | Next.js 16 (App Router) |\n| Language | TypeScript (strict mode) |\n| Styling | Tailwind CSS |\n| AI Engine | Google Gemini 2.5 Flash |\n| Validation | Zod |\n| Forms | React Hook Form |\n| Markdown | react-markdown |\n\n---\n\n## Contributing\n\nContributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) first.\n\n**Good first issues:** look for the\n[`good first issue`](https://github.com/hassanrrraza/omnisearch-ai/issues?q=label%3A%22good+first+issue%22)\nlabel.\n\n---\n\n## Maintainer\n\nBuilt and maintained by [Hassan Raza](https://github.com/hassanrrraza).\n\nWebsite: [https://hassanr.com/](https://hassanr.com/)\n\n---\n\n## License\n\nMIT © [Hassan Raza](https://github.com/hassanrrraza)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eIf OmniSearch AI helped you, please ⭐ star the repo.\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhassanrrraza%2Fomnisearch-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhassanrrraza%2Fomnisearch-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhassanrrraza%2Fomnisearch-ai/lists"}