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.2.1.tar.gz (207.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.2.1-py3-none-any.whl (70.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: extradoc-0.2.1.tar.gz
  • Upload date:
  • Size: 207.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.2.1.tar.gz
Algorithm Hash digest
SHA256 cc4deefb5fff1d363370b05c089a086c6a8efec50a43a59fc534aaa781e84505
MD5 b881d7d6cea18729ab57959b2933d527
BLAKE2b-256 a103c2ffea530589055221cbe20354f23ede12ef89e622d7ff7c40fbb7366bf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for extradoc-0.2.1.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.2.1-py3-none-any.whl.

File metadata

  • Download URL: extradoc-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 70.9 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f727ded867e981ddd68f124c62aacd29225810c3a882fa0e0e9b125ac5daa8f
MD5 094d354c0d89161c577e79f7986b6a59
BLAKE2b-256 08ceee097ff92dec84f9403ea5bb91decb00bce14049f806bbca3fd2ad8bb5a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for extradoc-0.2.1-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