odp-oa-cli
USPTO ODP(Open Data Portal) API를 통해 미국 특허 심사과정 문서를 다운로드하고, XML 파싱을 거쳐 구조화된 Markdown으로 변환하는 CLI 도구.
생성된 MD 파일을 Claude Code, Gemini CLI 등 AI 에이전트에게 전달하여 심사 전략 분석을 수행하는 워크플로우를 지원한다.
요구사항
설치
# 로컬 개발
uv sync
# PyPI에서 설치
pip install odp-oa-cli
API 키 설정
# 대화형 설정 (권장) — ~/.oa-cli.toml 에 저장
uspto-oa configure
# 현재 설정 확인
uspto-oa configure --show
또는 환경변수로 지정:
export USPTO_API_KEY=your_api_key_here
사용법
# 1. 문서 다운로드 (file/{app_num}/ 에 저장)
uspto-oa download 16330077
# 2. XML 파싱 → prosecution.md 생성
uspto-oa extract 16330077
# 결과: file/16330077/16330077_prosecution.md
# 특허번호 입력 (출원번호 자동 변환)
uspto-oa download US12228644B2
# 특정 문서 코드만 다운로드
uspto-oa download 16330077 --doc-codes CTNF,CTFR,NOA
# 강제 재다운로드 (기존 파일 덮어쓰기)
uspto-oa download 16330077 --force
# 상세 로그
uspto-oa -v download 16330077
# 일회성 API 키 지정
uspto-oa download 16330077 --api-key YOUR_KEY
커맨드 옵션
uspto-oa download <application>
| 옵션 | 설명 |
|---|---|
--doc-codes CODES |
쉼표 구분 문서 코드 (예: CTNF,CTFR,NOA). 생략 시 전체 수집 대상 |
--output-dir DIR |
저장 경로 (기본: file/{app_num}/) |
--force |
기존 파일도 재다운로드 |
--api-key TEXT |
API 키 (설정 파일·환경변수보다 우선) |
uspto-oa extract <application>
| 옵션 | 설명 |
|---|---|
--output-dir DIR |
파일 디렉토리 (기본: file/{app_num}/) |
워크플로우
uspto-oa download {app_num}
└─ file/{app_num}/ 에 XML / PDF 저장
uspto-oa extract {app_num}
└─ file/{app_num}/{app_num}_prosecution.md 생성
└─ AI 에이전트 (Claude Code / Gemini CLI)
└─ 심사 전략 분석, 요약, 질의응답
수집 대상 문서 코드
| 코드 | 의미 |
|---|---|
CTNF |
Non-Final Office Action |
CTFR |
Final Office Action |
NOA / NACT |
Notice of Allowance |
REM |
Remarks (의견서) |
ABN |
Abandonment |
SRNT / SRFW |
Search Report |
EXIN |
Examiner Interview |
RCE / RCEX |
Request for Continued Examination |
CTAV |
Advisory Action |
892 / 1449 / IDS |
Prior Art / IDS |
A* |
Amendment 계열 전체 |
생성 파일 구조
file/{app_num}/{app_num}_prosecution.md:
| 섹션 | 내용 |
|---|---|
| 타임라인 | 전체 문서 날짜순 표 (XML/PDF 형식 표시) |
| Office Action 상세 | CTNF/CTFR 거절 항목 전문 |
| Notice of Allowance 상세 | 허여 청구항 + Examiner's Statement |
| PDF 전용 문서 | Amendment 등 이미지 PDF 목록 (AI 에이전트 직접 전달용) |
PyPI 배포
uv build
uv run twine upload dist/*
Metadata
Release files for odp-oa-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odp_oa_cli-0.1.0.tar.gz | 38.8 kB | Without provenance | Details for odp_oa_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odp_oa_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for odp_oa_cli-0.1.0-py3-none-any.whl |
Total release size: 55.1 kB
Release files / odp_oa_cli-0.1.0.tar.gz
| Download URL | odp_oa_cli-0.1.0.tar.gz |
|---|---|
| Size | 38.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aad78bb5994ca2d5ffcc0e4eff75853a65e94c87cb19941598b08624060ad96
|
|
BLAKE2b-256 checksum How to use checksums |
f0d166fbd811124b1d7047ef13307cd5f2d5b16f12bdd4703ce3d4c0e5963351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / odp_oa_cli-0.1.0-py3-none-any.whl
| Download URL | odp_oa_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb5379fa34fbf867ed22f9b60cf5dc232208651e812613fc56e20831d9dbfd80
|
|
BLAKE2b-256 checksum How to use checksums |
beafca43ae6d3cb0e30b71f0df33fe2110b06d6ad4f8fecd5b4b2d86cc96b115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for odp-oa-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.