1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! `patent` — a prior-art search for your code ideas.
//!
//! Takes a plain-English dev-tool idea and searches the open-source ecosystem —
//! crates.io, npm, PyPI, GitHub, Go, Maven, NuGet, RubyGems, Docker Hub, the VS
//! Code Marketplace, and Hacker News — for prior art, then gives an honest,
//! scoped verdict on whether it's already been built. The exact set searched is
//! chosen per query; whichever sources actually responded are always surfaced.
//!
//! **Integrity principle:** this tool can prove something *exists*, but never
//! that it *doesn't* — it only searched some sources. All output is scoped to
//! "what was found in the sources checked."
//!
//! # Install
//!
//! ```bash
//! cargo install patent
//! ```
//!
//! # Usage
//!
//! ```bash
//! patent "interactive cli to kill whatever's on a port" # interactive TUI
//! patent "react component for infinite scroll" --json # structured output
//! patent "kubernetes log viewer" --fast # skip the LLM verdict
//! patent "vector database" --api-base https://api.openai.com/v1 --model gpt-4o-mini
//! ```
//!
//! # Using the library
//!
//! `patent` is primarily the engine behind the CLI of the same name, but the
//! core is reusable: [`sources::search_all`] fans out to the registries,
//! [`rank`] orders matches by semantic similarity, and [`verdict::assess`]
//! turns them into an integrity-scoped [`Verdict`] via any [`Llm`] backend
//! (local Ollama or an OpenAI-compatible API).
pub use Llm;
pub use ;
/// Library-level error type. The binary maps these to `anyhow` with context.
/// Crate result alias.
pub type Result<T> = Result;