---
title: google-docs
description: Read, create, and edit Google Docs through the pinned API surface.
canonical_url: https://orchestor.io/docs/en/cli/google-docs
markdown_url: https://orchestor.io/docs/en/cli/google-docs.md
contentType: reference
---

# google-docs

`orc google-docs files list --query TEXT` finds Docs files, newest first, with --limit and --cursor pagination. `exports get CONNECTION_ID DOCUMENT_ID --format pdf|docx|txt|html|md --output FILE` saves a Drive files.export response. The default is pdf; md uses text/markdown. The export limit is 10 MB. `copies create CONNECTION_ID DOCUMENT_ID --name NAME --parent-folder-id FOLDER_ID` copies the whole file. Name and folder are optional. `--dry-run` returns a plan without calling Google; `--readonly` blocks copies. These commands require Drive read access, or write access for copies. Under drive.file, only files created or opened with Orchestor are reachable. Inaccessible files return CONFLICT with this limitation. If a copy outcome is unknown, list files before retrying.

`orc google-docs comments list CONNECTION_ID DOCUMENT_ID` returns comment bodies, quoted text, Drive anchors and replies. `comments get CONNECTION_ID DOCUMENT_ID COMMENT_ID` reads one comment. Manage comments with `comments create --content TEXT [--quoted-text TEXT] [--anchor JSON]`, `comments replies create CONNECTION_ID DOCUMENT_ID COMMENT_ID --content TEXT`, `comments update --content TEXT` and `comments delete`. `comments update --resolved true|false` resolves or reopens through a Drive reply action. When content and resolved are supplied together, content is updated first; re-read if the later action fails. Comments require Drive access. Under drive.file, only files created or opened with Orchestor are reachable; 403/404 returns a CONFLICT explaining this limit. Read customer comment bodies, quotes and anchors with `--wrap-untrusted`. Wrapped human/table output uses JSON to preserve complete markers and content. Anchors are opaque Drive strings, not Docs UTF-16 indices. Comments have no revision guard; write `--dry-run` returns a request plan without Google calls or audit entries.

`orc google-docs tabs list CONNECTION_ID DOCUMENT_ID` returns every tab, including nested tabs, with IDs, titles, parent IDs, nesting levels and sibling order. `tabs create --title TITLE [--parent TAB] [--index N]` creates a tab. `tabs update --tab TAB` renames with `--title TITLE` and moves with `--parent TAB` and `--index N`. Use `--parent ""` to move to the root. index is zero-based sibling order within the parent, not a text offset. Both `--tab` and `--parent` accept IDs or exact unique titles across nested tabs, preferring IDs. Ambiguous titles fail without writing; use an ID from list. `tabs delete --tab TAB` also deletes its children. Edits automatically attach the revision read; `--dry-run` returns resolved requests without writing. Revision mismatch returns `version_conflict`; `--readonly` blocks edits.

`orc google-docs images create --url URL` inserts a public PNG, JPEG or GIF. Optional `--width` and `--height` use points and preserve aspect ratio. Local image uploads are unsupported. `page-breaks create` inserts a page break; `footnotes create` creates a footnote. `chips create --type person --email EMAIL [--name NAME]` inserts a person chip. `chips create --type date --date YYYY-MM-DD` inserts a date chip at midnight UTC, with optional `--time-zone Asia/Tokyo` and `--locale ja`. These insertions accept exactly one of `--index`, `--at TEXT`, or `--end true`, plus shared `--occurrence`, `--match-case`, `--tab`, and `--segment`. Indices use UTF-16 code units. Page breaks and footnotes require the body; images cannot be inserted in footnotes. Google also rejects page breaks inside tables.

`headers create` and `footers create` create a default header or footer in the first tab or `--tab`. Use the returned `replies[].createHeader.headerId` or `replies[].createFooter.footerId` with `orc google-docs text insert CONNECTION_ID DOCUMENT_ID --segment ID --end true --text TEXT` to write its text. Delete it with `headers delete --segment ID` or `footers delete --segment ID`. For footnote text, use the returned `replies[].createFootnote.footnoteId` as `--segment`.

`named-ranges list` returns names, IDs and UTF-16 ranges from the first tab or `--tab`. `named-ranges create --name NAME` names an `--at TEXT` match or a `--start N --end N` range. Names can repeat and have a limit of 256 UTF-16 code units. `named-ranges delete` accepts exactly one of `--named-range-id ID` or `--name NAME`. Deletion is limited to the selected tab; name deletes every matching range in that tab.

`page-layout update --width 612 --height 792 --margin-top 72 --margin-bottom 72 --margin-left 72 --margin-right 72 --orientation landscape` updates the selected tab. Dimensions and margins use points. Supply width and height together. `portrait` clears Google flipPageOrientation; `landscape` flips the base page dimensions. Layout is not rendered in pageless mode. Every edit reads first and attaches `writeControl.requiredRevisionId`. `--dry-run` returns resolved requests and the revision without writing. Revision mismatches return `version_conflict`; `--readonly` blocks edits.

