Terminal-native patent research CLI/TUI tool
Project description
RECON — Terminal-Native Patent Research Tool
RECON is a keyboard-first, terminal-native patent research tool. It aggregates patent data from multiple sources (USPTO, PatSnap, Google Patents, WIPO, Lens.org, EPO), presents results in a clean TUI or CLI, and provides scoring, citation graphs, export, and optional local-AI translation.
Features
- Multi-source search — USPTO API, PatSnap API, Google Patents scraping, WIPO/Lens/EPO via DuckDuckGo + BeautifulSoup
- Source filtering — Include/exclude sources via CLI
--sourceor TUISoverlay - Signal scoring — Equal-weight 20-point signals (government grants, corporate investment, academic research, temporal recency, news/media)
- Live preview — Three-tab detail pane (Info / Claims / Image) with keyboard navigation
- Citation graph — ASCII tree view of forward/backward citations (scraped from Google Patents or mock data)
- Export — JSON, CSV, BibTeX, Markdown, PDF
- Translation — Optional local translation via Ollama (opt-in, Zero-AI default)
- Terminal-native — No GUI, no Electron, no modal dialogs
Installation
Via PyPI (recommended)
pipx install recon-patent
Via GitHub
pipx install git+https://github.com/anubhavaanand/recon.git
Ensure ~/.local/bin is in your PATH.
Via install script (hacker method)
curl -sSL https://raw.githubusercontent.com/anubhavaanand/recon/main/install.sh | bash
Via pip
pip install recon-patent
From source
git clone https://github.com/anubhavaanand/recon.git
cd recon
pip install -e .
Development
pip install -e ".[test,dev]"
Quick Start
Launch the interactive TUI
recon
Type a query (e.g. solid state battery) and press Enter. Navigate results with j/k, open detail with Enter, switch tabs with h/l.
CLI search
recon search "sulfide electrolyte"
Filter by source:
recon search "quantum battery" --source uspto,patsnap,google
End-to-end run with export
recon run "lithium anode" --export json
View saved collection
recon collection list
recon collection clear
Manage API keys
recon config show
recon config set --patsnap-key YOUR_KEY
recon config test
Export collection
recon export --format csv
Formats: json, csv, bibtex, markdown, pdf.
TUI Key Bindings
| Key | Action |
|---|---|
↑/↓ j/k |
Navigate results |
Enter |
Open detail view |
h/l or ←/→ |
Switch preview tab |
/ |
Focus search input |
s |
Save patent to collection |
e |
Export collection overlay |
S |
Source filter overlay |
c |
Toggle citation graph |
t |
Toggle translation |
r |
Reader mode |
m |
Synthesis mode |
? |
Help overlay |
q / Esc |
Back / Quit |
Architecture
recon/
├── cli/main.py — Typer CLI (search, run, config, export, collection)
├── core/
│ ├── models.py — PatentRecord, CrossReference dataclasses
│ ├── search.py — Multi-source search orchestration + source filtering
│ ├── scoring.py — Signal scoring (equal-weight algorithm)
│ ├── arbitrage.py — Arbitrage status calculation
│ ├── citations.py — Citation graph fetching (Google Patents scrape + mock)
│ ├── translation.py — Local Ollama translation with cache
│ └── config.py — Config management (.env + JSON)
├── clients/
│ ├── patent_apis.py — USPTO, PatSnap, Google, WIPO, Lens, EPO clients
│ ├── scrapers.py — DDGS + BeautifulSoup scrapers (WIPO, Lens, EPO, Google)
│ └── base.py — BaseAsyncClient with rate-limit + backoff
├── tui/
│ ├── app.py — Textual App + CSS
│ ├── screens.py — SearchScreen, DetailScreen, ReaderModeScreen, etc.
│ └── widgets/ — ResultList, InfoTab, ClaimsTab, ImageTab, CitationTree
├── storage/
│ └── cache.py — SQLite cache (search results, collection, translations)
└── tests/ — 200+ tests (pytest)
Configuration
Keys are stored in ~/.config/recon/config.json (chmod 600):
| Variable | Source | Required |
|---|---|---|
PATSNAP_API_KEY |
PatSnap | No (scraper fallback exists for most features) |
USPTO_API_KEY |
USPTO | No |
EPO_CONSUMER_KEY / EPO_CONSUMER_SECRET |
EPO | No (scraper-only) |
LENS_API_KEY |
Lens.org | No (scraper-only) |
Set via recon config set (interactive) or .env file.
Translation (Ollama)
RECON can optionally translate non-English patent abstracts using a local Ollama instance:
# Install Ollama: https://ollama.ai
ollama pull llama3
# RECON auto-detects non-English text and uses Ollama
# Press t in the TUI to toggle translation
When Ollama is not running, RECON gracefully displays the original text.
Testing
pip install -e ".[test]"
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file recon_patent-0.2.0.tar.gz.
File metadata
- Download URL: recon_patent-0.2.0.tar.gz
- Upload date:
- Size: 80.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffcf199252432bedbe93d5a4e8f7aa5e448819180fd660b19ef2339416268d00
|
|
| MD5 |
bf6ad18dd20b6b0cb83cb923ff20111f
|
|
| BLAKE2b-256 |
8ef199a833d5084343d59eb5866fb5af8e5f281a131a6cf144fccb884be032ef
|
Provenance
The following attestation bundles were made for recon_patent-0.2.0.tar.gz:
Publisher:
publish.yml on anubhavaanand/recon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
recon_patent-0.2.0.tar.gz -
Subject digest:
ffcf199252432bedbe93d5a4e8f7aa5e448819180fd660b19ef2339416268d00 - Sigstore transparency entry: 1915266026
- Sigstore integration time:
-
Permalink:
anubhavaanand/recon@35c7c2005e787b99416517fc4522d03eb03c23a1 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/anubhavaanand
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35c7c2005e787b99416517fc4522d03eb03c23a1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file recon_patent-0.2.0-py3-none-any.whl.
File metadata
- Download URL: recon_patent-0.2.0-py3-none-any.whl
- Upload date:
- Size: 48.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84f3294ab8c93d5adc020beb7209b5929b51dda82b3f6c2a23e98ba47cff1649
|
|
| MD5 |
6a5e68cfdb17c3435ccfe4174bc72deb
|
|
| BLAKE2b-256 |
69ae2af4a168bc27e1da4aa1b9656f04e7b6c6f8cc5fe8c60cf6cdbb1e771c90
|
Provenance
The following attestation bundles were made for recon_patent-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on anubhavaanand/recon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
recon_patent-0.2.0-py3-none-any.whl -
Subject digest:
84f3294ab8c93d5adc020beb7209b5929b51dda82b3f6c2a23e98ba47cff1649 - Sigstore transparency entry: 1915266114
- Sigstore integration time:
-
Permalink:
anubhavaanand/recon@35c7c2005e787b99416517fc4522d03eb03c23a1 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/anubhavaanand
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35c7c2005e787b99416517fc4522d03eb03c23a1 -
Trigger Event:
release
-
Statement type: