承接 yohns/meta-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yohns/meta-generator

最新稳定版本:v1.0.1

Composer 安装命令:

composer require yohns/meta-generator

包简介

AI-powered meta description and keyword generator supporting Gemini and Claude.

README 文档

README

AI-powered meta description and keyword generator. Paste a content blurb and get an SEO-ready meta description (120-160 characters) and a set of 5-8 keywords — powered by Google Gemini or Anthropic Claude.

Requirements

  • PHP 8.2+
  • Extensions: curl, json, mbstring
  • Composer
  • A Gemini or Claude API key

Installation

composer install
cp config/ai.example.php config/ai.php

Edit config/ai.php and add your API key:

'provider' => 'gemini', // or 'claude'

'gemini' => [
    'api_key' => 'YOUR_KEY_HERE',
    'model'   => 'gemini-2.0-flash',
],

'claude' => [
    'api_key' => 'YOUR_KEY_HERE',
    'model'   => 'claude-haiku-4-5-20251001',
],

Then serve the project from any PHP-capable web server (Apache, Nginx, Laragon, etc.) and open index.html.

Usage

  1. Open the app in your browser
  2. Paste or type a content blurb (up to 2000 characters)
  3. Click Generate
  4. Copy the resulting meta description or keywords

API Endpoint

POST /api/generate-meta.php
Content-Type: application/json

{"blurb": "Your content blurb here..."}

Response:

{
    "success": true,
    "provider": "gemini",
    "data": {
        "meta_description": "...",
        "keywords": ["keyword1", "keyword2", "..."]
    }
}

Rate Limiting

Rate limiting is enabled by default in the config (per IP):

'rate_limit' => [
    'enabled'      => true,
    'rpm'          => 5,   // Requests Per Minute
    'rpd'          => 20,  // Requests Per Day
    'storage_path' => __DIR__ . '/../storage/rate_limit.json',
],

The storage_path is configurable — point it to any writable location. The directory is created automatically on first request.

Adding a Provider

  1. Create a class in src/MetaGenerator/ extending AbstractMetaGenerator
  2. Implement the generate(string $blurb): array method
  3. Add a case to MetaGeneratorFactory::make()
  4. Add the provider's config block to config/ai.example.php

License

MIT

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固