KosmoKrator

productivity

Google Docs CLI for AI Agents

Use the Google Docs CLI from KosmoKrator to call Google Docs tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Google Docs CLI Setup

Google Docs can be configured headlessly with `kosmokrator integrations:configure google-docs`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure google-docs --enable --read allow --write ask --json
kosmokrator integrations:doctor google-docs --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call google-docs.google_docs_documents_get '{}' --json
Provider shortcut
kosmo integrations:google-docs google_docs_documents_get '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs google-docs --json
kosmo integrations:docs google-docs.google_docs_documents_get --json
kosmo integrations:schema google-docs.google_docs_documents_get --json
kosmo integrations:search "Google Docs" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

google-docs.google_docs_documents_get

Documents Get (GET /v1/documents/{documentId}).

Read read
Parameters
none
Generic call
kosmo integrations:call google-docs.google_docs_documents_get '{}' --json
Shortcut
kosmo integrations:google-docs google_docs_documents_get '{}' --json

google-docs.google_docs_documents_batch_update

Documents Batch Update (POST /v1/documents/{documentId}:batchUpdate).

Write write
Parameters
none
Generic call
kosmo integrations:call google-docs.google_docs_documents_batch_update '{}' --json
Shortcut
kosmo integrations:google-docs google_docs_documents_batch_update '{}' --json

google-docs.google_docs_documents_create

Documents Create (POST /v1/documents).

Write write
Parameters
none
Generic call
kosmo integrations:call google-docs.google_docs_documents_create '{}' --json
Shortcut
kosmo integrations:google-docs google_docs_documents_create '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

google-docs.google_docs_documents_get 0 parameters
Schema command
kosmo integrations:schema google-docs.google_docs_documents_get --json
ParameterTypeRequiredDescription
No parameters.
google-docs.google_docs_documents_batch_update 0 parameters
Schema command
kosmo integrations:schema google-docs.google_docs_documents_batch_update --json
ParameterTypeRequiredDescription
No parameters.
google-docs.google_docs_documents_create 0 parameters
Schema command
kosmo integrations:schema google-docs.google_docs_documents_create --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.