Contract Analyzer
Analyze legal documents for risks, key terms, and red flags.
Quick Start
Analyze a contract:
python3 scripts/contract.py analyze contract.pdf
python3 scripts/contract.py analyze agreement.docx
python3 scripts/contract.py analyze terms.txt
Compare two versions:
python3 scripts/contract.py diff v1.pdf v2.pdf
What It Extracts
- Parties — Who is bound by the agreement
- Term — Duration and renewal/auto-renewal clauses
- Payment terms — Amounts, schedules, penalties
- Termination — How to exit, notice periods, penalties for early exit
- Liability — Liability caps, indemnification, warranties
- IP ownership — Who owns what is created
- Non-compete — Restrictions on future work
- Confidentiality — NDA scope and duration
- Dispute resolution — Arbitration vs litigation, jurisdiction
- Assignment — Can the contract be transferred
Red Flags Detected
- Auto-renewal without clear opt-out
- Unlimited liability or uncapped indemnification
- One-sided termination (only one party can exit)
- Broad non-compete clauses
- Jurisdiction far from user's location
- Vague payment terms
- Missing limitation of liability
- Unilateral modification clauses
- Penalty clauses disproportionate to breach
Output
Reports include:
- Plain English Summary — 3-5 sentence overview
- Risk Score — Low/Medium/High/Critical
- Red Flags — List with severity and explanation
- Key Terms Table — Extracted terms in structured format
- Recommendations — What to negotiate or clarify
Supported Formats
- PDF (via pdfplumber)
- DOCX (via python-docx)
- TXT / plain text
- Images (via OCR)
Note
This is an analysis tool, not legal advice. Always consult a qualified attorney for binding legal decisions.