Logo StockGram (BASH / OSX)
StockGram (BASH / OSX)

StockGram (BASH / OSX)

By Page Telegram
πŸ’› Support Page Telegram directly πŸ’³ Donate
Current Version: 1.1.0
33
Unique Views
56
Free Downloads
0
Donation Downloads

StockGram

StockGram by Page Telegram Volunteer Services !StockGram demo A terminal portfolio watcher written in Bash. Add and remove stock tickers, set how many shares you hold, watch live up/down moves and a running asset total, open ASCII price charts (intraday through 10 years), and read per-stock RSS headlines β€” including a text preview and a Shift+Enter article dialog. Prices and history come from Yahoo Finance public chart APIs. Headlines come from Yahoo Finance RSS, with Google News as a fallback. This is not investment advice.

Requirements

ToolPurposeTypical package
python3Quotes, ASCII charts, RSS parse (stdlib only)python3
curlTicker validationcurl
mkdirConfig and cache dirscoreutils
tputTerminal sizencurses / ncurses-bin
sttyKeyboard TUIcoreutils
No pip packages. On first run, StockGram checks for missing tools and prompts to install them (apt, dnf, yum, zypper, pacman, apk, or brew).
bash
./stockgram.sh --check-deps
./stockgram.sh --install-deps
Non-interactive installs: STOCKGRAMASSUMEYES=1 ./stockgram.sh --install-deps

Run

bash
chmod +x stockgram.sh
./stockgram.sh

macOS app

The only file you need on a Mac is StockGram.app. Unzip OSX/StockGram.app.zip and double-click the app. The Bash TUI is embedded in the bundle (Contents/Resources/stockgram.sh); you do not need a copy of stockgram.sh next to the app. Use the zip, not a raw folder copy off pCloud β€” pCloud drops Unix execute bits, and macOS will not launch an app whose executable is not +x. First launch on a new Mac: right-click the app β†’ Open (unsigned). StockGram still needs Bash 4+ (brew install bash). One-shot dumps (no TUI):
bash
./stockgram.sh --help
./stockgram.sh --quotes AAPL,MSFT,TSLA
./stockgram.sh --news AAPL
./stockgram.sh --chart AAPL 1d line
./stockgram.sh --chart AAPL 10y ohlc
Chart ranges: 1d 5d 1mo 3mo 6mo ytd 1y 2y 5y 10y Chart styles: line area ohlc

Portfolio window

The top pane is the watchlist. Each row shows last price, share count (SHRS), a live UP / DN dollar move versus the previous close, percent change, and (when the terminal is wide enough) position VALUE, volume, day range, 52-week range, and an ASCII intraday sparkline. The last line of the portfolio box is a running ASSETS total: number of positions, market value, and day P/L. Tickers with no shares set are watch-only and do not count toward the total.
KeyAction
↑ ↓ or j kSelect ticker (loads that symbol’s news)
c / C or EnterOpen the fullscreen ASCII chart
sSet share count for the selected ticker
SpacePause / resume auto-updates (quotes, news, charts)
GSort the list by biggest day gains (%)
aAdd call letters
x or DeleteRemove the selected ticker
u / UQuote refresh interval, 2 seconds to 1 hour
RRefresh quotes and news now
?Help
qQuit
Default watchlist (first run): AAPL MSFT GOOG AMZN NVDA TSLA META SPY QQQ Saved in ~/.config/stockgram/watchlist (or $STOCKGRAM_HOME/watchlist). Each line is a symbol, optionally followed by a share count:

AAPL 12
MSFT 5.5
GOOG
AAPL=12 and AAPL:12 are also accepted. Override the config directory with STOCKGRAM_HOME.

News window

The bottom pane is a separate boxed window. It shows RSS headlines for the selected ticker only: date and source, the title, and a short text preview from the feed description.
KeyAction
← β†’Previous / next headline
Home / EndFirst / last headline
Shift+Enter or oOpen the article in a dialog (fetched body, or RSS text if the page cannot be read)
In the article dialog: ↑ ↓ or j k scroll, PgUp / PgDn / Space page, q or Esc close. The feed auto-refreshes every 1 minute. The title bar shows source, auto 1m, and age (12s ago). Your place in the list is kept across refreshes. If the feed fails, the last headlines stay on screen.

Chart view

ASCII only (line, area, or OHLC). History from 1 day through 10 years.
KeyAction
← β†’Pan (scroll history)
Home / EndOldest / live follow (newest)
+ = / -Zoom in / out
[ ]Shorter / longer range
1–9, 01D 5D 1M 3M 6M YTD 1Y 2Y 5Y / 10Y
cCycle style: line, area, ohlc
n / pNext / previous ticker
SpacePause / resume auto-updates
u / UQuote refresh interval
q or EscBack to the portfolio
Quote refresh (u/U) is independent of the 1-minute news timer. Space freezes both. While paused, the last quotes and chart stay on screen; pan, zoom, and range keys still fetch a new chart if you change the view. Refreshes paint in place (no full-screen wipe), so a 2-second quote interval no longer makes the terminal flash.