`orc google-docs tables create --rows JSON` creates a table from a rectangular array of string arrays. Choose exactly one of `--index`, `--at`, or `--end true`. After insertion, the command rereads structure and revision, then fills cells bottom-right first at Google-returned indices. `--dry-run` returns insertion requests only, with `table_population=after_insertion`. A failure between batches can leave an empty table. If you receive `table_cells_not_filled`, read the document before creating another table.

Select a table with `--table N` (1-based, including nested tables) or `--at TEXT`. An anchor inside a table selects that table; an outside anchor selects the next table after the match. Rows and columns are zero-based. `tables cells update --row N --column N --text TEXT` replaces the cell contents. An empty string clears the cell. `--cell-style JSON --style-fields FIELD_MASK` applies Google TableCellStyle, including cell borders. Include a field in the mask and omit its value to reset it. Text replacement rejects cells containing nested tables.

`tables rows create --row N --below true|false` inserts below or above a reference row. `tables columns create --column N --right true|false` inserts right or left of a reference column. Defaults are below and right. `rows delete` and `columns delete` remove every row or column spanned by the merged reference cell. Deleting the last row or column removes the table. `tables merges create|delete --row N --column N --row-span N --column-span N` merges or unmerges a range. Merge collects text in the head cell; unmerge keeps text there. Every operation attaches the revision read automatically.

`orc google-docs markdown update CONNECTION_ID DOCUMENT_ID --markdown FILE --append` appends a UTF-8 Markdown file. `--markdown -` reads raw Markdown from stdin; `--stdin` reads a JSON request body. `--replace` replaces the first tab body; `--tab TAB_ID` selects a different tab. `--at TEXT` inserts after a match. `--occurrence`, `--match-case`, `--index`, `--end true`, and `--segment` use the shared location resolver. Choose exactly one of append, replace, at, index, or end. Images are inserted by public URL with insertInlineImage and read back without the original alt text. Ordered lists restart at 1. Unchecked task items (`- [ ]`) become `BULLET_CHECKBOX` checkbox lists. Checked items (`- [x]`) reject the entire write before any Google call and report the source line number because the API cannot set checked state. Tables use two phases: phase 1 inserts non-cell content and empty tables; phase 2 fills cells from bottom-right using indices and a new revision from a document reread. For tables, `--dry-run` prints phase 1 requests and `table_population=after_insertion`: cell population happens after insertion. A phase-2 failure returns `document_id` and `table_cells_not_filled`; read before retrying. Local image files are unsupported. Image references without a URI remain linked placeholders. The write uses the revision read before editing. `--dry-run` prints requests without writing to Google. Footnote content uses an additional guarded batch after body and table cell writes, with IDs and the new revision returned by Google. In dry-run, `$footnote:N` means the footnote ID from reply N of the first batch for non-table previews. Table previews defer cell and footnote requests until insertion. Repeated references create separate native footnotes, grouped into one Markdown definition using named ranges. A failure between batches can leave a partial write; read before retrying.

`orc google-docs formats update` sets `--bold true|false`, `--italic`, `--underline`, `--strikethrough`, `--font`, `--size`, `--color`, `--highlight`, and `--link`, plus paragraph `--named-style`, `--alignment`, `--line-spacing`, `--space-above`, `--space-below`, `--indent-start`, `--indent-end`, and `--indent-first-line`. Colors use `#RRGGBB`. Sizes, spacing above/below, and indents use points; line spacing uses a percentage (100 is normal). `--color reset` restores the inherited color; `--highlight reset` and `--link reset` remove them. `--at TEXT` spans the entire match; `--start N --end N` uses an inclusive start and exclusive end in UTF-16 code units. These commands also accept `--occurrence`, `--match-case`, `--tab`, and `--segment`. Paragraph styles affect paragraphs overlapping the range. `orc google-docs lists create` creates bullets; a NUMBERED_* `--bullet-preset`, such as NUMBERED_DECIMAL_NESTED, creates numbering. `lists delete` removes bullets or numbering. Google removes leading tabs to determine list nesting, which can change indices; re-read after applying. All three commands attach the revision read automatically and return resolved requests with `--dry-run`.

`orc google-docs get` accepts a document ID or Google Docs URL. `--format json` returns the Google documents.get body; `--format text` prints plain body text. `--format markdown` converts documents.get content into Markdown with headings, paragraphs, bold, italic, strikethrough, code, links, nested lists, tables, image references, and footnotes. It requires no Drive export and reads documents Orchestor has never opened. Monospaced fonts render as inline code. Images remain URI references and are never fetched. Markdown offsets are not Docs indices; use text or structure to resolve editing positions. `--all-tabs true --format markdown` prints a titled section for each tab, including nested tabs. Use `--tab TAB_ID` for one tab or `--all-tabs true` for every tab, including nested tabs. The default is the first tab. These two flags cannot be combined.

Positions use UTF-16 code units. Within each tab body, offset n maps to Docs index n+1. Non-text elements such as images and page breaks, and structural positions such as table, row and cell boundaries, become U+FFFC. Emoji may occupy two code units. Each tab has independent indices; headings printed for multiple tabs are outside the body. `--wrap-untrusted` adds markers and changes offsets. Do not compute Docs positions from wrapped strings. JSON `startIndex` and `endIndex` retain Google indices.

