KosmoKrator

productivity

Google Drive CLI for CI

Use the Google Drive CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.

6 functions 4 read 2 write Manual OAuth token auth

Google Drive CLI for CI

Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.

Use this shape when a pipeline needs to read or update an external service. The Google Drive CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Google Drive CLI for CI
kosmokrator integrations:configure google-drive --set access_token="$GOOGLE_DRIVE_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call google-drive.gdrive_list_files '{"pageSize":1,"pageToken":"example_pageToken","q":"example_q","spaces":"example_spaces","trashed":true,"corpora":"example_corpora","fields":"example_fields"}' --json

Discovery Before Execution

Agents and scripts can inspect Google Drive docs and schemas before choosing a function.

kosmo integrations:docs google-drive --json
kosmo integrations:docs google-drive.gdrive_list_files --json
kosmo integrations:schema google-drive.gdrive_list_files --json
kosmo integrations:search "Google Drive" --json
kosmo integrations:list --json

Useful Google Drive CLI Functions

FunctionTypeParametersDescription
google-drive.gdrive_list_files Read pageSize, pageToken, q, spaces, trashed, corpora, fields List files and folders in Google Drive. Supports search queries (q), pagination, spaces (drive, appDataFolder, photos), and trashed filtering.
google-drive.gdrive_get_file Read fileId, fields Get metadata for a specific file or folder in Google Drive by its ID. Returns properties like name, mimeType, size, createdTime, modifiedTime, and parents.
google-drive.gdrive_create_file Write name, mimeType, parents, description Create a new file in Google Drive. Creates the file metadata (name, mimeType, parent folder). For simple file creation without content upload, use uploadType "resumable" or "multipart" via the Google Drive API directly.
google-drive.gdrive_create_folder Write name, parentId Create a new folder in Google Drive. Optionally specify a parent folder to nest it inside.
google-drive.gdrive_list_changes Read pageSize, pageToken, fields List changes to files and folders in Google Drive. Use pageToken from the initial startPageToken to begin tracking, then pass the returned next page token for subsequent requests.
google-drive.gdrive_get_current_user Read fields Get information about the authenticated Google Drive user, including display name, email address, and storage quota (usage, limit).

Automation Notes

Related Google Drive CLI Pages