Create and modify Google Docs documents. Read content, insert tables, apply heading styles, and manage formatting. Use when asked to edit a gdoc, write a Google document, update a doc, or format document content.
89
Quality
89%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
This guide covers text formatting options available in the Google Docs skill.
The formatting apply command supports these basic text properties:
| Property | Flag | Values | Description |
|---|---|---|---|
| Bold | --bold | true/false (flag) | Makes text bold |
| Italic | --italic | true/false (flag) | Makes text italic |
| Underline | --underline | true/false (flag) | Underlines text |
| Font Size | --font-size N | Number (points) | Sets font size |
# Make text bold
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 1 --end-index 20 --bold
# Make text italic
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 50 --end-index 100 --italic
# Combine multiple formats
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 1 --end-index 50 --bold --italic --underline
# Change font size
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 1 --end-index 20 --font-size 18
# Create a heading (bold + larger font)
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 1 --end-index 15 --bold --font-size 16Google Docs uses character-based indices for positioning:
Index: 0 1 2 3 4 5 6 7 8 9
Text: H e l l o W o r l d[1, 5) includes characters at indices 1, 2, 3, 4 but not 5\n takes one index positionTo see document structure and indices, use:
python scripts/google-docs.py documents get DOC_ID --jsonThis shows the full document structure including:
# Format as a title (bold, size 18)
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 1 --end-index 20 --bold --font-size 18# Format as a heading (bold, size 14)
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 50 --end-index 70 --bold --font-size 14# Emphasize with italic
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 100 --end-index 150 --italic
# Strong emphasis with bold
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 200 --end-index 250 --bold# Standard body text (typically 11pt)
python scripts/google-docs.py formatting apply DOC_ID \
--start-index 300 --end-index 500 --font-size 11| Size (pt) | Typical Use |
|---|---|
| 18-24 | Main document title |
| 14-16 | Section headers (H1) |
| 12-13 | Subsection headers (H2) |
| 11 | Body text (default) |
| 10 | Small text, footnotes |
| 8-9 | Very small text, captions |
#!/bin/bash
DOC_ID="your-document-id"
# Add content with proper structure
python scripts/google-docs.py content append $DOC_ID --text "Project Report\n\n"
python scripts/google-docs.py content append $DOC_ID --text "Executive Summary\n\n"
python scripts/google-docs.py content append $DOC_ID --text "This report covers...\n\n"
python scripts/google-docs.py content append $DOC_ID --text "Introduction\n\n"
python scripts/google-docs.py content append $DOC_ID --text "Background information...\n\n"
# Format title (assuming it starts at index 1)
python scripts/google-docs.py formatting apply $DOC_ID \
--start-index 1 --end-index 15 --bold --font-size 18
# Format first section header
python scripts/google-docs.py formatting apply $DOC_ID \
--start-index 17 --end-index 34 --bold --font-size 14
# Format second section header
python scripts/google-docs.py formatting apply $DOC_ID \
--start-index 60 --end-index 73 --bold --font-size 14# Bold + larger for emphasis
python scripts/google-docs.py formatting apply $DOC_ID \
--start-index 100 --end-index 120 --bold --font-size 12
# Italic for quotes
python scripts/google-docs.py formatting apply $DOC_ID \
--start-index 200 --end-index 300 --italicThe Google Docs skill currently supports basic text formatting. The following are not yet supported:
These features can be added to the skill in future versions or accessed through the Google Docs web interface.
documents get --json to verify index positions before formattingFor complex documents with many formatting operations, consider:
--json output to verify each operationdocuments getdocuments, not documents.readonly)documents get --json to see the exact structure--bold vs --bold=false)For complete details on text formatting capabilities:
Install with Tessl CLI
npx tessl i odyssey4me/google-docs@0.2.1