`--suggestions-view-mode` selects the Google suggestions view. Indices apply to the returned view. `orc google-docs create --title` creates an empty document and returns `document_id` and `url`. `--readonly` rejects creation. If the create outcome is unknown, check Google Docs before retrying.

`orc google-docs structure CONNECTION_ID DOCUMENT_ID` lists paragraphs, headings, table dimensions and body / header / footer / footnote segments for every tab. `start_index` is inclusive and `end_index` is exclusive. Editable body positions start at 1; other segments start at 0.

`orc google-docs text insert` requires exactly one of `--index`, `--at TEXT`, or `--end true`. An anchor inserts after the match. `--occurrence` is 1-based and defaults to 1; `--match-case true` matches case exactly. `--tab` defaults to the first tab. `--segment` selects a header / footer / footnote ID; omit it for the body. `text delete` deletes an `--at` match or a `--start N --end N` range. The final newline cannot be deleted. `replacements create --at TEXT --text REPLACEMENT` replaces every match; `--tab` limits replacement to that tab.

These three named edits read first and attach that revision as `writeControl.requiredRevisionId`. Missing anchors, out-of-range occurrences and conflicting location selectors return `INVALID_REQUEST` with a reason and never write. Revision mismatches return `version_conflict`; re-read and resolve the edit again. `--dry-run` reads and resolves on the server, then prints the resolved batchUpdate requests and revision without writing to Google. `--readonly` blocks these edits.

`orc google-docs schemas list` lists available methods and batchUpdate request types. `schemas get NAME` returns the definition, referenced schemas, and Discovery revision. Use `api get --method documents.get --params JSON` to read and `api update --method documents.create|documents.batchUpdate --params JSON --body JSON` to write. Methods and request types outside the pinned Discovery are rejected before calling Google.

Use `orc google-docs batch-requests create CONNECTION_ID DOCUMENT_ID --requests JSON` or `--stdin` to submit batchUpdate requests. Each request has exactly one allowed type key. `--dry-run` validates the keys and counts and prints the request without sending it. Google validates all requests and applies all or none. `--write-control` passes Google WriteControl; no revision is attached automatically. If a write outcome is unknown, read the document before retrying. All positions use UTF-16 code units.

## Usage

```bash title="terminal"
orc connections list --workspace YOUR_WORKSPACE_ID --provider google-workspace --format json
```

*Find the connection*

## Subcommands

### `create`

Create a Google Doc

```bash title="terminal"
orc google-docs create <id> [options]
```

#### Unique options

##### `--title`

(required) Body field: title; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs create <id> --title <value>
```

### `get`

Read a Google Doc

```bash title="terminal"
orc google-docs get <id> <document-id> [options]
```

#### Unique options

##### `--tab`

Tab ID to read, including nested tabs. Cannot be combined with all_tabs=true.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs get <id> <document-id> --tab <value>
```

##### `--all-tabs`

Read every tab, including nested tabs. Each tab is a separate index segment.; enum: true|false

Type: `string`. Optional.

```bash title="terminal"
orc google-docs get <id> <document-id> --all-tabs <value>
```

##### `--suggestions-view-mode`

Google suggestions view mode. Indices apply to the returned view.; enum: DEFAULT_FOR_CURRENT_ACCESS|SUGGESTIONS_INLINE|PREVIEW_SUGGESTIONS_ACCEPTED|PREVIEW_WITHOUT_SUGGESTIONS

Type: `string`. Optional.

```bash title="terminal"
orc google-docs get <id> <document-id> --suggestions-view-mode <value>
```

### `api get`

Call a read-only Docs API method

```bash title="terminal"
orc google-docs api get <id> [options]
```

#### Unique options

##### `--body`

Google request body. All Docs indices use UTF-16 code units.; (JSON object, e.g. '{"custom_id":"x"}')

Type: `string`. Optional.

```bash title="terminal"
orc google-docs api get <id> --body <value>
```

##### `--method`

(required) Read-only Discovery method id (documents.get).; enum: documents.get

Type: `string`. Optional.

```bash title="terminal"
orc google-docs api get <id> --method <value>
```

##### `--params`

Path and query parameters by Discovery name, for example {"documentId":"…"}. Run `orc docs schemas get <method>` for the list.; (JSON object, e.g. '{"custom_id":"x"}')

Type: `string`. Optional.

```bash title="terminal"
orc google-docs api get <id> --params <value>
```

### `api update`

Call a mutating Docs API method

```bash title="terminal"
orc google-docs api update <id> [options]
```

#### Unique options

##### `--body`

Google request body. All Docs indices use UTF-16 code units.; (JSON object, e.g. '{"custom_id":"x"}')

Type: `string`. Optional.

```bash title="terminal"
orc google-docs api update <id> --body <value>
```

##### `--method`

(required) Mutating Discovery method id (documents.create or documents.batchUpdate).; enum: documents.batchUpdate|documents.create

Type: `string`. Optional.

```bash title="terminal"
orc google-docs api update <id> --method <value>
```

##### `--params`

Path and query parameters by Discovery name, for example {"documentId":"…"}. Run `orc docs schemas get <method>` for the list.; (JSON object, e.g. '{"custom_id":"x"}')

Type: `string`. Optional.

