| name | pp-yahoo-finance | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Use Yahoo Finance CLI for stock and ETF quotes, charts, fundamentals, options chains, symbol search, trending tickers, local watchlists, portfolio lots, and market digests. Use when the user asks about a ticker, portfolio performance, option filtering, market movers, or wants Yahoo Finance data in a terminal or agent-friendly format. | |||||||||||||||||
| author | Trevin Chow | |||||||||||||||||
| license | Apache-2.0 | |||||||||||||||||
| argument-hint | <command> [args] | install cli|mcp | |||||||||||||||||
| allowed-tools | Read Bash | |||||||||||||||||
| metadata |
|
This skill drives the yahoo-finance-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
- Install via the Printing Press installer:
npx -y @mvanhorn/printing-press-library install yahoo-finance --cli-only
- Verify:
yahoo-finance-pp-cli --version - Ensure
$GOPATH/bin(or$HOME/go/bin) is on$PATH.
If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.3 or newer):
go install github.com/mvanhorn/printing-press-library/library/commerce/yahoo-finance/cmd/yahoo-finance-pp-cli@latestIf --version reports "command not found" after install, the install step did not put the binary on $PATH. Do not proceed with skill commands until verification succeeds.
Use this CLI when the user asks about:
- stock, ETF, or fund quotes
- chart history or price ranges
- fundamentals or quote summary modules
- options chains or simple moneyness filtering
- trending symbols or predefined market screeners
- ticker search and autocomplete
- local watchlists
- portfolio cost basis and unrealized P&L
Do not use it when the user specifically needs:
- real-time streaming tick data
- exchange-grade paid data feeds
- broker/account actions like order entry
- "How is AAPL doing?" →
yahoo-finance-pp-cli quote --symbols AAPL --agent - "Give me a deeper view on Microsoft" →
yahoo-finance-pp-cli quote summary MSFT --agent - "Show me NVDA for the last year" →
yahoo-finance-pp-cli chart NVDA --range 1y --interval 1wk --agent - "What are the top gainers today?" →
yahoo-finance-pp-cli screener --scr-ids day_gainers --agent - "What is trending in the US?" →
yahoo-finance-pp-cli trending US --agent - "Track my portfolio" →
yahoo-finance-pp-cli portfolio perf --agent - "Compare AAPL, MSFT, and NVDA" →
yahoo-finance-pp-cli compare AAPL MSFT NVDA --agent - "Show me SPY options expiring soon" →
yahoo-finance-pp-cli options-chain SPY --max-dte 45 --agent
Save named ticker groups locally for reuse across commands.
yahoo-finance-pp-cli watchlist create tech
yahoo-finance-pp-cli watchlist add tech AAPL MSFT NVDA GOOGTrack local lots with purchase date and cost basis, then join them with live quotes.
yahoo-finance-pp-cli portfolio add AAPL 50 185.50 --purchased 2024-06-15
yahoo-finance-pp-cli portfolio perf --agent
yahoo-finance-pp-cli portfolio gains --agentSummarize a watchlist into biggest gainers and losers.
yahoo-finance-pp-cli digest --watchlist tech --agentShow a normalized multi-symbol comparison.
yahoo-finance-pp-cli compare AAPL MSFT GOOG NVDA --agentRender a compact terminal sparkline from recent chart data.
yahoo-finance-pp-cli sparkline AAPL --range 3moRun SQL directly against the local Yahoo/watchlist/portfolio database.
yahoo-finance-pp-cli sql "SELECT watchlist, COUNT(*) FROM watchlist_members GROUP BY watchlist" --agentConvert currencies without manually building Yahoo FX pair symbols.
yahoo-finance-pp-cli fx USD EUR --amount 100 --agentFilter Yahoo's raw chain into a usable options view by moneyness and DTE.
yahoo-finance-pp-cli options-chain AAPL --moneyness otm --max-dte 45 --type calls --agentImport a browser session when Yahoo blocks the automatic crumb bootstrap from the current IP.
yahoo-finance-pp-cli auth login-chrome --cookies ~/yahoo-cookies.json --crumb abc123Market data:
yahoo-finance-pp-cli quote --symbols AAPL,MSFTyahoo-finance-pp-cli quote summary AAPLyahoo-finance-pp-cli chart AAPL --range 1mo --interval 1dyahoo-finance-pp-cli fundamentals AAPL --type annualTotalRevenueyahoo-finance-pp-cli insights --symbol AAPLyahoo-finance-pp-cli options AAPLyahoo-finance-pp-cli recommendations AAPLyahoo-finance-pp-cli screener --scr-ids day_gainersyahoo-finance-pp-cli trending USyahoo-finance-pp-cli search "apple"yahoo-finance-pp-cli autocomplete --query appl
Local-state and derived workflows:
yahoo-finance-pp-cli watchlist create|add|remove|list|show|deleteyahoo-finance-pp-cli portfolio add|list|remove|perf|gainsyahoo-finance-pp-cli digestyahoo-finance-pp-cli compareyahoo-finance-pp-cli sparklineyahoo-finance-pp-cli sqlyahoo-finance-pp-cli fxyahoo-finance-pp-cli options-chain
Utilities:
yahoo-finance-pp-cli syncyahoo-finance-pp-cli workflow archiveyahoo-finance-pp-cli workflow statusyahoo-finance-pp-cli exportyahoo-finance-pp-cli importyahoo-finance-pp-cli doctoryahoo-finance-pp-cli auth statusyahoo-finance-pp-cli auth logoutyahoo-finance-pp-cli auth login-chrome
yahoo-finance-pp-cli watchlist create tech
yahoo-finance-pp-cli watchlist add tech AAPL MSFT NVDA GOOG META
yahoo-finance-pp-cli digest --watchlist tech --agentyahoo-finance-pp-cli portfolio add AAPL 50 185.50 --purchased 2024-06-15
yahoo-finance-pp-cli portfolio add MSFT 20 340.00 --purchased 2024-03-01
yahoo-finance-pp-cli portfolio perf --agent
yahoo-finance-pp-cli portfolio gains --agentyahoo-finance-pp-cli compare AAPL MSFT NVDA GOOG --agentyahoo-finance-pp-cli auth login-chrome --cookies ~/yahoo-cookies.json --crumb abc123
yahoo-finance-pp-cli doctorYahoo Finance uses a crumb/cookie session model, not an API key model.
- first live request: the CLI tries to bootstrap the session automatically
- if Yahoo blocks that bootstrap with HTTP 429: use
auth login-chrome - inspect cached state:
auth status - clear a bad cached session:
auth logout
Add --agent when you want machine-oriented output.
It expands to:
--json--compact--no-input--no-color--yes
Useful companion flags:
--select <fields>--dry-run--no-cache--data-source auto|live|local--rate-limit <n>
--select accepts dotted paths to descend into nested responses; arrays traverse element-wise:
yahoo-finance-pp-cli <command> --agent --select id,name
yahoo-finance-pp-cli <command> --agent --select items.id,items.owner.nameUse this to narrow huge payloads to the fields you actually need — critical for deeply nested API responses.
Data-layer commands wrap output in {"meta": {...}, "results": <data>}. Parse .results for data and .meta.source to know whether it's live or local. The N results (live) summary is printed to stderr only when stdout is a TTY; piped/agent consumers see pure JSON on stdout.
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error |
| 3 | Resource not found |
| 4 | Session/auth-style error |
| 5 | API error |
| 7 | Rate limited |
| 10 | Config error |
Given $ARGUMENTS:
- Empty,
help, or--help→ runyahoo-finance-pp-cli --help install→ install CLIinstall mcp→ install MCP server- Anything else → map the user request to the best command above and run it with
--agent
go install github.com/mvanhorn/printing-press-library/library/commerce/yahoo-finance/cmd/yahoo-finance-pp-mcp@latest
claude mcp add yahoo-finance yahoo-finance-pp-mcp- Check whether
yahoo-finance-pp-cliis installed. - If not installed, offer CLI installation.
- Choose the command that matches the user's intent most directly.
- Run with
--agentunless the user explicitly wants human-formatted output. - If Yahoo is rate-limiting this machine, guide the user to
auth login-chrome.
This CLI exposes three shared agent-workflow capabilities patched in from cli-printing-press PR #218.
Persist a set of flags under a name and reuse them across invocations.
# Save the current non-default flags as a named profile
yahoo-finance-pp-cli profile save <name>
# Use a profile — overlays its values onto any flag you don't set explicitly
yahoo-finance-pp-cli --profile <name> <command>
# List / inspect / remove
yahoo-finance-pp-cli profile list
yahoo-finance-pp-cli profile show <name>
yahoo-finance-pp-cli profile delete <name> --yesFlag precedence: explicit flag > env var > profile > default.
Route command output to a sink other than stdout. Useful when an agent needs to hand a result to a file, a webhook, or another process without plumbing.
yahoo-finance-pp-cli <command> --deliver file:/path/to/out.json
yahoo-finance-pp-cli <command> --deliver webhook:https://hooks.example/inFile sinks write atomically (tmp + rename). Webhook sinks POST application/json (or application/x-ndjson when --compact is set). Unknown schemes produce a structured refusal listing the supported set.
Record in-band feedback about this CLI from the agent side of the loop. Local-only by default; safe to call without configuration.
yahoo-finance-pp-cli feedback "what surprised you or tripped you up"
yahoo-finance-pp-cli feedback list # show local entries
yahoo-finance-pp-cli feedback clear --yes # wipeEntries append to ~/.yahoo-finance-pp-cli/feedback.jsonl as JSON lines. When YAHOO_FINANCE_FEEDBACK_ENDPOINT is set and either --send is passed or YAHOO_FINANCE_FEEDBACK_AUTO_SEND=true, the entry is also POSTed upstream (non-blocking — local write always succeeds).