How smcronin/uspto-cli works
This is a dual-domain USPTO CLI: users search patent or trademark records, then retrieve, analyze, export, or bundle results. Patent commands use the Open Data Portal (ODP); trademark discovery uses Trademark Search, while official case records and documents use TSDR. The graph preserves the README’s major documented command surfaces and separates the three service clients. Source excerpts are partial, so edges from command areas to clients rely on the SOURCE INDEX or README rather than a complete call trace.
Main entry points: api/client.go ODP API client · tsdr/client.go TSDR client · root.go Command dispatcher · search.go Patent search
Components 26
CLI entry and output
- Command dispatcher
cmd/root.go - Structured output
cmd/output.go
Patent workflows
- Patent search
cmd/search.go - Application records
cmd/app.go - Patent text extraction
cmd/app_text.go - Application summary
cmd/summary.go - Patent family
cmd/family.go - Grant analysis
cmd/grant.go - PTAB proceedings
cmd/ptab.go - Bulk workflows
cmd/bulk.go - Petitions
cmd/petition.go - Prosecution timeline
cmd/prosecution_timeline.go
Trademark workflows
- Mark discovery
cmd/trademark_search.go - Official case data
cmd/trademark_case.go - Case documents
cmd/trademark_docs.go - Trademark operations
cmd/trademark_ops.go - Decisions and proceedings
cmd/trademark_decisions.go
API clients and data
- ODP API client
internal/api/client.go - Trademark Search client
internal/tmsearch/client.go - TSDR client
internal/tsdr/client.go - Domain data types
internal/types/types.go - Document text extraction
internal/doctext/extract.go
Other components
- CLI user
- USPTO Open Data Portal
- Trademark Search service
- USPTO TSDR
Connections 25
- CLI user → Command dispatcher: runs commands
- Command dispatcher → Patent search: routes commands
- Command dispatcher → Mark discovery: routes commands
- Patent search → ODP API client: searches via
cmd/search.go - Application records → ODP API client: retrieves records
cmd/app.go - Patent text extraction → ODP API client: fetches patent XML
cmd/app_text.go - Patent text extraction → Document text extraction: extracts text
cmd/app_text.go - Application summary → ODP API client: combines API data
cmd/summary.go - Patent family → ODP API client: retrieves family data
cmd/family.go - Grant analysis → ODP API client: fetches grant data
cmd/grant.go - PTAB proceedings → ODP API client: retrieves proceedings
cmd/ptab.go - Bulk workflows → ODP API client: retrieves bulk data
cmd/bulk.go - Petitions → ODP API client: retrieves petition data
cmd/petition.go - Prosecution timeline → ODP API client: retrieves events
cmd/prosecution_timeline.go - Mark discovery → Trademark Search client: searches via
cmd/trademark_search.go - Official case data → TSDR client: retrieves case data
cmd/trademark_case.go - Case documents → TSDR client: retrieves documents
cmd/trademark_docs.go - Trademark operations → TSDR client: retrieves artifacts
cmd/trademark_ops.go - Decisions and proceedings → ODP API client: searches decisions
cmd/trademark_decisions.go - ODP API client → USPTO Open Data Portal: requests ODP data
README.md - Trademark Search client → Trademark Search service: queries candidates
README.md - TSDR client → USPTO TSDR: requests official records
README.md - Patent search → Domain data types: uses data models
cmd/search.go - Application records → Domain data types: uses data models
cmd/app.go - Application summary → Domain data types: assembles summary
cmd/summary.go