pp-yahoo-finance
Yahoo Finance — Printing Press CLI
Prerequisites: Install the CLI
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 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.23+):
go install github.com/mvanhorn/printing-press-library/library/commerce/yahoo-finance/cmd/yahoo-finance-pp-cli@latest
If --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.
When to Use This CLI
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
Best Command Mapping
- "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
Unique Capabilities
watchlist
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 GOOG
portfolio
Track 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 --agent
digest
Summarize a watchlist into biggest gainers and losers.
yahoo-finance-pp-cli digest --watchlist tech --agent
compare
Show a normalized multi-symbol comparison.
yahoo-finance-pp-cli compare AAPL MSFT GOOG NVDA --agent
sparkline
Render a compact terminal sparkline from recent chart data.
yahoo-finance-pp-cli sparkline AAPL --range 3mo
sql
Run SQL directly against the local Yahoo/watchlist/portfolio database.
yahoo-finance-pp-cli sql "SELECT watchlist, COUNT(*) FROM watchlist_members GROUP BY watchlist" --agent
fx
Convert currencies without manually building Yahoo FX pair symbols.
yahoo-finance-pp-cli fx USD EUR --amount 100 --agent
options-chain
Filter 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 --agent
auth login-chrome
Import 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 abc123
Command Reference
Market 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
Practical Recipes
Morning briefing over a watchlist
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 --agent
Track a real portfolio with cost basis
yahoo-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 --agent
Compare several large-cap names
yahoo-finance-pp-cli compare AAPL MSFT NVDA GOOG --agent
Fallback when Yahoo blocks your IP
yahoo-finance-pp-cli auth login-chrome --cookies ~/yahoo-cookies.json --crumb abc123
yahoo-finance-pp-cli doctor
Session Model
Yahoo 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
Agent Mode
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>
Filtering output
--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.name
Use this to narrow huge payloads to the fields you actually need — critical for deeply nested API responses.
Response envelope
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.
Exit Codes
| 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 |
Argument Parsing
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
MCP Server Installation
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
Direct Use
- 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.
Agent Workflow Features
This CLI exposes three shared agent-workflow capabilities patched in from cli-printing-press PR #218.
Named profiles
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> --yes
Flag precedence: explicit flag > env var > profile > default.
--deliver
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/in
File 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.
feedback
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 # wipe
Entries 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).
More from mvanhorn/printing-press-library
pp-flight-goat
Search Google Flights, scan Kayak long-haul routes, and join FlightAware AeroAPI reliability, alerts, and tracking from one CLI.
212pp-espn
Use this skill whenever the user asks about live sports scores, standings, team stats, game summaries (with box score, leaders, scoring plays, odds, and win probability), NFL / NBA / MLB / NHL / NCAA / MLS / EPL / WNBA games, team schedules, polls, or rankings. ESPN sports CLI with live scores across 10 leagues, offline search, head-to-head comparisons, and rich per-game summary payloads. No API key required. Triggers on natural phrasings like 'what's the score of the Lakers game', 'Patriots schedule this week', 'NFL standings', 'box score for tonight's Mavs game', 'Chiefs vs Eagles head to head', 'who's on top of the AP poll'.
184pp-recipe-goat
Printing Press CLI for Recipe Goat. Recipe GOAT — find the best version of any recipe across 37 trusted sites, with offline cookbook, pantry match,...
159pp-movie-goat
The movie CLI that combines TMDb's discovery engine with OMDb's multi-source ratings — and ships a SQLite watchlist that flags what's streaming on your services right now. Trigger phrases: `what should I watch tonight`, `where can I stream <title>`, `rate <title>`, `compare <title> and <title>`, `what's <person>'s filmography`, `plan a <franchise> marathon`, `use movie-goat`, `run movie-goat`.
156pp-company-goat
Look up startups across SEC Form D, GitHub, Hacker News, Companies House, YC, and Wikidata in one command — including the SEC fundraising data hidden behind paid Crunchbase tiers. Trigger phrases: `look up this startup`, `research <company>`, `what does <company> do`, `form D for <company>`, `is <company> still active`, `compare <a> and <b>`, `use company-goat`, `run company-goat-pp-cli`.
84pp-hackernews
Hacker News from your terminal — with a local SQLite store, snapshot history, and agent-native output no other HN tool has. Trigger phrases: `check hacker news`, `search hn`, `what is hn saying about`, `diff the hn front page`, `pulse on hn`, `look up hn user`, `hn who is hiring`, `hn top stories`, `use hackernews`, `run hackernews`.
68