npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@thynker-labs/yf-cli

v1.0.3

Published

Yahoo Finance CLI - Get stock quotes and historical data

Readme

yf-cli

Yahoo Finance CLI - Get stock quotes and historical data from the command line.

Installation

Option 1: Install from npm (Recommended)

npm install -g @thynker-labs/yf-cli

Requires Node.js 14 or higher.

Option 2: Install Script (from source)

git clone https://github.com/thynker-labs/yf-cli.git
cd yf-cli
./install.sh

The install script will:

  • Check that Node.js and npm are installed
  • Install dependencies
  • Install the package globally
  • Link the CLI command
  • Verify the installation

Option 3: Manual Install (from source)

git clone https://github.com/thynker-labs/yf-cli.git
cd yf-cli
npm install
npm install -g .

Or link globally:

npm install
npm link

Usage

Get Quote

# Single ticker
yf quote AAPL

# Multiple tickers (comma-separated)
yf quote AAPL,GOOG,MSFT

CSV Input

# Create a CSV file with tickers (comma or newline separated)
echo "AAPL,GOOG,MSFT" > tickers.csv

# Or one per line:
# AAPL
# GOOG
# MSFT

yf csv tickers.csv

Historical Data

# Default: last 1 month
yf history AAPL

# Standard periods
yf history AAPL 1d
yf history AAPL 5d
yf history AAPL 1mo
yf history AAPL 3mo
yf history AAPL 6mo
yf history AAPL 1y
yf history AAPL 2y
yf history AAPL 5y
yf history AAPL 10y
yf history AAPL ytd
yf history AAPL max

# Date range (DDMMYYYY-DDMMYYYY)
yf history AAPL 01012024-31122024

JSON Output

Add --json or -j flag to any command for JSON output:

yf quote AAPL --json
yf csv tickers.csv --json
yf history AAPL 1y --json

Show All Historical Data

By default, historical shows last 10 rows. Use -a or --all to show all:

yf history AAPL 1y --all

Output Examples

Quote Table

┌──────────┬──────────────────────────────┬────────────┬────────────┬──────────┬───────────────┐
│ Symbol   │ Name                         │ Price      │ Change     │ %        │ Volume        │
├──────────┼──────────────────────────────┼────────────┼────────────┼──────────┼───────────────┤
│ AAPL     │ Apple Inc.                   │ 264.58     │ 4.00       │ +1.54%   │ 36,884,993.00 │
└──────────┴──────────────────────────────┴────────────┴────────────┴──────────┴───────────────┘

Historical Table

AAPL - Last 10 days:
┌────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬───────────────┐
│ Date       │ Open       │ High       │ Low        │ Close      │ Adj Close  │ Volume        │
├────────────┼────────────┼────────────┼────────────┼────────────┼────────────┼───────────────┤
│ 2026-02-20 │ 258.97     │ 264.75     │ 258.16     │ 264.58     │ 264.58     │ 42,044,900.00 │
└────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴───────────────┘

Options

  • -j, --json - Output as JSON
  • -a, --all - Show all historical data (default: last 10 rows)
  • -h, --help - Show help
  • -V, --version - Show version number

License

MIT