```bash title="terminal"
orc google-docs api update <id> --params <value>
```

### `batch-requests create`

Apply batchUpdate requests

```bash title="terminal"
orc google-docs batch-requests create <id> <document-id> [options]
```

#### Unique options

##### `--requests`

(required) batchUpdate requests, each with exactly one pinned Request type key, for example {"insertText":{"location":{"index":1},"text":"Hello"}}. All indices use UTF-16 code units. Run `orc docs schemas list` for the types.; JSON array of objects (use --stdin for large resources)

Type: `string`. Optional.

```bash title="terminal"
orc google-docs batch-requests create <id> <document-id> --requests <value>
```

##### `--write-control`

Google WriteControl, for example {"requiredRevisionId":"…"}. No revision is attached automatically.; (JSON object, e.g. '{"custom_id":"x"}')

Type: `string`. Optional.

```bash title="terminal"
orc google-docs batch-requests create <id> <document-id> --write-control <value>
```

### `schemas list`

List Docs API methods and request types

```bash title="terminal"
orc google-docs schemas list [options]
```

### `schemas get`

Get a Docs API schema

```bash title="terminal"
orc google-docs schemas get <name> [options]
```

### `replacements create`

Replace literal text in a Google Doc

```bash title="terminal"
orc google-docs replacements create <id> <document-id> [options]
```

#### Unique options

##### `--at`

(required) Literal text to replace throughout the document or selected tab.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs replacements create <id> <document-id> --at <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs replacements create <id> <document-id> --match-case <value>
```

##### `--tab`

Tab ID to limit replacements using tabsCriteria. Omit to replace in every tab.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs replacements create <id> <document-id> --tab <value>
```

##### `--text`

(required) Replacement text; an empty string removes matches.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs replacements create <id> <document-id> --text <value>
```

### `structure`

Inspect Google Docs structure

```bash title="terminal"
orc google-docs structure <id> <document-id> [options]
```

### `text delete`

Delete a text match or range

```bash title="terminal"
orc google-docs text delete <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --at <value>
```

##### `--end`

Exclusive range end. The final segment newline cannot be deleted.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --end <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --segment <value>
```

##### `--start`

Inclusive range start. Use start and end together, or at.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --start <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text delete <id> <document-id> --tab <value>
```

### `text insert`

Insert text at a named location

```bash title="terminal"
orc google-docs text insert <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --at <value>
```

##### `--end`

Insert before the segment final newline. Specify exactly one of index, at, or end=true.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --end <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --index <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --tab <value>
```

##### `--text`

(required) Text to insert. With at, inserts after the selected match.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs text insert <id> <document-id> --text <value>
```

### `markdown update`

Update Markdown in a Google Doc

```bash title="terminal"
orc google-docs markdown update <id> <document-id> [options]
```

#### Unique options

##### `--append`

Append before the final newline of the body or --tab. Use exactly one of append, replace, at, index, or end=true.

Type: `boolean`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --append
```

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --at <value>
```

##### `--end`

Insert at the end of the selected segment, using the shared location resolver.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --end <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --index <value>
```

##### `--markdown`

(required) Markdown content. CLI: --markdown FILE reads a UTF-8 file; --markdown - reads raw Markdown from stdin. Images are inserted by public URL and lose their original alt text on readback. Ordered lists restart at 1. Unchecked task items (- [ ]) become BULLET_CHECKBOX lists. Checked items (- [x]) reject the whole write before any Google call, with the source line number. Tables are inserted first; cells are populated after insertion using reread document indices and revision. Table dry-run prints phase 1 only. No Drive import or local image upload.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --markdown <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --occurrence <value>
```

##### `--replace`

Replace the entire body of the first tab, or --tab. Keeps the reserved final newline.

Type: `boolean`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --replace
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs markdown update <id> <document-id> --tab <value>
```

### `formats update`

Update text and paragraph formatting

```bash title="terminal"
orc google-docs formats update <id> <document-id> [options]
```

#### Unique options

##### `--alignment`

Body field: alignment; enum: START|CENTER|END|JUSTIFIED

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --alignment <value>
```

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --at <value>
```

##### `--bold`

Body field: bold

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --bold <value>
```

##### `--color`

Text color as #RRGGBB; null resets the inherited color.; (use "null" or "reset" to clear)

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --color <value>
```

##### `--end`

Exclusive range end in UTF-16 code units. The final segment newline is reserved.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --end <value>
```

##### `--font`

Font family, for example Arial.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --font <value>
```

##### `--highlight`

Highlight as #RRGGBB; null removes the highlight.; (use "null" or "reset" to clear)

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --highlight <value>
```

##### `--indent-end`

End indentation in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --indent-end <value>
```

##### `--indent-first-line`

First line indentation in points; negative values allow hanging indentation.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --indent-first-line <value>
```

##### `--indent-start`

Start indentation in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --indent-start <value>
```

##### `--italic`

Body field: italic

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --italic <value>
```

##### `--line-spacing`

Line spacing as a percentage; 100 is normal.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --line-spacing <value>
```

##### `--link`