Responsive layout

List, news, and charts scale to the terminal. Resize redraws immediately. The header shows size and density, for example 80x24 normal.
DensityTypical sizeBehavior
compactunder 64 columns or 18 rowsShort header, no sparkline, 1-line footer
normalaround 80Γ—24Sparkline, balanced list and news
wide120Γ—30 and upLonger names, position value, volume, day range, taller news

Environment

VariableMeaning
STOCKGRAMHOMEConfig directory (default: ~/.config/stockgram)
STOCKGRAMASSUMEYESInstall missing packages without a prompt
NOCOLORDisable ANSI colors
Cache files live under ${TMPDIR:-/tmp}/stockgram-$UID.

Demo GIF

A recorded walkthrough lives at docs/stockgram-demo.gif. It shows the portfolio list, news pane, G (sort by gains), and a fullscreen ASCII chart. Regenerate it (needs live market data, python3 + pyte, ffmpeg, and DejaVu Sans Mono):
bash
python3 tools/record_demo.py

Disclaimer

Market data is delayed or last-sale as provided by Yahoo Finance. Feeds can be incomplete or unavailable. StockGram is a volunteer terminal tool, not a broker, and not investment advice.

Download Options

Free Downloads: Source code and compiled binaries are freely available. Donations are appreciated!

Free Downloads

πŸ“¦ Download Source Code

Compiled Binaries (Free Download)

πŸ’› These binaries are free! If you find this software useful, please consider supporting the developer. πŸ’³ Donate

Changelog

Changelog

All notable changes to StockGram are documented here. Format follows Keep a Changelog. Versioning follows Semantic Versioning.

[1.1.0] β€” 2026-08-15

Added

  • Share counts per ticker (s): whole or fractional lots, saved on the watchlist as AAPL 10.
  • Portfolio ASSETS summary: positions held, market value, and day P/L in dollars and percent.
  • SHRS column on every row; VALUE (price Γ— shares) on wider terminals.
  • RSS description preview under the current headline in the news window.
  • Shift+Enter (or o) opens a scrollable article dialog: fetched page text, or the RSS summary if the page cannot be read.
  • Space pauses and resumes auto-updates of quotes, news, and charts. The banner shows PAUSED. Manual R still refreshes.
  • Self-contained macOS app: OSX/StockGram.app embeds stockgram.sh. Distribute OSX/StockGram.app.zip (zip keeps the execute bits pCloud drops). Double-click the app; no sidecar script required.
  • Changed

  • Quote and chart refreshes paint in place. The previous frame stays visible while new data is fetched.
  • Chart view no longer flashes a β€œloading…” wipe on each poll.
  • News pane hint line: S-Enter article plus the next headline.
  • Watchlist file accepts SYMBOL, SYMBOL 10, SYMBOL=10, or SYMBOL:10. Bare symbols stay watch-only (zero shares).
  • Finder/app launch on macOS uses the detected Bash 4+ path (Homebrew Intel or Apple Silicon), not a hardcoded /opt/homebrew/bin/bash.
  • Fixed

  • Full-screen clear (ESC[2J) on every refresh interval, which made the TUI blink every few seconds.
  • [1.0.0] β€” 2026-08-14

    First public release. StockGram by Page Telegram Volunteer Services.

    Added

  • Interactive Bash TUI for a multi-ticker portfolio.
  • Add (a) and remove (x / Delete) stock call letters; watchlist persisted under ~/.config/stockgram/watchlist.
  • Live day move on each row: UP / DN / FLAT, dollar change, and percent versus previous close.
  • ASCII chart view (line, area, OHLC) from 1 day through 10 years.
  • Chart pan with arrow keys, zoom with +/-, range keys 1–9/0 and [ ].
  • Quote refresh interval from 2 seconds to 1 hour (u / U).
  • Separate boxed NEWS window: Yahoo Finance RSS per selected ticker, Google News fallback.
  • Left/right (and Home/End) scroll through headlines; up/down stay on the portfolio list.
  • Headlines auto-refresh every 1 minute for the selected symbol, independent of the quote timer.
  • Auto-refresh keeps the current headline when the feed updates; last headlines are kept if RSS fails.
  • Responsive layout: compact / normal / wide density from terminal size; live redraw on resize.
  • Wide terminals add volume, day range, 52-week range, and longer ASCII sparklines.
  • Charts scale plot height and axis labels to the remaining screen.
  • Startup dependency check with install prompt (apt, dnf, yum, zypper, pacman, apk, brew).
  • CLI: --help, --quotes, --news, --chart, --check-deps, --install-deps.
  • Branding on the header and footer: StockGram by Page Telegram Volunteer Services.
  • Notes

  • Data source: Yahoo Finance public chart and RSS endpoints. No broker integration.
  • Python 3 standard library only; no pip dependencies.