{"id":50668757,"url":"https://github.com/r14dd/patent","last_synced_at":"2026-06-25T06:00:32.521Z","repository":{"id":361989401,"uuid":"1254275643","full_name":"r14dd/patent","owner":"r14dd","description":"A prior-art search for your code ideas. Stop building what already exists.","archived":false,"fork":false,"pushed_at":"2026-06-20T12:09:25.000Z","size":3832,"stargazers_count":410,"open_issues_count":25,"forks_count":14,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T12:26:45.809Z","etag":null,"topics":["cli","developer-tools","ollama","rust","search","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r14dd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T11:12:04.000Z","updated_at":"2026-06-20T12:09:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/r14dd/patent","commit_stats":null,"previous_names":["r14dd/patent"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/r14dd/patent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r14dd%2Fpatent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r14dd%2Fpatent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r14dd%2Fpatent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r14dd%2Fpatent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r14dd","download_url":"https://codeload.github.com/r14dd/patent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r14dd%2Fpatent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34761847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","developer-tools","ollama","rust","search","tui"],"created_at":"2026-06-08T09:00:20.026Z","updated_at":"2026-06-25T06:00:32.487Z","avatar_url":"https://github.com/r14dd.png","language":"Rust","funding_links":[],"categories":["💻 Apps"],"sub_categories":["⌨️ Development Tools"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/r14dd/patent/main/.github/logo-light.svg\" width=\"600\" alt=\"patent\"\u003e\n\u003c/p\u003e\n\n# patent\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/r14dd/patent/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/r14dd/patent/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/patent\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/patent.svg?logo=rust\" alt=\"crates.io\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://docs.rs/patent\"\u003e\u003cimg src=\"https://docs.rs/patent/badge.svg\" alt=\"docs.rs\"\u003e\u003c/a\u003e\n  \u003ca href=\"#license\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg\" alt=\"license\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.rust-lang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/MSRV-1.80%2B-lightgray.svg?logo=rust\" alt=\"MSRV\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://ratatui.rs/\"\u003e\u003cimg src=\"https://ratatui.rs/built-with-ratatui/badge.svg\" alt=\"Built With Ratatui\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`patent` takes a plain-English dev-tool idea and searches 12 open-source registries — crates.io, npm, PyPI, GitHub, Homebrew, and more. Results are ranked by semantic similarity and summarised as **Open**, **Crowded**, or **Saturated**.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/r14dd/patent/main/showcase.gif\" alt=\"patent demo\" width=\"720\"\u003e\n\u003c/p\u003e\n\n\u003e Like a patent search, but for code. It finds prior art, yet, never certifies absence.\n\n## Install\n\n```bash\ncargo install patent\n```\n\nPre-built binaries are on the [releases page](https://github.com/r14dd/patent/releases).\n\n**Ollama** (optional) powers the LLM verdict — install from [ollama.com](https://ollama.com), then `ollama pull qwen2.5`. Use `--fast` to skip it entirely.\n\n**GitHub token** (optional) — set `GITHUB_TOKEN` to raise the search rate limit from 10 to 30 requests/minute.\n\n**Linux build deps** — needed before `cargo install`:\n- Fedora / RHEL: `sudo dnf install openssl-devel gcc-c++`\n- Ubuntu / Debian: `sudo apt install libssl-dev g++`\n\n## Usage\n\n```bash\npatent \"interactive cli to kill whatever's on a port\"\n```\n\n```bash\n# interactive mode — launches a search prompt inside the TUI\npatent\n\n# no model warmup, no wait\npatent \"kubernetes log viewer\" --fast\n\n# pipe to jq\npatent \"react component for infinite scroll\" --json | jq .\n\n# use a cloud LLM instead of local Ollama\npatent \"kubernetes log viewer\" --api-base https://api.openai.com/v1 --model gpt-4o-mini\n```\n\n## Options\n\n| Flag | Description | Default |\n|---|---|---|\n| `--fast` | no LLM, no wait — verdict derived from similarity scores | — |\n| `--json` | stdout JSON instead of the TUI | — |\n| `--model \u003cMODEL\u003e` | model name for the verdict; or `PATENT_MODEL` | `qwen2.5` |\n| `--api-base \u003cURL\u003e` | OpenAI-compatible base URL (must end in `/v1`); or `PATENT_API_BASE` | — |\n| `--api-key \u003cKEY\u003e` | API key for `--api-base`; or `PATENT_API_KEY` / `OPENAI_API_KEY` | — |\n| `--limit \u003cN\u003e` | max matches to keep after ranking | `50` |\n| `--completions \u003cSHELL\u003e` | print shell completions and exit | — |\n\nSettings can also be stored in `~/.config/patent/config.toml`:\n\n```toml\nmodel    = \"gpt-4o-mini\"\napi_base = \"https://api.openai.com/v1\"\napi_key  = \"sk-...\"\n```\n\nPrecedence: CLI flag \u003e environment variable \u003e config file \u003e built-in default.\n\n## TUI keybindings\n\n| Key | Action |\n|---|---|\n| `↑` / `k` | Scroll up |\n| `↓` / `j` | Scroll down |\n| `g` / `Home` | Jump to top |\n| `G` / `End` | Jump to bottom |\n| `/` | Filter matches |\n| `s` | Cycle sort (similarity / popularity / name) |\n| `m` | Show more / show less |\n| `Enter` | Show match details (description, popularity, URL) |\n| `o` | Open selected URL in browser |\n| `y` | Copy selected URL to clipboard |\n| `n` | New search (interactive mode) |\n| `?` | Help overlay |\n| `q` | Quit |\n\nMouse works too — scroll with the wheel, click to select.\n\n## Shell completions\n\n```bash\npatent --completions bash \u003e\u003e ~/.bashrc    # Bash\npatent --completions zsh  \u003e\u003e ~/.zshrc     # Zsh\npatent --completions fish \u003e ~/.config/fish/completions/patent.fish\n```\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and workflow. The [`good first issue`](https://github.com/r14dd/patent/labels/good%20first%20issue) and [`help wanted`](https://github.com/r14dd/patent/labels/help%20wanted) labels are a good starting point.\n\n## Development\n\n```bash\ncargo test\ncargo fmt --all --check\ncargo clippy --all-targets -- -D warnings\n```\n\nThe demo GIF is generated with [vhs](https://github.com/charmbracelet/vhs): `vhs demo.tape`.\n\n## License\n\nLicensed under either of [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE) at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr14dd%2Fpatent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr14dd%2Fpatent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr14dd%2Fpatent/lists"}