Link URL; null removes the link.; (use "null" or "reset" to clear); max 2048 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --link <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --match-case <value>
```

##### `--named-style`

Apply a named paragraph style; does not edit the named style definition.; enum: NORMAL_TEXT|TITLE|SUBTITLE|HEADING_1|HEADING_2|HEADING_3|HEADING_4|HEADING_5|HEADING_6

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --named-style <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --segment <value>
```

##### `--size`

Font size in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --size <value>
```

##### `--space-above`

Space above the paragraph in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --space-above <value>
```

##### `--space-below`

Space below the paragraph in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --space-below <value>
```

##### `--start`

Inclusive range start. Specify start/end together, or at to span the entire matched text.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --start <value>
```

##### `--strikethrough`

Body field: strikethrough

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --strikethrough <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --tab <value>
```

##### `--underline`

Body field: underline

Type: `string`. Optional.

```bash title="terminal"
orc google-docs formats update <id> <document-id> --underline <value>
```

### `lists create`

Create bullets or numbering

```bash title="terminal"
orc google-docs lists create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --at <value>
```

##### `--bullet-preset`

Google bullet or numbering preset. NUMBERED_* creates numbering. Google removes leading tabs to determine nesting, which can change indices; re-read after applying.; enum: BULLET_DISC_CIRCLE_SQUARE|BULLET_DIAMONDX_ARROW3D_SQUARE|BULLET_CHECKBOX|BULLET_ARROW_DIAMOND_DISC|BULLET_STAR_CIRCLE_SQUARE|BULLET_ARROW3D_CIRCLE_SQUARE|BULLET_LEFTTRIANGLE_DIAMOND_DISC|BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE|BULLET_DIAMOND_CIRCLE_SQUARE|NUMBERED_DECIMAL_ALPHA_ROMAN|NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS|NUMBERED_DECIMAL_NESTED|NUMBERED_UPPERALPHA_ALPHA_ROMAN|NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL|NUMBERED_ZERODECIMAL_ALPHA_ROMAN

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --bullet-preset <value>
```

##### `--end`

Exclusive range end in UTF-16 code units. The final segment newline is reserved.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --end <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --segment <value>
```

##### `--start`

Inclusive range start. Specify start/end together, or at to span the entire matched text.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --start <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists create <id> <document-id> --tab <value>
```

### `lists delete`

Remove bullets or numbering

```bash title="terminal"
orc google-docs lists delete <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --at <value>
```

##### `--end`

Exclusive range end in UTF-16 code units. The final segment newline is reserved.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --end <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --segment <value>
```

##### `--start`

Inclusive range start. Specify start/end together, or at to span the entire matched text.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --start <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs lists delete <id> <document-id> --tab <value>
```

### `tables cells update`

Update table cell text and style

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --at <value>
```

##### `--cell-style`

Google TableCellStyle JSON, e.g. {"backgroundColor":{"color":{"rgbColor":{"red":1}}}}. Cell borders are supported.; (JSON object, e.g. '{"custom_id":"x"}')

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --cell-style <value>
```

##### `--column`

(required) Zero-based column index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --column <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --occurrence <value>
```

##### `--row`

(required) Zero-based row index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --row <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --segment <value>
```

##### `--style-fields`

Explicit TableCellStyle field mask, required with cell_style. Include an omitted field to reset it.; max 1000 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --style-fields <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --table <value>
```

##### `--text`

Replace the entire cell text, preserving its final newline. Empty string clears it. Nested tables must be edited separately.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables cells update <id> <document-id> --text <value>
```

### `tables columns create`

Insert a table column

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --at <value>
```

##### `--column`

(required) Zero-based column index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --column <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --occurrence <value>
```

##### `--right`

Insert right of the reference column; false inserts left.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --right <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables columns create <id> <document-id> --table <value>
```

### `tables columns delete`

Delete a table column

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --at <value>
```

##### `--column`

(required) Zero-based column index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --column <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables columns delete <id> <document-id> --table <value>
```

### `tables create`

Create a table with plain-text data

```bash title="terminal"
orc google-docs tables create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --at <value>
```

##### `--end`

Insert before the final newline. Use exactly one of index, at, end=true.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --end <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --index <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --occurrence <value>
```

##### `--rows`

(required) Rectangular JSON array of rows of plain-text cell values, for example [["Name","Count"],["A","2"]]. At most 500 cells and 65536 UTF-16 units total. Tables cannot be inserted in footnotes. Cells are filled after rereading the inserted structure; dry-run previews insertion only.; JSON array of arrays (use --stdin for large resources)

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --rows <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables create <id> <document-id> --tab <value>
```

### `tables merges create`

Merge table cells

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --at <value>
```

##### `--column`

(required) Zero-based column index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --column <value>
```

##### `--column-span`

(required) Number of columns in the merge/unmerge range.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --column-span <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --occurrence <value>
```

##### `--row`

(required) Zero-based row index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --row <value>
```

##### `--row-span`

(required) Number of rows in the merge/unmerge range.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --row-span <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges create <id> <document-id> --table <value>
```

### `tables merges delete`

Unmerge table cells

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --at <value>
```

##### `--column`

(required) Zero-based column index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --column <value>
```

##### `--column-span`

(required) Number of columns in the merge/unmerge range.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --column-span <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --occurrence <value>
```

##### `--row`

(required) Zero-based row index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --row <value>
```

