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 live
Paste an NDA and score it against a house policy book — real findings, no install, no signup. The review tab runs the actual CLI in a sandbox; load the example that fails the policy to see it flag every clause.
Runs the real CLI on your input in a sandbox — no setup, nothing stored. Open in a new tab ↗
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 14 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 # 14 questions, 3 minutes
nda-review-cli tutorial # interactive primer + sandboxed sample review For LLM agents
Every subcommand and flag is discoverable at runtime via --catalog json.
Don't hardcode the surface — call it at startup.
nda-review-cli --catalog json # 24 commands, including 12 nested negotiate subcommands
nda-review-cli doctor --check-llm # confirms your LLM provider is reachable
nda-review-cli tutorial # interactive primer + sandboxed sample review
The agent contract — output envelope, exit codes, failure → recovery, LLM consent rules — lives in
AGENTS.md.
Concept deep-dives (policy, stance, fatigue concession, hash-chained state, scoring profiles) live in
docs/reference/.
Per-provider LLM setup (Anthropic, OpenAI, Ollama, OpenAI-compatible) is in
docs/setup/.
Drafting
Three bundled templates, plus --template-file to bring your own. For
templates outside the NDA family (SAFE, side letter, SOW, etc.) reach for
draft-cli — same idea, generalized.
# 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
# Agents: add --json for a structured verdict on stdout (parse instead of scrape)
nda-review-cli review --file incoming.docx --playbook policy.json --json --why
# After wiring up an LLM provider, confirm reachability with a 1-token round-trip
nda-review-cli doctor --check-llm 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.
Gate the ready-to-sign file against the agreed text with
compare-cli, then wire it to
docx2pdf-cli and
sign-cli for the full pipeline,
or any other tool of your choosing. The templates themselves come from
template-vault-cli; if the inbound
document arrived as a template needing placeholder fills (e.g. a counterparty's own draft), pipe it
through draft-cli first.
The negotiation.json state file this CLI emits is consumed by
compare-cli's
--from-negotiation flag — the pre-signature gate reads the
converged text (via top-level status, per-round
agreed, or clause_status all
"agreed") and compares against the ready-to-sign artifact.
Pair with --require-signoffs to also enforce that both parties'
negotiate sign-off entries are populated before the gate passes.
Repo
github.com/DrBaher/nda-review-cli · MIT licensed · Stdlib-only Python · covered by a deterministic, CI-gated test suite.