{"id":51723427,"url":"https://github.com/erhwenkuo/yf-cli","last_synced_at":"2026-07-17T15:12:50.190Z","repository":{"id":361049172,"uuid":"1214418549","full_name":"erhwenkuo/yf-cli","owner":"erhwenkuo","description":"A CLI for Yahoo! Finance data, powered by yfinance.","archived":false,"fork":false,"pushed_at":"2026-04-18T14:56:18.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T03:03:40.111Z","etag":null,"topics":["agent-cli","agent-skills","skill"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erhwenkuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-18T14:51:43.000Z","updated_at":"2026-05-14T04:59:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/erhwenkuo/yf-cli","commit_stats":null,"previous_names":["erhwenkuo/yf-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/erhwenkuo/yf-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erhwenkuo%2Fyf-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erhwenkuo%2Fyf-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erhwenkuo%2Fyf-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erhwenkuo%2Fyf-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erhwenkuo","download_url":"https://codeload.github.com/erhwenkuo/yf-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erhwenkuo%2Fyf-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35586091,"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-07-17T02:00:06.162Z","response_time":116,"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":["agent-cli","agent-skills","skill"],"created_at":"2026-07-17T15:12:49.310Z","updated_at":"2026-07-17T15:12:50.178Z","avatar_url":"https://github.com/erhwenkuo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yf CLI\n\nA command-line interface for Yahoo! Finance data, powered by [yfinance](https://github.com/ranaroussi/yfinance) and [Click](https://click.palletsprojects.com/).\n\n## Overview\n\n`yf` gives you instant access to stock quotes, historical prices, financial statements,\nanalyst ratings, options chains, market screeners, and more — all from your terminal.\n\n## Requirements\n\n- Python 3.13+\n- [uv](https://github.com/astral-sh/uv) (recommended package manager)\n\n## Installation\n\n```bash\ngit clone \u003crepo-url\u003e\ncd yf_cli\n\nuv venv\nsource .venv/bin/activate\nuv pip install -e .\n```\n\nVerify:\n\n```bash\nyf --version\nyf --help\n```\n\n## Shell Completion\n\n```bash\n# bash — add to ~/.bashrc\neval \"$(_YF_COMPLETE=bash_source yf)\"\n\n# zsh — add to ~/.zshrc\neval \"$(_YF_COMPLETE=zsh_source yf)\"\n\n# fish — add to ~/.config/fish/completions/yf.fish\n_YF_COMPLETE=fish_source yf | source\n```\n\nOr run `yf completion` to print instructions for all shells.\n\n## Commands\n\n### `yf quote` — Real-time quotes\n\n```bash\nyf quote AAPL\nyf quote AAPL MSFT GOOGL TSLA NVDA\nyf quote AAPL --output json\n```\n\n### `yf history` — Historical OHLCV prices\n\n```bash\nyf history AAPL                                          # 1 month, daily (default)\nyf history AAPL --period 6mo --interval 1wk\nyf history AAPL --start 2024-01-01 --end 2024-12-31\nyf history AAPL --period 1y --output csv \u003e aapl.csv\n\n# Periods:   1d 5d 1mo 3mo 6mo 1y 2y 5y 10y ytd max\n# Intervals: 1m 2m 5m 15m 30m 60m 90m 1h 1d 5d 1wk 1mo 3mo\n```\n\n### `yf info` — Company overview\n\n```bash\nyf info AAPL\nyf info TSLA --output json\n```\n\n### `yf financials` — Financial statements\n\n```bash\nyf financials AAPL                                       # annual income statement\nyf financials AAPL --type balance --freq quarterly\nyf financials AAPL --type cashflow --freq ttm --output json\n\n# --type:  income (default) | balance | cashflow\n# --freq:  annual (default) | quarterly | ttm\n```\n\n### `yf dividends` / `yf splits` / `yf actions`\n\n```bash\nyf dividends KO\nyf splits AAPL\nyf actions AAPL --output csv\n```\n\n### `yf analyst` — Analyst data\n\n```bash\nyf analyst AAPL                                          # price targets (default)\nyf analyst AAPL --type recommendations\nyf analyst AAPL --type upgrades\nyf analyst AAPL --type estimates --output json\n\n# --type: targets (default) | recommendations | upgrades | estimates\n```\n\n### `yf holders` — Ownership data\n\n```bash\nyf holders AAPL                                          # major holders (default)\nyf holders MSFT --type institutional\nyf holders TSLA --type insider --output csv\n\n# --type: major (default) | institutional | mutualfund | insider\n```\n\n### `yf calendar` — Earnings calendar\n\n```bash\nyf calendar AAPL\nyf calendar MSFT --output json\n```\n\n### `yf options` — Options chains\n\n```bash\nyf options AAPL                                          # list expiry dates\nyf options AAPL --expiry 2026-06-18                      # calls + puts (default)\nyf options AAPL --expiry 2026-06-18 --type calls\nyf options AAPL --expiry 2026-06-18 --output csv\n\n# --type: both (default) | calls | puts\n# ITM rows are highlighted in green\n```\n\n### `yf search` — Search tickers and news\n\n```bash\nyf search \"electric vehicles\"\nyf search AAPL --type news --limit 5\nyf search \"semiconductor\" --type quotes --output json\n\n# --type: both (default) | quotes | news\n```\n\n### `yf screen` — Market screener\n\n```bash\nyf screen --list                                         # show available presets\nyf screen --preset day-gainers\nyf screen --preset most-active --limit 10\nyf screen --preset undervalued-growth --output json\n```\n\nAvailable presets: `day-gainers` `day-losers` `most-active` `most-shorted`\n`aggressive-small-caps` `small-cap-gainers` `growth-tech` `undervalued-growth`\n`undervalued-large-caps` `conservative-foreign-funds` `high-yield-bond`\n`portfolio-anchors` `solid-large-growth-funds` `solid-midcap-growth-funds`\n`top-mutual-funds` `top-etfs-us` `top-performing-etfs` `technology-etfs` `bond-etfs`\n\n### `yf market` — Market overview \u0026 sectors\n\n```bash\nyf market                                                # US market status\nyf market --list                                         # available sectors\nyf market --sector technology\nyf market --sector energy --top etfs\nyf market --sector healthcare --output json\n\n# --top: companies (default) | etfs | mutual-funds\n```\n\nAvailable sectors: `basic-materials` `communication-services` `consumer-cyclical`\n`consumer-defensive` `energy` `financial-services` `healthcare` `industrials`\n`real-estate` `technology` `utilities`\n\n### `yf news` — Latest news\n\n```bash\nyf news AAPL\nyf news NVDA --limit 5\nyf news TSLA --verbose                                   # full summaries + URLs\nyf news MSFT --output json\n```\n\n### `yf completion` — Shell completion setup\n\n```bash\nyf completion          # instructions for all shells\nyf completion bash\nyf completion zsh\nyf completion fish\n```\n\n## Global Options\n\n```\n--no-color    Disable Rich colour output\n--version     Show version and exit\n--help        Show help for any command\n```\n\n## Practical Examples\n\n```bash\n# Morning market check\nyf quote AAPL MSFT GOOGL AMZN NVDA\nyf screen --preset day-gainers --limit 10\n\n# Deep-dive a stock\nyf info NVDA\nyf financials NVDA --type income --freq quarterly\nyf analyst NVDA --type recommendations\nyf holders NVDA --type institutional\n\n# Options flow\nyf options SPY\nyf options SPY --expiry 2026-06-18 --type calls\n\n# Export for spreadsheet / analysis\nyf history AAPL --period 5y --output csv \u003e aapl_5y.csv\nyf financials AAPL --type balance --output json \u003e aapl_balance.json\nyf holders MSFT --type institutional --output csv \u003e msft_holders.csv\n```\n\n## Development\n\n```bash\nsource .venv/bin/activate\n\nmake install       # install with dev dependencies\nmake lint          # ruff check\nmake test          # pytest\nmake test-cov      # pytest with coverage report\n\n# End-to-end smoke test (hits live Yahoo Finance API)\nbash scripts/smoke_test.sh\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferhwenkuo%2Fyf-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferhwenkuo%2Fyf-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferhwenkuo%2Fyf-cli/lists"}