##### `--row-span`

(required) Number of rows in the merge/unmerge range.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --row-span <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables merges delete <id> <document-id> --table <value>
```

### `tables rows create`

Insert a table row

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --at <value>
```

##### `--below`

Insert below the reference row; false inserts above.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --below <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --occurrence <value>
```

##### `--row`

(required) Zero-based row index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --row <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables rows create <id> <document-id> --table <value>
```

### `tables rows delete`

Delete a table row

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --at <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --occurrence <value>
```

##### `--row`

(required) Zero-based row index.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --row <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --tab <value>
```

##### `--table`

1-based table ordinal in the selected tab/segment, including nested tables. Use table or at. at selects the innermost table containing the match, otherwise the next table after it.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tables rows delete <id> <document-id> --table <value>
```

### `chips create`

Insert a person or date chip

```bash title="terminal"
orc google-docs chips create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --at <value>
```

##### `--date`

Calendar date as YYYY-MM-DD, inserted at midnight UTC.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --date <value>
```

##### `--email`

Body field: email; max 320 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --email <value>
```

##### `--end`

Insert before the final newline. Use exactly one of index, at, end=true.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --end <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --index <value>
```

##### `--locale`

Google date display locale, for example ja or en.; max 20 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --locale <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --match-case <value>
```

##### `--name`

Optional display name for a person chip.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --name <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --tab <value>
```

##### `--time-zone`

Date display time zone, for example Asia/Tokyo. Google defaults to UTC.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --time-zone <value>
```

##### `--type`

(required) person requires email; date requires date. Other type-specific fields are rejected.; enum: person|date

Type: `string`. Optional.

```bash title="terminal"
orc google-docs chips create <id> <document-id> --type <value>
```

### `footers create`

Create the default footer

```bash title="terminal"
orc google-docs footers create <id> <document-id> [options]
```

#### Unique options

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footers create <id> <document-id> --tab <value>
```

### `footers delete`

Delete a footer

```bash title="terminal"
orc google-docs footers delete <id> <document-id> [options]
```

#### Unique options

##### `--segment`

(required) Footer ID from structure or the create reply.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footers delete <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footers delete <id> <document-id> --tab <value>
```

### `footnotes create`

Create a footnote

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --at <value>
```

##### `--end`

Insert before the final newline. Use exactly one of index, at, end=true.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --end <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --index <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs footnotes create <id> <document-id> --tab <value>
```

### `headers create`

Create the default header

```bash title="terminal"
orc google-docs headers create <id> <document-id> [options]
```

#### Unique options

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs headers create <id> <document-id> --tab <value>
```

### `headers delete`

Delete a header

```bash title="terminal"
orc google-docs headers delete <id> <document-id> [options]
```

#### Unique options

##### `--segment`

(required) Header ID from structure or the create reply.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs headers delete <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs headers delete <id> <document-id> --tab <value>
```

### `images create`

Insert an image from a public URL

```bash title="terminal"
orc google-docs images create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --at <value>
```

##### `--end`

Insert before the final newline. Use exactly one of index, at, end=true.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --end <value>
```

##### `--height`

Image height in points; aspect ratio is preserved.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --height <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --index <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --tab <value>
```

##### `--url`

(required) Public PNG, JPEG or GIF URL fetched by Google; no local uploads.; max 2048 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --url <value>
```

##### `--width`

Image width in points; aspect ratio is preserved.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs images create <id> <document-id> --width <value>
```

### `named-ranges list`

List named ranges in a tab

```bash title="terminal"
orc google-docs named-ranges list <id> <document-id> [options]
```

#### Unique options

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges list <id> <document-id> --tab <value>
```

### `named-ranges create`

Create a named range

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --at <value>
```

##### `--end`

Exclusive range end in UTF-16 code units. The final segment newline is reserved.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --end <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --match-case <value>
```

##### `--name`

(required) Range name, measured in UTF-16 code units; names need not be unique.; max 256 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --name <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --segment <value>
```

##### `--start`

Inclusive range start. Specify start/end together, or at to span the entire matched text.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --start <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges create <id> <document-id> --tab <value>
```

### `named-ranges delete`

Delete named ranges

```bash title="terminal"
orc google-docs named-ranges delete <id> <document-id> [options]
```

#### Unique options

##### `--name`

Delete every range with this name in the selected tab.; max 256 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges delete <id> <document-id> --name <value>
```

##### `--named-range-id`

Delete this range ID in the selected tab. Use exactly one of name or named_range_id.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges delete <id> <document-id> --named-range-id <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs named-ranges delete <id> <document-id> --tab <value>
```

### `page-breaks create`

Insert a page break

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> [options]
```

#### Unique options

##### `--at`

Literal anchor text within the selected tab and segment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --at <value>
```

##### `--end`

Insert before the final newline. Use exactly one of index, at, end=true.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --end <value>
```

##### `--index`

Google Docs index in UTF-16 code units.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --index <value>
```

##### `--match-case`

Match case exactly, default false.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --match-case <value>
```

##### `--occurrence`

1-based anchor occurrence, default 1. An absent occurrence fails without a write.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --occurrence <value>
```

