Redline is a cited document-review workspace for commercial lease review. It extracts facts with a configurable model provider, then runs deterministic checks over the extracted terms so the verdict is based on rule assertions, arithmetic, and cited evidence rather than model judgment alone.
The first production target is the expensive template error where rent was drafted as a figure per display face when the intended deal was a total. Redline is built for local review workflows: you point it at a PDF, it cites the source text it used, and the active review profile decides whether the check holds.
Today Redline ships two deterministic lease profiles:
lease-generalis the default. It checks commercial lease financials, dates, comparison terms, general clause coverage, renewal notice windows, additional rent/CAM audit visibility, assignment/sublease consent language, and termination-right asymmetry.lease-mathis the narrow billboard/per-display-face lane. It checks rent schedule totals, per-face rent reconciliation, escalation, numeral-vs-words, term dates, and comparison terms.
Non-lease documents such as NDAs, MSAs, and vendor agreements can still be reviewed with advisory context, but Redline does not yet ship deterministic non-lease profiles.
Install everything with Homebrew:
brew install --cask chountalas/tap/redline-appThat installs Redline.app into /Applications and installs the CLI formula as a dependency, so the app, redline, and redline-mcp all use the same validator engine. Provider adapters for Codex, Ollama, OpenAI, and Anthropic are included.
CLI and MCP tools only:
brew install chountalas/tap/redlineVerify the install:
redline --version
redline --helpUpgrade later:
brew upgrade chountalas/tap/redline
brew upgrade --cask chountalas/tap/redline-appThe Python package is not published to PyPI yet. Homebrew is the supported public install path.
From source for development:
git clone https://github.com/chountalas/Redline.git
cd Redline
uv sync --extra dev --extra mcp
uv run redline check lease.pdfredline check lease.pdfThat runs the default lease-general profile. Use the narrow math lane when you only want the original billboard/per-display-face checks:
redline check lease.pdf --profile lease-mathCodex subscription is the default provider. It uses your local codex CLI login and does not require an API key:
redline check lease.pdf --provider codexOpenAI API is separate and requires an API key plus an explicit current model:
export OPENAI_API_KEY=...
redline check lease.pdf --provider openai --model <openai-model>Local Ollama runs do not require an API key:
ollama pull gpt-oss:20b
redline check lease.pdf --provider ollama --model gpt-oss:20b --base-url http://localhost:11434Anthropic is available only when explicitly selected with an API key plus an explicit current model:
export ANTHROPIC_API_KEY=...
redline check lease.pdf --provider anthropic --model <anthropic-model>Strict CI mode fails when a rule could not verify:
redline check lease.pdf --fail-on verifyJSON output:
redline check lease.pdf --jsonDraft-vs-deal validation:
redline check lease.pdf --deal deal.yamlOptional AI advisory focus, kept separate from deterministic findings:
redline check lease.pdf --context "Check that the rent matches the negotiated total economics."For longer review notes, playbooks, approval constraints, or pasted email context, prefer a context file:
redline check lease.pdf --context-file review-context.md--thread thread.txt also accepts review context. For lease profiles it distills supported numeric comparison terms for deterministic checks and keeps qualitative commitments as advisory watch items.
Redline includes a SwiftUI macOS wrapper. It uses the same Python validator engine as the CLI.
brew install --cask chountalas/tap/redline-appTo install a development build into /Applications from a source checkout:
./script/build_and_run.sh --installThe app supports choosing or dropping a PDF, choosing a review profile, choosing an optional comparison sheet, entering optional comparison context/focus text, choosing Codex/OpenAI/Ollama/Anthropic, and reviewing the resulting report from a native window. The API key field is runtime-only and is passed to the CLI process as REDLINE_API_KEY; it is not written to disk by Redline. Codex and Ollama do not need a key.
Synthetic fixture:
total_rent:
amount: "400000"
currency: CAD
num_display_faces: 2If the lease says $400,000 per Display Face and also states total rent as $400,000, Redline emits:
ERROR
- [R2_per_face_total_reconcile] Per-face rent does not reconcile to stated total
Expected: CAD 800,000.00
Actual: CAD 400,000.00
That is the core trust boundary: the selected model extracts the facts and source quotes; Redline decides whether the math holds.
R1_schedule_sums_to_total: rent schedule sums to stated total.R2_per_face_total_reconcile: per-face rent times display faces matches stated total.R3_escalation_consistency: schedule agrees with escalation clauses.R4_numeral_vs_words: numerals match spelled-out money.R5_term_date_coherence: commencement, base term, and expiry agree.R6_dealsheet_match: optionaldeal.yamlmatches extracted facts.R7_general_lease_clause_coverage: general lease clauses are visible enough to review.R8_renewal_notice_window: renewal options include an extracted notice deadline.R9_additional_rent_audit_visibility: additional rent/CAM terms have visible audit/review rights.R10_assignment_consent_standard: assignment/sublease consent is flagged when broadly discretionary.R11_termination_rights_asymmetry: termination rights are flagged when extracted text appears one-sided.
See docs/rules.md, docs/dealsheet.md, docs/providers.md, docs/mcp.md, and docs/mac-app.md.
Do not commit real documents. The repository should only contain synthetic fixtures. Redline sends extracted document text to the selected provider unless you use local Ollama. Use remote providers only where outbound API processing is acceptable.
Redline is not a law firm and does not provide legal advice. It is a validation tool for lease math, review context, dates, extracted facts, and cited evidence.
See PRIVACY.md and SECURITY.md.
Before public push:
uv run python scripts/check_release_safety.pyOpen-source alpha. Homebrew is the supported public install path. The Python package is not published to PyPI yet.
