sec-cli-downloader
v1.0.0
Published
CLI tool to download SEC filings (10-K, 10-Q) from SEC EDGAR
Readme
SEC CLI Downloader
A lightweight CLI tool to download SEC filings directly from the SEC website.
一個輕量級命令行工具,用於從美國 SEC 官網下載公司財報與申報文件。
Features
- Download filings by ticker and year
- Support
latestlookup - Local caching for ticker-to-CIK and filings metadata
- Avoid duplicate downloads
- Support custom filing forms such as
10-K,10-Q, and8-K - Support download limits for multi-filing years
- Support cache refresh and custom output directory
Project Structure
sec.js: CLI entrypoint, SEC API requests, cache handling, filtering, and file download logiccache/: cached ticker/CIK mapping and recent filings metadatadownloads/: downloaded SEC filing documents grouped by tickerpackage.json: package metadata and dependencies
Installation
git clone https://github.com/your-username/sec-cli-downloader.git
cd sec-cli-downloader
npm installUsage
node sec.js <ticker> <year|latest> [options]Examples:
node sec.js AAPL 2023
node sec.js AAPL latest
node sec.js MSFT latest --form 10-Q --limit 2
node sec.js GOOGL 2024 --output ./reports --refresh-cacheOptions:
--form <type>: filing form to download, default is10-K--limit <number>: maximum number of filings to download--output <dir>: custom download directory--refresh-cache: fetch fresh filings metadata instead of using cache
Environment variable:
SEC_USER_AGENT: custom SEC-compliant User-Agent string
Roadmap
- [x] Support latest filing download
- [x] Add local caching for CIK and filings metadata
- [x] Avoid duplicate downloads
- [x] Support multiple filing forms
- [x] Add limit control for multi-filing downloads
- [x] Add cache refresh support
- [x] Add custom output directory support
- [ ] Add tests for filtering and CLI parsing
- [ ] Add batch download support for multiple tickers
