Skip to main content

File-based Google Docs representation library for LLM agents

Project description

extradoc

File-based Google Docs representation library for LLM agents.

Part of the ExtraSuite project.

Overview

extradoc transforms Google Docs into a file-based representation optimized for LLM agents, enabling efficient "fly-blind" editing through the pull/diff/push workflow.

Installation

pip install extradoc
# or
uvx extradoc

Quick Start

# Authenticate (one-time)
uv run python -m extrasuite.client login

# Pull a document
uv run python -m extradoc pull https://docs.google.com/document/d/DOCUMENT_ID/edit

# Edit files locally...

# Preview changes (dry run)
uv run python -m extradoc diff ./DOCUMENT_ID/

# Push changes
uv run python -m extradoc push ./DOCUMENT_ID/

CLI Commands

pull

Download a Google Doc to local files:

uv run python -m extradoc pull <document_url_or_id> [output_dir]

# Options:
#   --no-raw    Don't save raw API responses to .raw/ folder

diff

Preview changes (dry run, no API calls):

uv run python -m extradoc diff <folder>
# Output: batchUpdate JSON to stdout

push

Apply changes to Google Docs:

uv run python -m extradoc push <folder>

# Options:
#   -f, --force    Push despite warnings (blocks still prevent push)
#   --verify       Re-pull after push and compare to verify correctness

Folder Structure

After pull, the folder contains:

<document_id>/
  document.xml            # ExtraDoc XML (main content)
  styles.xml              # Factorized style definitions
  .raw/
    document.json         # Raw API response
  .pristine/
    document.zip          # Original state for diff comparison

Development

cd extradoc
uv sync --all-extras
uv run pytest tests/ -v
uv run ruff check . && uv run ruff format .
uv run mypy src/extradoc

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extradoc-0.3.0.tar.gz (339.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extradoc-0.3.0-py3-none-any.whl (134.4 kB view details)

Uploaded Python 3

File details

Details for the file extradoc-0.3.0.tar.gz.

File metadata

  • Download URL: extradoc-0.3.0.tar.gz
  • Upload date:
  • Size: 339.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extradoc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 86eefb5e2876bc2504255fc2df28a8781dcd7df26d513d61abe9026363968ac0
MD5 bd4a6fabdeb57dc347c45312bc53f952
BLAKE2b-256 e9154fd52b3ae338365932be02428b8911f0fdf95497a23585d45767e087cb78

See more details on using hashes here.

Provenance

The following attestation bundles were made for extradoc-0.3.0.tar.gz:

Publisher: publish-extradoc.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file extradoc-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: extradoc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 134.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extradoc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 883ee481e2e16728b8fc3cc4e80fa5318d0f373de0ad776af8e8e668781f6e8b
MD5 4a994e1725d26ede4d18b66418912ee7
BLAKE2b-256 32e893aba6a505bffae34a8dff86390e1589a4dc31c9bbcb787304bd20656448

See more details on using hashes here.

Provenance

The following attestation bundles were made for extradoc-0.3.0-py3-none-any.whl:

Publisher: publish-extradoc.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page