garc-gws-agent-runtime/docs/google-cloud-setup.md
林 駿甫 (Shunsuke Hayashi) a69b9d9160 feat: initial release — GARC v0.1.0
Permission-first AI agent runtime for Google Workspace.
Ports the LARC/OpenClaw governance model (disclosure chain,
execution gates, queue/ingress) to Gmail, Calendar, Drive,
Sheets, Tasks, and People APIs with Claude Code as the
execution engine.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 08:59:12 +09:00

80 lines
3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Google Cloud Console セットアップガイド
## 有効化するAPI一覧
Google Cloud Console (https://console.cloud.google.com/) で以下を有効化してください。
### 必須 API6種
| API名 | サービス名 | 用途 |
|-------|-----------|------|
| **Google Drive API** | `drive.googleapis.com` | ファイル読み書き・開示チェーン |
| **Google Sheets API** | `sheets.googleapis.com` | メモリ・エージェント台帳・キュー |
| **Gmail API** | `gmail.googleapis.com` | メール送受信・承認通知 |
| **Google Calendar API** | `calendar-json.googleapis.com` | 予定管理・会議調整 |
| **Google Tasks API** | `tasks.googleapis.com` | タスク管理 |
| **Google Docs API** | `docs.googleapis.com` | ドキュメント作成・編集 |
### 推奨 API2種
| API名 | サービス名 | 用途 |
|-------|-----------|------|
| **Google People API** | `people.googleapis.com` | 連絡先・組織メンバー検索 |
| **Google Chat API** | `chat.googleapis.com` | Chatボット・スペースへの送信 |
---
## 有効化手順
1. https://console.cloud.google.com/ にアクセス
2. 上部のプロジェクト選択で **新しいプロジェクト** を作成(または既存を選択)
3. 左メニュー → **「APIとサービス」** → **「APIとサービスを有効化」**
4. 検索ボックスに上記のAPI名を入力 → **「有効にする」**
---
## OAuth2 認証情報の作成
1. **「APIとサービス」** → **「認証情報」**
2. **「認証情報を作成」** → **「OAuth 2.0 クライアント ID」**
3. アプリケーションの種類: **「デスクトップアプリ」**
4. 名前: `GARC CLI` など任意
5. 作成後 **「JSONをダウンロード」** → `~/.garc/credentials.json` に保存
---
## OAuth同意画面の設定
1. **「APIとサービス」** → **「OAuth 同意画面」**
2. ユーザーの種類: **「外部」**個人Gmailの場合または **「内部」**Workspace組織の場合
3. アプリ名: `GARC` など
4. **テストユーザー** に自分のGmailアドレスを追加
5. スコープは空でOKCLIが実行時に要求します
---
## サービスアカウント(ボット操作用・任意)
自動化・ヘッドレス実行には Service Account が推奨:
1. **「認証情報」** → **「認証情報を作成」** → **「サービスアカウント」**
2. 名前: `garc-bot` など
3. 作成後、サービスアカウントの **「キー」** タブ → **「鍵を追加」** → **「JSON」**
4. ダウンロードしたJSONを `~/.garc/service_account.json` に保存
5. 使用するDriveフォルダ・SheetsをサービスアカウントのメールアドレスにShare
---
## 確認用コマンド
APIを有効化してcredentials.jsonを配置したら
```bash
garc auth login --profile backoffice_agent
# → ブラウザが開いてGoogleログイン画面
# → 全スコープを承認
# → ~/.garc/token.json が生成される
garc status
# → 全項目が ✅ になることを確認
```