##### `--segment`

Header, footer or footnote ID in the selected tab. Omit for the body.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --segment <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-breaks create <id> <document-id> --tab <value>
```

### `page-layout update`

Update page size, margins and orientation

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> [options]
```

#### Unique options

##### `--height`

Base page height in points. Requires width.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --height <value>
```

##### `--margin-bottom`

Bottom margin in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --margin-bottom <value>
```

##### `--margin-left`

Left margin in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --margin-left <value>
```

##### `--margin-right`

Right margin in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --margin-right <value>
```

##### `--margin-top`

Top margin in points.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --margin-top <value>
```

##### `--orientation`

portrait clears flipPageOrientation; landscape sets it, flipping the base page dimensions. Only rendered in paged documents.; enum: portrait|landscape

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --orientation <value>
```

##### `--tab`

Tab ID. Defaults to the first tab; use structure to inspect nested tabs.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --tab <value>
```

##### `--width`

Base page width in points. Requires height; orientation flips these base dimensions.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs page-layout update <id> <document-id> --width <value>
```

### `tabs list`

List document tabs, including nested tabs

```bash title="terminal"
orc google-docs tabs list <id> <document-id> [options]
```

### `tabs create`

Create a document tab

```bash title="terminal"
orc google-docs tabs create <id> <document-id> [options]
```

#### Unique options

##### `--index`

Zero-based sibling position within the parent, not a text offset.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tabs create <id> <document-id> --index <value>
```

##### `--parent`

Parent tab ID or exact, unique title. Empty string selects the document root; omit to keep the current parent on update.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tabs create <id> <document-id> --parent <value>
```

##### `--title`

New tab title. Omit for the Google default.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tabs create <id> <document-id> --title <value>
```

### `tabs delete`

Delete a document tab and its children

```bash title="terminal"
orc google-docs tabs delete <id> <document-id> [options]
```

#### Unique options

##### `--tab`

(required) Tab ID or exact, unique title, including nested tabs. Ambiguous titles fail without writing; use tabs list for IDs.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tabs delete <id> <document-id> --tab <value>
```

### `tabs update`

Rename or move a document tab

```bash title="terminal"
orc google-docs tabs update <id> <document-id> [options]
```

#### Unique options

##### `--index`

Zero-based sibling position within the parent, not a text offset.

Type: `number`. Optional.

```bash title="terminal"
orc google-docs tabs update <id> <document-id> --index <value>
```

##### `--parent`

Parent tab ID or exact, unique title. Empty string selects the document root; omit to keep the current parent on update.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tabs update <id> <document-id> --parent <value>
```

##### `--tab`

(required) Tab ID or exact, unique title, including nested tabs. Ambiguous titles fail without writing; use tabs list for IDs.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tabs update <id> <document-id> --tab <value>
```

##### `--title`

Rename the selected tab.; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs tabs update <id> <document-id> --title <value>
```

### `comments list`

List document comments with quoted text and anchors

```bash title="terminal"
orc google-docs comments list <id> <document-id> [options]
```

#### Unique options

##### `--include-deleted`

enum: true|false

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments list <id> <document-id> --include-deleted <value>
```

### `comments create`

Create a document comment

```bash title="terminal"
orc google-docs comments create <id> <document-id> [options]
```

#### Unique options

##### `--anchor`

Opaque Drive anchor JSON string. Drive anchors are not Docs UTF-16 indices and may not appear inline in the Google Docs editor.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments create <id> <document-id> --anchor <value>
```

##### `--content`

(required) Plain-text comment body. Customer content; use --wrap-untrusted when reading comments.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments create <id> <document-id> --content <value>
```

##### `--quoted-text`

Quoted document text returned with the comment.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments create <id> <document-id> --quoted-text <value>
```

### `comments get`

Get a document comment and its replies

```bash title="terminal"
orc google-docs comments get <id> <document-id> <comment-id> [options]
```

### `comments delete`

Delete a document comment

```bash title="terminal"
orc google-docs comments delete <id> <document-id> <comment-id> [options]
```

### `comments replies create`

Reply to a document comment

```bash title="terminal"
orc google-docs comments replies create <id> <document-id> <comment-id> [options]
```

#### Unique options

##### `--content`

(required) Plain-text comment body. Customer content; use --wrap-untrusted when reading comments.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments replies create <id> <document-id> <comment-id> --content <value>
```

### `comments update`

Edit, resolve or reopen a document comment

```bash title="terminal"
orc google-docs comments update <id> <document-id> <comment-id> [options]
```

#### Unique options

##### `--content`

Plain-text comment body. Customer content; use --wrap-untrusted when reading comments.; max 65536 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments update <id> <document-id> <comment-id> --content <value>
```

##### `--resolved`

true resolves and false reopens via a Drive reply action. May be combined with content.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs comments update <id> <document-id> <comment-id> --resolved <value>
```

### `copies create`

Copy a document

```bash title="terminal"
orc google-docs copies create <id> <document-id> [options]
```

#### Unique options

##### `--name`

