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

@narumitw/pi-ticker

v0.1.0

Published

Pi extension that shows configurable Yahoo Finance quotes above the editor.

Readme

📈 pi-ticker — Show Market Quotes Above Pi's Editor

npm Pi extension License: MIT

Pi Ticker shows configurable Yahoo Finance quotes in a width-aware widget above Pi's editor.

✨ Features

  • Shows price, daily change, and daily percentage change for up to ten symbols.
  • Starts empty and performs no quote requests until at least one symbol is added.
  • Packs complete ticker entries into rows that fit the current terminal width.
  • Provides searchable TUI and RPC menus for adding, removing, and reordering symbols.
  • Persists widget visibility and the ordered symbol list in user settings.
  • Refreshes every 30 seconds while enabled, keeps successful results, and marks failed symbols' previous quotes stale.
  • Cancels polling, in-flight requests, and active menus during reload, session replacement, and shutdown.

📦 Install

Install from npm:

pi install npm:@narumitw/pi-ticker

Try without installing permanently:

pi -e npm:@narumitw/pi-ticker

Build and load this package from a local checkout:

npm --workspace @narumitw/pi-ticker run build
pi --no-extensions -e ./packages/pi-ticker

The package declares dist/index.ts, so an unbuilt local checkout must run the build before Pi loads the package directory.

Pi loads the generated TypeScript entrypoint through Jiti while menu code remains in lazy JavaScript chunks.

Extensions run with Pi's permissions, so install only trusted packages.

🚀 Quick start

Open the ticker manager in TUI mode:

/ticker

Choose Add custom ticker… and enter a Yahoo Finance symbol such as MSFT, SPY, or BTC-USD.

The widget appears after the settings save and the first quote request completes.

🧭 Ticker manager

/ticker opens Manage tickers in TUI and RPC modes.

In TUI mode, one screen provides search, symbol removal, direct add, widget visibility, and refresh actions.

The configured confirm binding or Space activates the focused row.

When a valid search has no match, the add row changes to Add SYMBOL for direct addition.

Shift+Up and Shift+Down reorder the focused ticker when the search field is empty and those keys do not conflict with configured standard bindings.

RPC mode exposes portable dialogs for choosing and moving a ticker.

Each accepted change saves immediately.

If a save fails, the manager restores the previous displayed and effective value.

Removing the final symbol hides the widget and stops polling.

Escape closes transient TUI flows, and Ctrl+C remains a hard-close path.

💬 Commands

  • /ticker opens the ticker manager.
  • /ticker <SYMBOL ...> replaces the complete ordered symbol list and refreshes quotes.
  • /ticker refresh refreshes quotes immediately when the widget is enabled.
  • /ticker help shows direct-command usage.
  • /ticker reset reports that no default symbol list exists and leaves settings unchanged.

Known routes reject trailing arguments.

All command routes support TUI and RPC modes.

Print and JSON modes reject the command before changing settings.

⚙️ Settings

The canonical user settings file is:

<getAgentDir()>/pi-ticker.json

The normal path is ~/.pi/agent/pi-ticker.json.

Pi's configured agent directory replaces ~/.pi/agent when applicable.

Ticker preferences are user-scoped and apply across projects.

The extension does not read project settings or extension-specific environment-variable overrides.

A missing file uses an empty symbol list, keeps the widget enabled, and does not create the file, its parent directory, or a polling task.

The settings file must contain a JSON object with these optional fields:

| Field | Accepted values | Default | Behavior | | --- | --- | --- | --- | | symbols | Zero to ten Yahoo Finance symbol strings | [] | Controls the ordered quotes shown in the widget. | | widgetEnabled | boolean | true | Controls widget visibility and quote polling. |

Each symbol may contain up to 15 uppercase letters, digits, ., ^, =, or -.

Lowercase command and menu input is normalized to uppercase.

Example:

{
  "symbols": ["NVDA", "BTC-USD", "ETH-USD"],
  "widgetEnabled": true
}

Unknown JSON fields are preserved during saves.

Malformed or invalid settings use runtime defaults and leave the file unchanged.

Pi shows a warning when UI is available.

Writes are ordered within one Pi process and published through a temporary file plus atomic rename.

Reload and session replacement wait for accepted writes before loading the next settings snapshot.

Separate Pi processes do not share a cross-process lock.

Settings reload on startup and /reload.

🔒 Security and privacy

The extension requests public quote metadata from Yahoo Finance over HTTPS without an API key.

Requested ticker symbols and the host network address are visible to Yahoo Finance.

The user settings file contains only ticker symbols and widget visibility; it stores no credential or secret.

The extension displays ticker symbols and quote data locally without adding them to model context.

🚧 Limitations

Yahoo Finance is an unofficial dependency and may rate-limit, delay, change, or remove the endpoint.

Quotes may be delayed and are not suitable for trading decisions.

Each request times out after 10 seconds, and one symbol failure does not discard successful symbols.

Each Pi session owns its polling queue, and separate Pi processes do not share one.

🗂️ Package layout

packages/pi-ticker/
├── src/
│   ├── index.ts       # Thin source entrypoint for repository loading and runtime builds
│   ├── ticker.ts      # Registration, commands, polling, and lifecycle ownership
│   ├── menu.ts        # Mode dispatch and RPC management flow
│   ├── tui-menu.ts    # Searchable TUI manager and reorder shortcuts
│   ├── settings.ts    # Validation and atomic user-settings persistence
│   ├── quotes.ts      # Yahoo Finance requests and response parsing
│   └── render.ts      # Width-bounded plain and themed widget rendering
├── scripts/
│   └── build-runtime.mjs  # Deterministic runtime builder and boundary validator
├── dist/              # Generated Jiti entrypoint, lazy chunks, and source maps
├── test/              # Deterministic package behavior and generated-runtime tests
├── README.md
├── LICENSE
├── package.json
└── tsconfig.json

🔎 Keywords

Pi extension, market quotes, stock ticker, Yahoo Finance, editor widget, terminal UI, TypeScript.

📄 License

MIT