---
id: imp-googleworkspace-gws-docs
name: "gws-docs"
url: https://skills.yangsir.net/skill/imp-googleworkspace-gws-docs
author: googleworkspace
domain: ai-productivity-automation
tags: ["google-docs-api", "document-automation", "content-creation", "google-workspace", "text-processing"]
install_count: 29700
rating: 4.60 (556 reviews)
github: https://github.com/googleworkspace/cli
---

# gws-docs

> 能够读取和写入Google Docs文档，支持在线协作编辑、内容创作及格式管理，提升文档处理效率。

**Stats**: 29,700 installs · 4.6/5 (556 reviews)

## Before / After 对比

### 自动化读写Google Docs文档

## Readme

# docs (v1)

> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.

```bash
gws docs <resource> <method> [flags]
```

## Helper Commands

| Command | Description |
|---------|-------------|
| [`+write`](../gws-docs-write/SKILL.md) | Append text to a document |

## API Resources

### documents

  - `batchUpdate` — Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests.
  - `create` — Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.
  - `get` — Gets the latest version of the specified document.

## Discovering Commands

Before calling any API method, inspect it:

```bash
# Browse resources and methods
gws docs --help

# Inspect a method's required params, types, and defaults
gws schema docs.<resource>.<method>
```

Use `gws schema` output to build your `--params` and `--json` flags.



---
*Source: https://skills.yangsir.net/skill/imp-googleworkspace-gws-docs*
*Markdown mirror: https://skills.yangsir.net/api/skill/imp-googleworkspace-gws-docs/markdown*