Skip to content
google-drive logo

Google Drive Operations with gogcli

google-drive

gogcli (gog) を使用してGoogle Driveを操作するスキル。ファイルの検索、アップロード、ダウンロード、共有、フォルダ管理などをCLI経由で実行。 Use when: (1) ドライブのファイルを検索したい、(2) ファイルをアップロードしたい、(3) ファイルをダウンロードしたい、(4) Google Driveを操作したい、(5) ファイルを共有したい、(6) フォルダを作成したい Trigger: drive, ドライブ, google drive, ファイル検索, アップロード, ダウンロード, 共有

SKILL.md

Full skill instructions

Google Drive Operations with gogcli

gog CLIを使用してGoogle Driveを操作する。

Prerequisites

# Installation
brew install gogcli

# Authentication (初回のみ)
gog auth login

Commands Reference

List Files

# ルートフォルダのファイル一覧
gog drive ls

# 特定フォルダの一覧
gog drive ls --parent="<folderId>"

# 最大件数指定
gog drive ls --max=50

# クエリフィルタ付き
gog drive ls --query="mimeType='application/​vnd.google-apps.folder'"

Search Files

# フルテキスト検索
gog drive search "検索キーワード"

# 複数キーワード
gog drive search "報告書 2024"

# JSON形式で出力
gog drive search "議事録" --json --max=20

Download Files

# ファイルをダウンロード
gog drive download <fileId>

# 出力先を指定
gog drive download <fileId> --out="/​path/​to/​output.pdf"

# Google Docsのエクスポート形式を指定
gog drive download <fileId> --format=pdf    # PDF形式
gog drive download <fileId> --format=docx   # Word形式
gog drive download <fileId> --format=xlsx   # Excel形式
gog drive download <fileId> --format=pptx   # PowerPoint形式
gog drive download <fileId> --format=csv    # CSV形式
gog drive download <fileId> --format=txt    # テキスト形式

Upload Files

# ファイルをアップロード(ルートへ)
gog drive upload /​path/​to/​file.pdf

# ファイル名を変更してアップロード
gog drive upload /​path/​to/​file.pdf --name="新しいファイル名.pdf"

# 特定フォルダへアップロード
gog drive upload /​path/​to/​file.pdf --parent="<folderId>"

Create Folder

# ルートにフォルダ作成
gog drive mkdir "新しいフォルダ"

# 特定フォルダ内にサブフォルダ作成
gog drive mkdir "サブフォルダ" --parent="<parentFolderId>"

File Operations

# ファイルのメタデータ取得
gog drive get <fileId>

# ファイルをコピー
gog drive copy <fileId> "コピー後の名前"

# ファイルを移動
gog drive move <fileId> --parent="<newParentFolderId>"

# ファイル名を変更
gog drive rename <fileId> "新しい名前"

# ファイルを削除(ゴミ箱へ)
gog drive delete <fileId>

# WebのURLを取得
gog drive url <fileId>

Share Files

# 特定ユーザーと共有(閲覧権限)
gog drive share <fileId> --email="[email protected]" --role="reader"

# 特定ユーザーと共有(編集権限)
gog drive share <fileId> --email="[email protected]" --role="writer"

# 公開リンクを作成
gog drive share <fileId> --anyone --role="reader"

# 権限一覧を表示
gog drive permissions <fileId>

# 権限を削除
gog drive unshare <fileId> <permissionId>

Shared Drives

# 共有ドライブ一覧
gog drive drives

Comments

# ファイルのコメント一覧
gog drive comments list <fileId>

# コメントを追加
gog drive comments add <fileId> "コメント内容"

Common Workflows

最近のファイルを確認

gog drive ls --max=10

特定の名前のファイルを検索

gog drive search "週報"

Google Docsをローカルにダウンロード

# PDF形式でダウンロード
gog drive download <fileId> --format=pdf --out="./​document.pdf"

ローカルファイルを特定フォルダにアップロード

# まずフォルダIDを確認
gog drive search "プロジェクトフォルダ" --json

# フォルダにアップロード
gog drive upload ./​report.pdf --parent="<folderId>"

Output Formats

FlagDescription
--jsonJSON形式で出力(スクリプト向け)
--plainTSV形式で出力(パース容易)
(default)人間が読みやすい形式

Tips

  • [email protected] で複数アカウントを切り替え
  • ファイルIDはURLから取得可能: https://drive.google.com/​file/​d/<fileId>/​view
  • フォルダIDもURLから取得可能: https://drive.google.com/​drive/​folders/<folderId>
  • --force で確認をスキップ(削除時など注意して使用)

More Security skills

supabase logo
Security

supabase

Handles the full Supabase workflow from schema changes to deployment, with built-in security guardrails that catch common traps like RLS...

2.7K 308.9K
View

Comprehensive guides and best practices for Neon Serverless Postgres, covering setup, connection methods, authentication, and platform APIs.

98 216.2K
View

Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.

462 163.8K
View

A skill to evaluate how secure Firestore security rules are. Use this when Firestore security rules are updated to ensure that the generated rules are extremely secure and robust.

462 127.7K
View

Official skill for integrating Firebase AI Logic (Gemini API) into web applications. Covers setup, multimodal inference, structured output, and security.

462 125.1K
View

Complete Better Auth server and client setup with database adapters, session management, plugins, and security configuration.

222 118.2K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View
cloudflare logo
Security

cloudflare

Complete Cloudflare platform integration with decision trees for compute, storage, AI, networking, security, and infrastructure-as-code.

3K 110.7K
View

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

253 103K
View
gws-gmail logo
Security

gws-gmail

Send, read, and manage Gmail messages, drafts, labels, and account settings.

31.2K 78.9K
View

Comprehensive website auditing across 230+ rules in 21 categories including SEO, performance, security, and accessibility.

94 72.3K
View
gws-shared logo
Security

gws-shared

Shared authentication, CLI syntax, and output formatting patterns for gws Google Workspace commands.

31.2K 63.4K
View

Security AI tools

StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
GeoSpy logo
Security

GeoSpy

GeoSpy: Pricing, Features, FAQs, and Alternatives for AI Teams

Free
View

Detect AI-generated voices to protect against audio fraud.

Paid
View

Ensure Your Content's Originality with AI Plagiarism Checker

Freemium
View
Img Upscaler logo
Security

Img Upscaler

Upscale images by 400% without quality loss

Freemium
View
AICheatCheck logo
Security

AICheatCheck

Accurately Detect AI-Generated Content with TheChecker.AI

Free
View
D
Security

Detect GPT

Chrome extension that detects and flags AI-generated content

Free
View