Skip to main content

Automated DOCX Redlining Engine

Project description

FILE: README.md

Adeu: AI Redlining Engine

Adeu allows AI Agents and LLMs to "Track Changes" in Microsoft Word documents.

Most LLMs output raw text or Markdown. Professionals need w:ins (insertions) and w:del (deletions) to review changes inside Word. adeu lib shows a Word document in an LLM and human understandable textual format and reflects changes made to it to the actual word document.

It creates a "Virtual DOM" of your document, letting AI apply surgical edits without breaking your formatting, numbering, or headers.


📦 Installation

Adeu is available on PyPI.

pip install adeu

🚀 Ways to Use Adeu

1. As MCP Server (No Code Required)

If you use an agentic systtem such as Claude Desktop, you can connect Adeu directly. This lets you handle contracts in Claude and say: "Change the Governing Law to Delaware and generate me the redline."

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "adeu": {
      "command": "uvx",
      "args": ["adeu", "adeu-server"]
    }
  }
}

(Requires uv installed on your machine)

2. For "Vibe Coding" & Python Scripts

Building your own Agentic AI tool in Cursor, Replit, or Windsurf: Adeu is the engine that handles the document manipulation for you.

from adeu import RedlineEngine, DocumentEdit
from io import BytesIO

# 1. Load your contract
with open("NDA.docx", "rb") as f:
    doc_stream = BytesIO(f.read())

# 2. Define the change (Usually this comes from your LLM response)
edit = DocumentEdit(
    target_text="State of New York",
    new_text="State of Delaware",
    comment="Changed governing law to neutral jurisdiction."
)

# 3. Apply the Redline
engine = RedlineEngine(doc_stream, author="AI Associate")
engine.apply_edits([edit])

# 4. Save
with open("NDA_Redlined.docx", "wb") as f:
    f.write(engine.save_to_stream().getvalue())

3. The CLI

Quickly extract text or apply patches from your terminal.

# Compare two docs and see a summary
adeu diff v1.docx v2.docx

# Apply a JSON list of edits to a doc
adeu apply agreement.docx edits.json

⚖️ Why Adeu?

  • Native Redlines: Generates real Microsoft Word Track Changes. You can "Accept" or "Reject" them in Word.
  • Format Safe: Adeu preserves your complex numbering, headers, footers, and images. It only touches the text you change.
  • Native Comments: Supports adding comments (Review Pane) linked to specific text ranges.
  • Intelligent Mapping: Handles the messy internal XML of Word documents (e.g., when "Contract" is split into ["Con", "tract"] by spellcheck).

🛡️ License

MIT License. Open source and free to use in commercial legal tech applications.

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

adeu-0.2.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

adeu-0.2.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file adeu-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for adeu-0.2.0.tar.gz
Algorithm Hash digest
SHA256 641ef229ddefaa65b57794e6b9963e76c30951c774a9066698133e82441e139c
MD5 72ac1ef37b2e067eb5b3ea238da1cc26
BLAKE2b-256 e70d5025b6c4bbdeba9202aa1b38a53621e185228758105e1d767e5b2547ded9

See more details on using hashes here.

Provenance

The following attestation bundles were made for adeu-0.2.0.tar.gz:

Publisher: release.yml on dealfluence/adeu

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

File details

Details for the file adeu-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for adeu-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c298041438dac4feed420fc7e75229adfd74e051ca63f624b14ca15e9a10be44
MD5 d59cdf665a8098312066a2ef9762afe5
BLAKE2b-256 ec604f6155b2b170f036e2410e9180ceb51c92ad754317c95f28bfc3463d7568

See more details on using hashes here.

Provenance

The following attestation bundles were made for adeu-0.2.0-py3-none-any.whl:

Publisher: release.yml on dealfluence/adeu

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