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.1.0.tar.gz (213.7 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.1.0-py3-none-any.whl (69.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for extradoc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64bd3e91afe0d7f9b431ad1f875ff72a6326aa5eaa29ead14378f1a3ca06a985
MD5 7c9c9b85f34801b467f1a38b2bc86583
BLAKE2b-256 ae0e36e187913c930f3416ea362ed565faa5d1a4739ac0ce5ea59384a07be206

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: extradoc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 69.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f32d573b5f36c0449db9893288dfba4b247ad757a25f59728c91aa3f34c85ab0
MD5 806c90ae6cc853e278f918a518e68644
BLAKE2b-256 30a571421a63448faf9edd847bfcefdbecbd4470179cf82b2fbb8382fec5dda9

See more details on using hashes here.

Provenance

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