google-contacts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle 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
前提条件
- Google Cloud Project with Google People API enabled.
- OAuth 2.0 Credentials () in
credentials.json.~/.contacts_credentials/
- 已启用Google People API的Google Cloud Project。
- 将OAuth 2.0 凭据()放置在
credentials.json目录下。~/.contacts_credentials/
Setup
配置步骤
-
Recommended (gcloud ADC):bash
gcloud auth application-default login --scopes https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/cloud-platformThen verify:bashuv run skills/google-contacts/scripts/contacts.py search --query "Test" -
Alternative (credentials.json):
- Place in
credentials.json.~/.contacts_credentials/ - Run
uv run skills/google-contacts/scripts/contacts.py setup
- Place
-
推荐方式(gcloud ADC):bash
gcloud auth application-default login --scopes https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/cloud-platform然后进行验证:bashuv run skills/google-contacts/scripts/contacts.py search --query "Test" -
替代方式(credentials.json):
- 将放置在
credentials.json目录下。~/.contacts_credentials/ - 运行
uv run skills/google-contacts/scripts/contacts.py setup
- 将
Usage
使用方法
1. Search Contacts
1. 搜索联系人
bash
undefinedbash
undefinedFind Han Solo
查找Han Solo
uv run skills/google-contacts/scripts/contacts.py search --query "Han Solo"
undefineduv run skills/google-contacts/scripts/contacts.py search --query "Han Solo"
undefined2. 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"
}
]