Tool · Python
nda-review-cli
Draft, review, and negotiate NDAs against your own house playbook. Deterministic by default; opt-in second-pass LLM adjudication via the model of your choice. Stdlib-only Python — single file, no SDKs, no telemetry.
pipx install nda-review-cli, then nda-review-cli quickstart
to set your house policy, then draft / review /
negotiate for the full workflow.
Try it without installing
The full draft / review / simulator demo runs in a sandbox below — no install, no signup. Reset every 30 minutes.
What it does
- Drafts NDAs from bundled templates (mutual, one-way disclosing, Common Paper Mutual NDA Version 1.0). Outputs markdown plus a clean Word
.docx. - Reviews NDAs clause-by-clause against your policy with severity-scored findings, explainability evidence, and a deterministic risk score.
- Negotiates between two parties via a turn-taking, file-based protocol with hash-chained rounds, stance-driven amendments, fatigue concession to break stalemates, and a mandatory key-points sign-off before finalization.
- Learns counterparty profiles deterministically so repeat parties get a consistent stance.
- Optional LLM augmentation via Anthropic, OpenAI, Ollama, or any OpenAI-compatible endpoint — disabled by default, opt-in per-call with explicit consent.
Quickstart
The quickstart subcommand walks you through 16 questions to write your
house policy. Each answer wires into the rule engine: clause keywords, preferred language,
red-flag patterns, negotiation stance, clause priorities, non-negotiable redlines.
pipx install nda-review-cli
nda-review-cli quickstart # 16 questions, 3 minutes
nda-review-cli tutorial # interactive primer + sandboxed sample review Drafting
Three bundled templates, plus --template-file to bring your own.
# Common Paper Mutual NDA — bundled, CC BY 4.0, attribution preserved
nda-review-cli draft --template common-paper-mutual \
--party-a "Acme Inc." --party-a-address "123 Main St" \
--party-b "Beta LLC" --party-b-address "10 Market Way" \
--purpose "evaluating a partnership" \
--governing-law "California" \
--out output/nda.md \
--out-docx output/nda.docx \
--review-after Reviewing
Score any NDA against your policy. --why adds explainability evidence
(matched clause keywords, paragraph index, confidence). --llm anthropic
(or any other supported provider) layers in a second-pass adjudication that votes on findings,
adds ones the rules missed, and proposes replacement clause language for high-severity items.
nda-review-cli review --file path/to/incoming.docx --why \
--counterparty "Vendor Co" --learn-profile \
--out-md output/review.md Two-party negotiation
File-based protocol — single JSON document bounces between you and the counterparty by any channel (email, Drive, Git). Each round is signed by exactly one party and hash-chained so tampering is detected on load. See the workflow page for the full sequence.
Three counter modes: hand-written amendments (--amendments-file),
deterministic stance-driven (--auto), or LLM-driven
(--agent --llm). All accept --dry-run to
preview without signing the round.
Stance, priorities, and the game-theoretic story
Each party picks a stance (conservative, middleground,
or compromising) and ranks clauses 1..N by importance. Stance defines
how many clauses you insist on; priorities define which ones. Clauses in your
bottom-K concession zone get accepted regardless of stance. Logrolling resolves cross-party
disputes when priorities differ — and they essentially always differ.
For the rare pathological case of identical priorities + symmetric stances,
fatigue concession kicks in: after a clause has bounced past
max_clause_bounces (default 4), the next proposer is force-conceded
deterministically. The stalemate detector still trips for hard non-negotiable conflicts and
surfaces them for human escalation rather than auto-resolving.
Finalize: hand off to your own PDF + signing tools
negotiate finalize emits the agreed .md +
.docx. Optionally pass --to-pdf --sign and
the CLI shells out to user-configured commands in config/integrations.json.
Wire it to docx2pdf-cli and
sign-cli for the full pipeline,
or any other tool of your choosing.
Repo
github.com/DrBaher/nda-review-cli · MIT licensed · Stdlib-only Python · 73 tests passing in CI.