google-contacts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Contacts Skill

Google Contacts 技能

This skill allows the AI to manage the user's Google Contacts.
该技能允许AI管理用户的Google Contacts。

Features

功能特性

  • Search: Find people by name, email, or phone.
  • Create: Add new contacts to the address book.
  • 搜索:通过姓名、邮箱或电话号码查找联系人。
  • 创建:向通讯录中添加新联系人。

Prerequisites

前提条件

  1. Google Cloud Project with Google People API enabled.
  2. OAuth 2.0 Credentials (
    credentials.json
    ) in
    ~/.contacts_credentials/
    .
  1. 已启用Google People APIGoogle Cloud Project
  2. OAuth 2.0 凭据
    credentials.json
    )放置在
    ~/.contacts_credentials/
    目录下。

Setup

配置步骤

  1. Recommended (gcloud ADC):
    bash
    gcloud auth application-default login --scopes https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/cloud-platform
    Then verify:
    bash
    uv run skills/google-contacts/scripts/contacts.py search --query "Test"
  2. Alternative (credentials.json):
    • Place
      credentials.json
      in
      ~/.contacts_credentials/
      .
    • Run
      uv run skills/google-contacts/scripts/contacts.py setup
  1. 推荐方式(gcloud ADC)
    bash
    gcloud auth application-default login --scopes https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/cloud-platform
    然后进行验证:
    bash
    uv run skills/google-contacts/scripts/contacts.py search --query "Test"
  2. 替代方式(credentials.json)
    • credentials.json
      放置在
      ~/.contacts_credentials/
      目录下。
    • 运行
      uv run skills/google-contacts/scripts/contacts.py setup

Usage

使用方法

1. Search Contacts

1. 搜索联系人

bash
undefined
bash
undefined

Find Han Solo

查找Han Solo

uv run skills/google-contacts/scripts/contacts.py search --query "Han Solo"
undefined
uv run skills/google-contacts/scripts/contacts.py search --query "Han Solo"
undefined

2. Create Contact

2. 创建联系人

bash
uv run skills/google-contacts/scripts/contacts.py create \
  --first "Lando" \
  --last "Calrissian" \
  --email "lando@cloudcity.com" \
  --phone "555-0123"
bash
uv run skills/google-contacts/scripts/contacts.py create \
  --first "Lando" \
  --last "Calrissian" \
  --email "lando@cloudcity.com" \
  --phone "555-0123"

JSON Output

JSON 输出

json
[
  {
    "name": "Han Solo",
    "email": "captain@falcon.net",
    "phone": "555-0987",
    "resourceName": "people/123456789"
  }
]
json
[
  {
    "name": "Han Solo",
    "email": "captain@falcon.net",
    "phone": "555-0987",
    "resourceName": "people/123456789"
  }
]