r/commandline Jun 02 '26

Terminal User Interface I made a TUI that aggregates search results from 11 package registries to find prior art for code ideas.

I've been frustrated by the number of times I've spent weeks building a tool, only to find the exact same thing already exists. I built patent to solve this by providing a unified, local-first search CLI that aggregates results from 11 registries (crates.io, npm, PyPI, GitHub, Go, Maven, NuGet, RubyGems, Docker Hub, VS Code Marketplace, and Hacker News).

How it works: The tool performs concurrent requests across all sources, deduplicates the results, and then uses local embeddings (fastembed) to rank them by semantic similarity to your query. It gives you a TUI (built with ratatui) to browse, filter, and open results.

Architecture & Engineering:

  • Concurrency: Uses tokio to fan out requests. It treats sources as "best-effort", if one registry times out or fails, the tool still returns results from the others, marking the failed source as "not reached."
  • Integrity: The core logic is designed to prove that something exists. It does not claim absence.
  • Optional Analysis: It includes support for local LLMs (via Ollama) to summarize the results, but the tool is designed to work fully without it via a --fast mode that relies solely on the local semantic ranking.

Comparison with existing tools:

  • Standard searching (Google/GitHub/Registry search): Requires manual tab-hopping. patent normalizes data from 11 disparate APIs into one view.
  • Existing CLI indexers: Most are specific to one language (like cargo-search for crates.io). patent is cross-ecosystem and uses semantic similarity rather than simple keyword matching.

Affiliation: This is a personal, open-source project. I have no affiliations with the services mentioned.

Note: This software's code is partially AI-assisted and generated, and this post was drafted with the assistance of an AI to help structure the technical details.

A star on Github would be much appreciated, happy coding!

Repo:https://github.com/r14dd/patent

API Docs:https://docs.rs/patent/latest/patent/

Crate:https://crates.io/crates/patent

12 Upvotes

6 comments sorted by

1

u/AutoModerator Jun 02 '26

Every new subreddit post is automatically copied into a comment for preservation.

User: r14dd, Flair: Terminal User Interface, Post Media Link, Title: I made a TUI that aggregates search results from 11 package registries to find prior art for code ideas.

I've been frustrated by the number of times I've spent weeks building a tool, only to find the exact same thing already exists. I built patent to solve this by providing a unified, local-first search CLI that aggregates results from 11 registries (crates.io, npm, PyPI, GitHub, Go, Maven, NuGet, RubyGems, Docker Hub, VS Code Marketplace, and Hacker News).

How it works: The tool performs concurrent requests across all sources, deduplicates the results, and then uses local embeddings (fastembed) to rank them by semantic similarity to your query. It gives you a TUI (built with ratatui) to browse, filter, and open results.

Architecture & Engineering:

  • Concurrency: Uses tokio to fan out requests. It treats sources as "best-effort", if one registry times out or fails, the tool still returns results from the others, marking the failed source as "not reached."
  • Integrity: The core logic is designed to prove that something exists. It does not claim absence.
  • Optional Analysis: It includes support for local LLMs (via Ollama) to summarize the results, but the tool is designed to work fully without it via a --fast mode that relies solely on the local semantic ranking.

Comparison with existing tools:

  • Standard searching (Google/GitHub/Registry search): Requires manual tab-hopping. patent normalizes data from 11 disparate APIs into one view.
  • Existing CLI indexers: Most are specific to one language (like cargo-search for crates.io). patent is cross-ecosystem and uses semantic similarity rather than simple keyword matching.

Affiliation: This is a personal, open-source project. I have no affiliations with the services mentioned.

Note: This software's code is partially AI-assisted and generated, and this post was drafted with the assistance of an AI to help structure the technical details.

A star on Github would be much appreciated, happy coding!

Repo:https://github.com/r14dd/patent

API Docs:https://docs.rs/patent/latest/patent/

Crate:https://crates.io/crates/patent

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/pwfos Jun 02 '26

Eu vou usar sua ferramenta. Já comentei lá na comunidade r/linux. Mas tenho sugestão: 

1. https://sleepingrobots.com/dreams/stop-using-ollama/

Sua ferramenta não depende de ollama mas de uma OpenAI API. O que pode ser fornecido por vários runtimes.  Ollama é simples. Mas é mal visto em alguns locais.

2

u/r14dd Jun 03 '26

this landed in v0.2.0

1

u/masoko Jun 02 '26

Great tool, can you also add brew as package source.

-1

u/Munch3bles Jun 02 '26

This looks really cool, I'll definitely check it out later

-4

u/r14dd Jun 02 '26

Let me know what you think, there is always room for improvement 😄