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.2.tar.gz (224.2 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.2-py3-none-any.whl (79.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: extradoc-0.2.2.tar.gz
  • Upload date:
  • Size: 224.2 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.2.tar.gz
Algorithm Hash digest
SHA256 0393433c358cc6774a1358cbd28f60a049f54a4eaaaebbc0b41e69b175587bed
MD5 d4bb2dd0c51b5f52a2ea360de47fbdba
BLAKE2b-256 c310eeb85c9fb37d3640977f91f10e5d7ac066265afdcfbd2ab7f756f8b9c756

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: extradoc-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 79.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b6372f91d2b6ba70331b1e72a71e91a9bfd945af56eed041fe70223aeb5ff89c
MD5 ee505696f2cd90636c663def3022ef81
BLAKE2b-256 0dc76967beaac4a19acb9ec013d78151f6bd9b28b26e5e146dffdabd6659f949

See more details on using hashes here.

Provenance

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