{"id":50553425,"url":"https://github.com/chountalas/redline","last_synced_at":"2026-06-07T00:01:45.025Z","repository":{"id":362401297,"uuid":"1258811696","full_name":"chountalas/Redline","owner":"chountalas","description":"Trustworthy commercial lease validation: LLM extraction, deterministic math checks.","archived":false,"fork":false,"pushed_at":"2026-06-04T03:55:20.000Z","size":1484,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T05:05:49.214Z","etag":null,"topics":["commercial-real-estate","lease","macos","mcp","python","swift","validation"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chountalas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-04T00:13:08.000Z","updated_at":"2026-06-04T03:53:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chountalas/Redline","commit_stats":null,"previous_names":["chountalas/redline"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chountalas/Redline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chountalas%2FRedline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chountalas%2FRedline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chountalas%2FRedline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chountalas%2FRedline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chountalas","download_url":"https://codeload.github.com/chountalas/Redline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chountalas%2FRedline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34003814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commercial-real-estate","lease","macos","mcp","python","swift","validation"],"created_at":"2026-06-04T05:01:00.322Z","updated_at":"2026-06-07T00:01:45.017Z","avatar_url":"https://github.com/chountalas.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/redline-icon.png\" width=\"88\" alt=\"Redline app icon\"\u003e\n\u003c/p\u003e\n\n# Redline\n\nRedline validates commercial lease math. It extracts lease facts with a configurable model provider, then runs deterministic checks over the extracted numbers so the verdict is based on arithmetic and rule assertions, not model judgment.\n\nThe first 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 lease PDF, it cites the source text it used, and the deterministic rules decide whether the math holds.\n\n## Install\n\nInstall everything with Homebrew:\n\n```bash\nbrew install --cask chountalas/tap/redline-app\n```\n\nThat 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.\n\nCLI and MCP tools only:\n\n```bash\nbrew install chountalas/tap/redline\n```\n\nVerify the install:\n\n```bash\nredline --version\nredline --help\n```\n\nUpgrade later:\n\n```bash\nbrew upgrade chountalas/tap/redline\nbrew upgrade --cask chountalas/tap/redline-app\n```\n\nThe Python package is not published to PyPI yet. Homebrew is the supported public install path.\n\nFrom source for development:\n\n```bash\ngit clone https://github.com/chountalas/Redline.git\ncd Redline\nuv sync --extra dev --extra mcp\nuv run redline check lease.pdf\n```\n\n## Quickstart\n\n```bash\nredline check lease.pdf\n```\n\nCodex subscription is the default provider. It uses your local `codex` CLI login and does not require an API key:\n\n```bash\nredline check lease.pdf --provider codex\n```\n\nOpenAI API is separate and requires an API key plus an explicit current model:\n\n```bash\nexport OPENAI_API_KEY=...\nredline check lease.pdf --provider openai --model \u003copenai-model\u003e\n```\n\nLocal Ollama runs do not require an API key:\n\n```bash\nollama pull gpt-oss:20b\nredline check lease.pdf --provider ollama --model gpt-oss:20b --base-url http://localhost:11434\n```\n\nAnthropic is available only when explicitly selected with an API key plus an explicit current model:\n\n```bash\nexport ANTHROPIC_API_KEY=...\nredline check lease.pdf --provider anthropic --model \u003canthropic-model\u003e\n```\n\nStrict CI mode fails when a rule could not verify:\n\n```bash\nredline check lease.pdf --fail-on verify\n```\n\nJSON output:\n\n```bash\nredline check lease.pdf --json\n```\n\nDraft-vs-deal validation:\n\n```bash\nredline check lease.pdf --deal deal.yaml\n```\n\nOptional AI advisory focus, kept separate from deterministic findings:\n\n```bash\nredline check lease.pdf --context \"Check that the rent matches the negotiated total economics.\"\n```\n\n## Mac App\n\nRedline includes a SwiftUI macOS wrapper. It uses the same Python validator engine as the CLI.\n\n```bash\nbrew install --cask chountalas/tap/redline-app\n```\n\nTo install a development build into `/Applications` from a source checkout:\n\n```bash\n./script/build_and_run.sh --install\n```\n\nThe app supports choosing or dropping a lease PDF, choosing an optional `deal.yaml`, entering optional deal 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.\n\n## Screenshots\n\n![Redline empty state](docs/assets/redline-empty-state.png)\n\n## Per-Face Total Demo\n\nSynthetic fixture:\n\n```yaml\ntotal_rent:\n  amount: \"400000\"\n  currency: CAD\nnum_display_faces: 2\n```\n\nIf the lease says `$400,000 per Display Face` and also states total rent as `$400,000`, Redline emits:\n\n```text\nERROR\n- [R2_per_face_total_reconcile] Per-face rent does not reconcile to stated total\n  Expected: CAD 800,000.00\n  Actual: CAD 400,000.00\n```\n\nThat is the core trust boundary: the selected model extracts the facts and source quotes; Redline decides whether the math holds.\n\n## What Redline Checks\n\n- `R1_schedule_sums_to_total`: rent schedule sums to stated total.\n- `R2_per_face_total_reconcile`: per-face rent times display faces matches stated total.\n- `R3_escalation_consistency`: schedule agrees with escalation clauses.\n- `R4_numeral_vs_words`: numerals match spelled-out money.\n- `R5_term_date_coherence`: commencement, base term, and expiry agree.\n- `R6_dealsheet_match`: optional `deal.yaml` matches extracted facts.\n\nSee [docs/rules.md](docs/rules.md), [docs/dealsheet.md](docs/dealsheet.md), [docs/providers.md](docs/providers.md), [docs/mcp.md](docs/mcp.md), and [docs/mac-app.md](docs/mac-app.md).\n\n## Privacy and Security\n\nDo not commit real leases. The repository should only contain synthetic fixtures. Redline sends extracted lease text to the selected provider unless you use local Ollama. Use remote providers only where outbound API processing is acceptable.\n\nRedline is not a law firm and does not provide legal advice. It is a validation tool for lease math, dates, extracted facts, and cited evidence.\n\nSee [PRIVACY.md](PRIVACY.md) and [SECURITY.md](SECURITY.md).\n\nBefore public push:\n\n```bash\nuv run python scripts/check_release_safety.py\n```\n\n## Status\n\nOpen-source alpha. Homebrew is the supported public install path. The Python package is not published to PyPI yet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchountalas%2Fredline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchountalas%2Fredline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchountalas%2Fredline/lists"}