Name of the copy. Defaults to "Copy of …".; max 500 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs copies create <id> <document-id> --name <value>
```

##### `--parent-folder-id`

Drive folder for the copy. Defaults to the source folder.

Type: `string`. Optional.

```bash title="terminal"
orc google-docs copies create <id> <document-id> --parent-folder-id <value>
```

### `exports get`

Export a document

```bash title="terminal"
orc google-docs exports get <id> <document-id> [options]
```

### `files list`

List documents

```bash title="terminal"
orc google-docs files list <id> [options]
```

#### Unique options

##### `--query`

Only documents whose name contains this text.; max 200 chars

Type: `string`. Optional.

```bash title="terminal"
orc google-docs files list <id> --query <value>
```

## Examples

### Find, export and copy Docs

```bash title="terminal"
orc google-docs files list YOUR_CONNECTION_ID --workspace YOUR_WORKSPACE_ID --query Report --format json
orc google-docs exports get YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --format pdf --output report.pdf
orc google-docs copies create YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --name "Report copy" --dry-run
```

*Find, export and copy Docs*

### Preview a Markdown update

```bash title="terminal"
orc google-docs markdown update YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --markdown report.md --replace --tab TAB_ID --dry-run
```

*Preview a Markdown update*

### Read all tabs as Markdown

```bash title="terminal"
orc google-docs get YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --format markdown --all-tabs true --readonly
```

*Read all tabs as Markdown*

### Read the Google body

```bash title="terminal"
orc google-docs get YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --format json
```

*Read the Google body*

### Read text from a URL

```bash title="terminal"
orc google-docs get YOUR_CONNECTION_ID https://docs.google.com/document/d/DOCUMENT_ID/edit --workspace YOUR_WORKSPACE_ID --format text --readonly
```

*Read text from a URL*

### Select tabs and wrap external text

```bash title="terminal"
orc google-docs get YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --tab TAB_ID --format text --wrap-untrusted
orc google-docs get YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --all-tabs true --format json
```

*Select tabs and wrap external text*

### Preview insertion at an anchor

```bash title="terminal"
orc google-docs structure YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID
orc google-docs text insert YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --at X --occurrence 2 --text "New text" --dry-run
```

*Preview insertion at an anchor*

### Inspect API definitions

```bash title="terminal"
orc google-docs schemas list --workspace YOUR_WORKSPACE_ID
orc google-docs schemas get insertText --workspace YOUR_WORKSPACE_ID
```

*Inspect API definitions*

### Validate a batch edit before sending

```bash title="terminal"
orc google-docs batch-requests create YOUR_CONNECTION_ID DOCUMENT_ID --workspace YOUR_WORKSPACE_ID --requests '[{"insertText":{"location":{"index":1},"text":"Hello"}}]' --dry-run
```

*Validate a batch edit before sending*

### Create a document

```bash title="terminal"
orc google-docs create YOUR_CONNECTION_ID --workspace YOUR_WORKSPACE_ID --title "Weekly report" --format json
```

*Create a document*

## Permissions

Use a Google Workspace connection. Existing Google Sheets connections lack Docs scopes; connect Google Workspace. Reading requires documents.readonly or documents; writing requires documents. Share the document with the connected Google account. You also need to sign in and have access to the Workspace.

## Global Options

The following [global options](https://orchestor.io/docs/cli/global-flags.md) can be used with `orc google-docs`:

- [`--help`](https://orchestor.io/docs/cli/global-flags.md#help)
- [`--workspace`](https://orchestor.io/docs/cli/global-flags.md#workspace)
- [`--json`](https://orchestor.io/docs/cli/global-flags.md#json-output)
- [`--pretty`](https://orchestor.io/docs/cli/global-flags.md#json-output)
- [`--format`](https://orchestor.io/docs/cli/global-flags.md#output-format)
- [`--field`](https://orchestor.io/docs/cli/global-flags.md#field-selection)
- [`--fields`](https://orchestor.io/docs/cli/global-flags.md#field-selection)
- [`--raw`](https://orchestor.io/docs/cli/global-flags.md#raw-output)
- [`--output`](https://orchestor.io/docs/cli/global-flags.md#file-output)
- [`--no-pager`](https://orchestor.io/docs/cli/global-flags.md#pager)
- [`--dry-run`](https://orchestor.io/docs/cli/global-flags.md#dry-run)
- [`--yes`](https://orchestor.io/docs/cli/global-flags.md#confirmation)
- [`--limit`](https://orchestor.io/docs/cli/global-flags.md)
- [`--cursor`](https://orchestor.io/docs/cli/global-flags.md)
- [`--stdin`](https://orchestor.io/docs/cli/global-flags.md#standard-input)
- [`--from-stdin`](https://orchestor.io/docs/cli/global-flags.md#standard-input)
- [`--page-all`](https://orchestor.io/docs/cli/global-flags.md#all-pages)
- [`--timing`](https://orchestor.io/docs/cli/global-flags.md#request-timing)
- [`--readonly`](https://orchestor.io/docs/cli/global-flags.md#read-only-mode)
- [`--wrap-untrusted`](https://orchestor.io/docs/cli/global-flags.md#untrusted-content-wrapping)

For details and examples, see [global options](https://orchestor.io/docs/cli/global-flags.md).

---

[Documentation index](https://orchestor.io/docs/llms.txt)
