patent  by r14dd

Prior-art search for code ideas, stopping redundant development

Created 1 month ago
508 stars

Top 60.7% on SourcePulse

GitHubView on GitHub
Project Summary

A prior-art search for code ideas, r14dd/patent helps developers avoid redundant work by identifying existing solutions across 11 open-source registries. It provides ranked matches and an honest verdict on the development space's saturation (Open, Crowded, or Saturated), all executed locally for privacy and offline capability.

How It Works

The tool parses a plain-English idea into keywords, concurrently querying multiple registries like crates.io, npm, and GitHub. It deduplicates results and ranks them using local semantic search powered by AllMiniLM-L6-V2 embeddings and cosine similarity. A local Ollama model (or an OpenAI-compatible API) then analyzes these ranked matches to classify the development space, highlighting potential gaps. This local-first architecture prioritizes privacy and offline functionality.

Quick Start & Requirements

  • Installation: cargo install patent (requires Rust stable 1.80+).
  • Prerequisites:
    • Rust (stable 1.80+) via rustup.
    • Ollama (optional, for AI verdict): Install via system package manager (brew, curl, winget), then ollama pull qwen2.5 and ollama serve.
    • OpenAI-compatible API (alternative): Use --api-base and --api-key flags.
    • GitHub token (optional): Set GITHUB_TOKEN environment variable to increase API rate limits.
  • First Run: Downloads a ~80MB embedding model, cached locally for subsequent uses.

Highlighted Details

  • Comprehensive search across 11 registries including crates.io, npm, PyPI, GitHub, Docker Hub, and Hacker News.
  • Local relevance ranking using AllMiniLM-L6-V2 embeddings and cosine similarity.
  • Local LLM verdict (Ollama default) or external API for space saturation classification.
  • Interactive TUI with advanced filtering/sorting, or --json output for programmatic use.
  • Local-first design ensures privacy; robust error handling for network or LLM failures.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack).

Licensing & Compatibility

Licensed under either the MIT or Apache-2.0 license, offering flexibility for commercial use and integration into proprietary projects.

Limitations & Caveats

patent can confirm the existence of prior art but cannot definitively prove absence. All verdicts are scoped to the checked sources, and a "clean" result suggests further investigation is warranted rather than indicating a clear path to build. The tool transparently surfaces any sources that failed to respond.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
13
Issues (30d)
18
Star History
140 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Meng Zhang Meng Zhang(Cofounder of TabbyML), and
16 more.

bloop by BloopAI

0.0%
10k
Code search engine with natural language interface
Created 3 years ago
Updated 1 year ago
Feedback? Help us improve.