mcpField
G
gplay-metadata-sync

gplay-metadata-sync

github.com/tamtom营销与增长52406 次安装13 周前更新
代码仓库

关于 gplay-metadata-sync

面向应用团队,用本地文件同步 Google Play Store 元数据和本地化内容。支持导出、验证、比较和导入商品详情,也可管理商店图片及应用信息。

主要功能

  1. 01导出和导入本地化详情
  2. 02比较本地与 Play Store 元数据
  3. 03验证字段及字符限制
  4. 04上传和管理商店图片
  5. 05更新应用联系信息

适用场景

  1. 01发布前检查元数据变更
  2. 02将本地化详情纳入版本控制
  3. 03导入前验证应用描述
  4. 04更新截图和应用图标

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/tamtom/gplay-cli-skills --skill gplay-metadata-sync

安装后在 Claude Code 中输入/gplay-metadata-sync确认已加载。

详细介绍

Google Play 元数据同步

在需要更新或同步 Play Store 元数据和本地化内容时使用此技能。

Fastlane 目录结构

fastlane/metadata/android/
├── en-US/
│   ├── title.txt
│   ├── short_description.txt
│   ├── full_description.txt
│   ├── video.txt
│   └── images/
│       ├── phoneScreenshots/
│       │   ├── 1.png
│       │   └── 2.png
│       ├── sevenInchScreenshots/
│       ├── tenInchScreenshots/
│       ├── tvScreenshots/
│       ├── wearScreenshots/
│       ├── icon.png
│       └── featureGraphic.png
├── es-ES/
│   ├── title.txt
│   └── ...
└── fr-FR/
    └── ...

从 Play Store 导出元数据

# Export all listings to Fastlane format
gplay sync export-listings \
  --package com.example.app \
  --dir ./fastlane/metadata/android

# Export images
gplay sync export-images \
  --package com.example.app \
  --dir ./fastlane/metadata/android

将元数据导入 Play Store

# Validate before importing (offline check)
gplay validate listing \
  --dir ./fastlane/metadata/android \
  --locale en-US

# Import all listings
gplay sync import-listings \
  --package com.example.app \
  --dir ./fastlane/metadata/android

# Import images
gplay sync import-images \
  --package com.example.app \
  --dir ./fastlane/metadata/android

比较本地与远程内容

# See what would change
gplay sync diff-listings \
  --package com.example.app \
  --dir ./fastlane/metadata/android

手动管理元数据

列出所有商品详情
gplay listings list \
  --package com.example.app \
  --edit $EDIT_ID
获取指定地区的内容
gplay listings get \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US
更新商品详情

listings update 会通过单独的标志设置某个地区的所有字段(未提供的字段会被清空)。部分更新请使用 listings patch。

gplay listings update \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --title "My Awesome App" \
  --short-description "A short description under 80 characters" \
  --full-description "A full description under 4000 characters..." \
  --video "https://www.youtube.com/watch?v=VIDEO_ID"

图片管理

上传屏幕截图
gplay images upload \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --file screenshot1.png

gplay images upload \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --file screenshot2.png
图片类型
  • phoneScreenshots - 手机屏幕截图(必需)
  • sevenInchScreenshots - 7" 平板电脑屏幕截图
  • tenInchScreenshots - 10" 平板电脑屏幕截图
  • tvScreenshots - 电视屏幕截图
  • wearScreenshots - Wear OS 屏幕截图
  • icon - 应用图标
  • featureGraphic - 特色图片(1024x500)
列出图片
gplay images list \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots
删除图片
gplay images delete \
  --package com.example.app \
  --edit $EDIT_ID \
  --locale en-US \
  --type phoneScreenshots \
  --image IMAGE_ID \
  --confirm

应用详情

获取应用详情
gplay details get \
  --package com.example.app \
  --edit $EDIT_ID
更新联系信息
gplay details update \
  --package com.example.app \
  --edit $EDIT_ID \
  --contact-email [email protected] \
  --contact-phone "+1234567890" \
  --contact-website "https://example.com"

字符数限制

请根据 Google Play 的限制进行验证:

字段限制
标题30 个字符
简短说明80 个字符
完整说明4000 个字符
# Validate before upload
gplay validate listing \
  --dir ./fastlane/metadata/android \
  --locale en-US

工作流示例

完整的元数据更新工作流:

# 1. Export current metadata
gplay sync export-listings \
  --package com.example.app \
  --dir ./metadata

# 2. Edit files locally
vi ./metadata/en-US/full_description.txt

# 3. Validate changes
gplay validate listing \
  --dir ./metadata \
  --locale en-US

# 4. See what will change
gplay sync diff-listings \
  --package com.example.app \
  --dir ./metadata

# 5. Import changes
gplay sync import-listings \
  --package com.example.app \
  --dir ./metadata

多语言地区管理

创建新的语言地区
  1. 复制现有语言地区目录:

    cp -r fastlane/metadata/android/en-US fastlane/metadata/android/es-ES
    
  2. 翻译所有文本文件

  3. 导入:

    gplay sync import-listings \
      --package com.example.app \
      --dir ./fastlane/metadata/android
    
支持的语言地区

使用 Play Console 语言地区代码:

  • en-US - 英语(美国)
  • es-ES - 西班牙语(西班牙)
  • fr-FR - 法语(法国)
  • de-DE - 德语(德国)
  • ja-JP - 日语(日本)
  • 等

最佳实践

  1. 将元数据纳入版本控制 - 跟踪变更情况
  2. 导入前进行验证 - 捕获字符数超限错误
  3. 使用一致的格式 - 遵循风格指南
  4. 在不同设备上测试 - 屏幕截图应反映应用的实际情况
  5. 定期更新 - 确保说明与当前功能相符
  6. 正确进行本地化 - 未经审核不要使用机器翻译

评论

支持 Markdown