An open-source, Bloomberg-style stock dashboard for the terminal that also answers why the price moved. Live quotes and candlestick charts on one side; on the other, for the same ticker, AI-scored news with a full analysis of each story, the SEC Form 4 insider filings and a structured read of the last earnings report. A watchlist calendar brings upcoming company reports and US macro releases into the same workspace. One Rust binary built on ratatui, no browser tab, and no account needed for the prices. Coming from tickrs or ticker? See how it compares.
brew install makeev/tap/alphai-tui # also cargo, apt, AUR, x-cmd, or a prebuilt binary
alphai-tui NVDA AVGO AAPL MSFT META TSLA AMZN GOOGL BTC-USDQuotes and charts run keyless on Yahoo, or on Finnhub, Alpaca or Tiingo
with their own keys. The News, Insider, Earnings and Calendar views run on a free
AlphAI key
that you paste once in the settings screen. The first run walks you through
both, and after that a bare alphai-tui reopens your watchlist.
Nine views, one keystroke apart (1 to 9, or Tab). Some follow the
selected ticker; Summary, Portfolio and Calendar cover several names.
One line under the tabs carries the selected ticker's price into all of them.
The screenshots use the dracula preset.
Price, the change on the day, the extended-hours print measured against the regular close, what you are up or down on the ticker if you hold any of it, what the US market is doing right now (pre, live, post or closed) and how long until the next bell, whether the feed is delayed, where the price sits between the day's low and high, and, where the source reports them and the terminal is wide enough, the year's range and the day's volume. The rest of the watchlist follows as percentages.
The main price is labelled quote, with its currency. When the provider
supplies a trade timestamp and feed, those appear beside the quote before
optional holdings and session details. This is the time of the trade, not
the last refresh. The header keeps navigation and connection status.
A flag shows the next high-importance macro event within seven days, or a
confirmed report date for the selected ticker within seven ET calendar
days. The ticker's report takes priority. It uses fresh cached dates only;
the flag never fetches a company's report dates itself. Estimated macro
dates keep an est. label, and postponed or cancelled events do not flag.
So the News, Insider and Earnings views are never a ticker name with no
price attached, and moving between tickers with the arrow keys is not a
blind jump. Parts drop one at a time as the terminal narrows, the symbol and
the price surviving to the last; [ui] quote_rail = false turns the line
off, and a terminal under 12 rows gives the row back to the view.
The chart across the top half, the watchlist and the news feed side by side in the bottom half. One screen that says what you follow, what it is doing and what is being said about it; the chart gets the full width, so it shows twice the candles a half-width one could. On very small terminals the feed steps aside and the watchlist and the chart share the row.
a adds a ticker without leaving the app (type the symbol, Enter), d
drops the selected one. Both write the watchlist to the config straight
away, the way a holding is saved. A session started on tickers from the
command line (alphai-tui TSLA) leaves a saved watchlist alone and says
so in the footer; Save in the settings screen keeps such a list on purpose.
Every article carries a per-ticker analysis: the expected price impact and the confidence behind it, relevance and novelty scores, how actionable it is, the background context, the entities involved and a contrarian view. A seven-day bullish/bearish rollup tops the ticker scope.
The card starts with the selected ticker's AI impact and explanation, followed by the general summary and other companies. The selected ticker keeps its place even when it appears later in the provider's analysis.
The feed shows articles scoring 7 and up by default. + and - move that
bar live, the server does the filtering, so nothing you filtered out eats a
slot on the page. Articles fresher than 15 minutes light up their age, and
rows that arrived since you last looked carry a ● that goes out once the
cursor rests on them. New arrivals are placed at the top of the list even
when the rows below them are newer: a story reaches the feed a while after
it was published, and at its publish position it would land below the fold
and never be seen.
The ticker's chart sits over the list and the card beside them. The article
you are reading is the highlighted mark on the chart and the chart's bottom
line names it, so the story and the move it came with are on one screen.
That needs a terminal at least 120 columns wide and the ticker scope;
elsewhere the list and the card stand side by side. x cycles to list over
card and to list beside card without the chart, and the News layout row in
the settings screen saves the choice. v opens the article for reading:
under the chart in that layout, over the whole screen in the others.
Enter opens the article in the browser, and down on the last row loads
the next page.
f cycles the scope: the selected ticker, the whole market, or the 48-hour
trending top ten. The market-wide feed collapses syndicated reprints into
one row and says how many outlets carry the story (×4), marks an earnings
filing as 8-K or 6-K rather than as coverage of one, and mixes in the
insider rows.
The watchlist alone, full width: price, change in dollars and percent, the extended-hours change, the day's range and a sparkline of the session. The extended column appears only when some row actually has a print outside the session, so it costs no width during the trading day.
Candlesticks at half-block resolution with a previous-close reference line,
20 and 100 period moving average overlays threaded through them as thin
braille lines, a volume panel whose bars sit in their candles' own columns
and take their color, and an RSI(14) panel. c switches to a Braille line
chart, m, i and b toggle the overlays and the panels, e averages
simple or exponential, t cycles interval presets, and E draws the pre
and post market candles too (Yahoo, Alpaca and Tiingo), enabled by default. The
chart title keeps the switch beside the source: EXT: Yahoo (Shift+E: off)
or EXT: off (Shift+E: on) when hidden. The hint follows custom keybindings.
Where there is nothing to draw, E says why in the footer: daily candles,
crypto that trades around the clock, a listing outside the US, or Finnhub,
which has no candle history (its chart title reads EXT: n/a).
Charts start with five days of 15m candles; set the top-level range and
interval in the config to choose another window or size. The chart title
shows both values, 5d / 15m, because t and T cycle forward and
backward through presets that change the window as well as the candle size.
The Last bar line shows the newest candle's close, feed and start time.
The price marker is labelled quote, PRE, AH or bar to distinguish
a trade from a candle close. With the quote rail hidden, the chart title
also carries the quote, currency and daily change.
The ticker's news is marked on the candles it was published in: ▲ and
▼ for the AI sentiment call, ◆ when it is neutral, brighter for a
higher relevance score, and the freshest of them named on the bottom
border. So the move and its reason share a column instead of living in
different views. n turns the marks off. They are drawn from the news the
app already holds for that ticker, which the Split and News views keep
fresh, so they never cost an API request and they are simply absent until
one of those views has loaded that ticker's feed.
The client fetches extra history for indicator warm-up. Pre-market has a quiet warm background, after-hours a cool one, and regular trading keeps the terminal background. Price, volume and RSI share the same session columns and vertical grid in both candle and line mode. Aggregation never combines different sessions or feeds into one candle. These session rules apply to US stocks on intraday intervals, including scheduled 13:00 closes and 17:00 after-hours closes on half days; crypto remains 24/7.
A bar is its interval at every width. When the plot is too narrow for
every bar of the window, the newest bars that fit are drawn and the title
counts the rest: last 70 of 192 bars. Bars are never merged into larger
candles, so the half-width chart in the split view draws the same bars as
the chart view, fewer of them, and the price axis follows the bars on
screen. To see more of the window, widen the terminal or pick a coarser
interval with t.
The time axis adapts its label spacing to the terminal width, gives the
opening and closing bells priority, and puts dates on a second row. US
stocks use New York time (ET) by default; [chart] timezone = "local"
or "utc" changes the labels. Other instruments use local time under the
"exchange" default. Future labels in the right margin skip closed US
sessions, weekends and holidays, including daylight-saving changes.
session_shading = false and time_grid = false disable those layers.
The right margin carries the latest relevant price. A timestamped quote only updates a candle from the same source, interval and session: the regular close cannot overwrite a pre-market candle, and an IEX quote cannot rewrite a delayed SIP bar. Extended quotes at 0% still appear. The rail shows their source, timestamp and age; a new premarket retires the previous after-hours quote even if the first new trade has not arrived yet.
SEC Form 4 activity for the selected ticker: what its own officers and directors did with their shares. A 12-month rollup (buys against sells, dollar volumes, the share done under pre-arranged 10b5-1 plans, the most active insiders) sits above a trades chart and the stream of filings.
The filing list is a ledger: transaction date, side, value, reporting owner
and a plan flag for 10b5-1 trades. Unknown transaction dates show ?;
legacy rows keep their headline when the owner's name is unavailable.
Only the side uses buy/sell color. The card leads with the company and
owner, side and value, plan, stake change and tranche count, followed by
trade details and the separately labelled AI impact.
Every event in the window is a triangle placed by date on a log dollar
scale (▲ buy, ▼ sale, a hollow ▽ for shares sold back to the issuer,
dimmed when the trade ran under a plan), with weekly buy and sell dollar
bars underneath. The mark of the filing selected in the list renders
inverted, so the list and the chart always point at each other. Beside the
list, the selected filing's full card: the trade with shares, price and
code, who made it, the AI read, and what share of the insider's stake the
event moved, how many tranches the filing folded into it and whether it was
filed late. v hides the card for a full-width list and brings it back.
g cycles the window between 3 months, 12 months and off; + and -
filter the stream by trade size.
AlphAI's structured read of the ticker's own earnings filing, the way the company reported it: the verdict and why, the metric table with the prior quarter, the prior year and both changes, segments, the outlook, concerns, what to watch and several paragraphs of analysis. Every figure was checked against the filing text before it was published, and it prints exactly as the filing wrote it, units shortened and nothing rounded into a new number. American and foreign filings both (an 8-K item 2.02, or a foreign private issuer's 6-K with its half years and its own currency).
← → walk the watchlist, older quarters continue below the newest read.
When a company has not reported since AlphAI began reading filings, the
view says so and gives the date of its next report if the company has
confirmed one. The bottom line carries the next couple of US macro releases
(CPI, the jobs report, an FOMC decision), which is the other half of what
moves a price you are about to read about.
Every ticker you follow as its own chart, in a grid sized to the terminal.
The table's one-row sparkline says up or down; this spends real rows on each
name, so one glance covers the shape of the session across the whole list.
↑ ↓ move between cards and page the grid when the watchlist outgrows the
screen.
What the watchlist cannot answer: the price times what you own of it. One
row per holding with its quantity, average price, value, the day's move in
money, the profit or loss since you bought and the share of the portfolio
it carries, and a total underneath. p opens a one-line prompt on the
ticker under the cursor, prefilled with what is held, so a correction is
two keystrokes and an emptied line drops the holding; the quantity and the
price are written to the config file right away rather than waiting for
Save. A holding that is not on the watchlist is polled all the same, so
every row has a price, and a row still waiting for its first one says so
instead of counting as zero. The same numbers turn up as two extra columns
in the Table view and as a zone in the quote rail, but only for the
tickers you actually hold.
Holdings use the premarket or after-hours price when the source reports
one, falling back to the regular quote otherwise. This applies to Last,
value, P&L, totals and the holding figures in the table and quote rail,
independently of the E candle toggle. An extended Last carries a *.
During premarket, Day starts at the latest regular close; after hours,
it includes both the regular session and the extended move.
There is no currency conversion here and there is not going to be one: if
the holdings quote in more than one currency, the total says mixed currencies rather than pretending the sum means something.
US macro releases and confirmed report dates from your watchlist in one
agenda: the past seven days and the next 45 days. The cursor starts at the
first upcoming event, a now line separates it from the past, and new
arrivals keep the event you selected in place. High-importance releases
and company reports stand out; estimated, postponed and cancelled
remain explicit even when the terminal is too narrow for the Details column.
Event names use up to 48 columns when needed, while shorter names leave
more space for Details. Color highlights the event and its importance;
dates and source details keep a quieter style.
↑ / ↓ select an event, PgUp / PgDn move ten events, and Enter
opens a macro event's source or the company's Earnings view. That view
contains published reads, so it may show the previous quarter until a new
read is available. Calendar is an agenda, not confirmation that a release
has been published; it has no actual, forecast or previous macro figures.
Macro times follow [chart] timezone (ET by default). Company report dates
stay in ET in every timezone and show — for time: the API confirms the
day, not the hour. A company without a confirmed date simply has no report
row; this does not mean it will not report. Coverage is partial. Historical
company dates are limited to the next-report dates still in the cache.
Dates are checked one company at a time while Calendar is open, at least four seconds apart. The progress line distinguishes unconfirmed dates, unchecked names and failed checks. A failed macro update keeps the last successful rows, marked as cached, alongside any available company dates.
r refreshes the macro window and resumes missing, stale or failed report
date checks. It keeps fresh successful company dates, so it is not a full
watchlist refresh. To recheck one fresh company date, open its Earnings
view and press r there. An access or rate-limit error pauses the date
sweep until a manual retry, rather than repeating it for every company.
? lists every action with the keys currently bound to it and the name to
use in the config to rebind it. s opens the settings, grouped into
prices (the source, where pre and after hours come from, the poll
interval), API keys, news and look. Each key row says what the current
choices use it for, and the bottom of the box explains the row under the
cursor: what it covers, what each choice means and what it costs. Save
writes all of it, plus the watchlist on screen, to the config file. } and { walk the color presets live, z hides the header
and the footer for a tmux pane that carries its own status bar, and r
refreshes prices and the visible data.
Price changes fade back over 900 ms without changing the text's weight or
decoration. The ASCII spinner beside the source runs only while
requests are in progress. The Animations row in settings switches these
effects off live; Save remembers it as [ui] animations = false. With
animations off, a steady * still indicates requests in progress.
The renderer wakes on input and data, with up to 30 frames per second for
short effects and a one-second clock for ages and scheduled work when idle.
RGB themes fade between their explicit colors; the default ANSI theme uses
a brief color highlight and keeps the terminal's palette. On Unix, a valid
Sync terminfo capability enables synchronized frames. Other terminals,
including Windows without that detection, keep ordinary frame output.
[ui] synchronized_output = false disables the extension altogether.
There are good terminal stock tools already. The two you are most likely to be choosing between are tickrs, which is the closest in shape (Rust, ratatui, charts per ticker), and ticker, which is the most widely used and is built around tracking what you own.
The short version: both are built around the price. This one puts the filings and the scored news next to it, and pays for that with no options chain and a simpler idea of a position.
| alphai-tui | tickrs | ticker | |
|---|---|---|---|
| Price charts | candles, line, SMA/EMA, RSI, volume | line, candle, kagi, volume | none |
| Whole watchlist at once | summary grid, table with sparklines | summary pane | quote table |
| News with per-article analysis | yes, and marked on the price chart | no | no |
| SEC Form 4 insider activity | chart and filing stream | no | no |
| Earnings filing reads | yes | no | no |
| Extended hours | price and candles | candles | price |
| Options chain | no | yes | no |
| Positions and P&L | quantity and average price, in a view of its own | quantity and average price | cost-basis lots, groups, currencies |
| Export for scripts | --once text, --json |
no | CSV and JSON |
| Price sources | Yahoo, Finnhub, Alpaca, Tiingo | Yahoo | Yahoo, Coinbase |
| A source that stops answering | cached start, automatic switch | no | no |
| Add or remove a ticker in the app | yes | yes | no |
| Rebindable keys | any action, in the config | vim keys | no |
What they do better. tickrs has an options chain with calls and puts by expiry, which this has nothing to answer with, and a kagi chart if that is how you read price. ticker still has the most complete position tracking of the three: several cost-basis lots per holding, named groups and currency conversion, where this one keeps a single average price per ticker and sums in whatever currency the quotes come back in. If you track lots across currencies, ticker is the one to reach for.
One thing worth knowing. Yahoo rate-limits by IP, and every tool here
depends on it, this one included. Four price sources is the hedge: if
Yahoo starts refusing, s switches to Finnhub, Alpaca or Tiingo without
leaving the app.
Homebrew (macOS and Linux):
brew install makeev/tap/alphai-tuiArch Linux, from the AUR:
paru -S alphai-tui-binDebian and Ubuntu, from the apt repository (amd64 and arm64, Ubuntu 22.04 and Debian 12 or newer):
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://makeev.github.io/alphai-tui-apt/alphai-tui.gpg \
-o /etc/apt/keyrings/alphai-tui.gpg
echo "deb [signed-by=/etc/apt/keyrings/alphai-tui.gpg] https://makeev.github.io/alphai-tui-apt stable main" \
| sudo tee /etc/apt/sources.list.d/alphai-tui.list
sudo apt update && sudo apt install alphai-tuiSingle .deb files, for an install without the repository, are linked from
the repository landing page.
Through x-cmd, which picks whichever of the methods above your system already has:
x install alphai-tuiPrebuilt binaries for macOS, Linux and Windows, no Rust needed:
curl -LsSf https://github.com/makeev/alphai-tui/releases/latest/download/alphai-tui-installer.sh | sh# Windows
powershell -ExecutionPolicy Bypass -c "irm https://github.com/makeev/alphai-tui/releases/latest/download/alphai-tui-installer.ps1 | iex"Archives for every platform, with checksums, live on the releases page.
With a Rust toolchain (1.85+):
cargo install alphai-tuiOr straight from the repository:
cargo install --git https://github.com/makeev/alphai-tuiOr from a clone:
git clone https://github.com/makeev/alphai-tui
cd alphai-tui
cargo run --release -- AAPL MSFT NVDA BTC-USDalphai-tui NVDA AVGO AAPL MSFT META TSLA AMZN GOOGL BTC-USDThe first run opens the settings screen: pick a price source and paste your
AlphAI key (get one free at alphai.io, Account >
API keys). Leave it empty if you only want quotes and charts. Your watchlist
and options persist in the config file, so next time plain alphai-tui works.
alphai-tui --once AAPL # print quotes to stdout and exit (for scripts)
alphai-tui --json AAPL # the same run as JSON, for a status bar
alphai-tui -s finnhub NVDA # explicit source for one run| Flag | Default | Meaning |
|---|---|---|
-s, --source |
yahoo |
Price source: yahoo, finnhub, alpaca or tiingo |
-e, --every |
15 |
Poll interval, seconds (also a settings row, applied live) |
-r, --range |
5d |
History window: 1d 5d 1mo 3mo 6mo 1y 2y |
-i, --interval |
15m |
Candle size: 1m 2m 5m 15m 30m 60m 1d |
--theme |
default |
Color preset, e.g. catppuccin-mocha (also a key and a settings row) |
--bare |
off | Start without the header and footer, for a tmux pane (z toggles it live) |
--once |
Print quotes to stdout and exit | |
--json |
Print those quotes as JSON instead of a text table (implies --once) |
|
--earnings TICKER |
Print the latest earnings read to stdout and exit (needs an AlphAI key; one request) | |
--config |
Use an alternate config file (Save writes back to it) |
-r and -i set the startup window; the t key cycles the preset
combinations (configurable as [chart] presets) for the session without
persisting them.
--json prints one object per symbol, in the order they were asked for, so
a status bar or a cron job can read the numbers instead of parsing a table:
alphai-tui --json AAPL NVDA
alphai-tui --json AAPL | jq -r '.[0] | "\(.symbol) \(.price) \(.change_pct)%"'[
{
"candles": 79,
"change": 11.23,
"change_pct": 3.5612,
"currency": "USD",
"day_range": { "high": 326.68, "low": 316.57 },
"extended": { "change": -1.07, "change_pct": -0.3276, "price": 325.5 },
"fetched": "2026-09-11T09:31:38Z",
"fifty_two_week": { "high": 344.57, "low": 226.65 },
"prev_close": 315.34,
"price": 326.57,
"source": "yahoo",
"symbol": "AAPL",
"volume": 69820744.0
}
]A ticker you hold also carries a position object with qty,
avg_price, cost, price (the price used to value the holding,
including extended trading), value, pnl, and pnl_pct and day_pnl when
those can be worked out, so a status bar can show the money rather than
the price:
alphai-tui --json AAPL | jq -r '.[0].position | "\(.pnl) (\(.pnl_pct)%)"'symbol and price are always there; the rest depends on what the source
answers, and a figure it does not answer is left out rather than sent as
null. change and change_pct count from the previous close, while the
extended object measures its own move from the regular session's close,
the way a broker screen does. A symbol that failed still gets a row, as
{"symbol": "…", "error": "…"}, so a watchlist of four always prints four.
Warnings go to stderr, so stdout stays a valid JSON document.
Without symbols it prints the watchlist you saved in the app, and -s,
-r and -i work the same as for a normal run:
alphai-tui --json # whatever the config file holds
alphai-tui --json -s alpaca AAPL # another source for this one run
# a row per ticker for awk, a spreadsheet or a database
alphai-tui --json | jq -r '.[] | [.symbol, .price, .change_pct] | @tsv'
# append a snapshot to a log you can chart later; every row carries `fetched`
alphai-tui --json | jq -c '.[]' >> quotes.jsonl
# report only what broke, since the exit code is 0 either way
alphai-tui --json | jq -r '.[] | select(.error) | "\(.symbol): \(.error)"'
# watch a level from cron, printing nothing until it breaks
alphai-tui --json NVDA | jq -e '.[0].price > 200' >/dev/null &&
echo 'NVDA above 200'For a status bar, call a small wrapper instead of inlining the pipeline,
because a jq filter quoted inside tmux.conf or an i3blocks config turns
unreadable fast:
#!/bin/sh
# ~/bin/quote-bar
alphai-tui --json AAPL NVDA |
jq -r 'map(select(.error | not)
| "\(.symbol) \(.price) \(.change_pct * 100 | round / 100)%")
| join(" ")'set -g status-interval 60
set -g status-right '#(~/bin/quote-bar)'Dropping the error rows there keeps a dead symbol from writing null into
the bar, and the rounding trims -6.1302 to the two decimals a bar has
room for.
One run costs one request per symbol (two on alpaca; on tiingo one or two for the whole list plus up to three per ticker), so give the loop an interval rather than letting the bar refresh as fast as it likes. Yahoo throttles by IP address and answers a burst with 429s for several minutes afterwards, which is long enough to lose the pane you built. A minute between runs is plenty for a status bar; below that, use a keyed source.
CLI arguments win over the config file; the config file wins over built-in
defaults. API keys can also come from env vars, which win over the config:
ALPHAI_API_KEY, FINNHUB_API_KEY, APCA_API_KEY_ID, APCA_API_SECRET_KEY,
TIINGO_API_KEY.
| Key | Where | Action |
|---|---|---|
Tab / 1..9 |
everywhere | switch view |
↑ ↓ / j k |
table, chart, split | select ticker |
a |
everywhere | add a ticker: type the symbol, Enter adds it, Esc cancels |
d |
everywhere | remove the selected ticker (the last one stays) |
p |
everywhere | set what you hold of the ticker: qty avg, Enter saves it to the config, an empty line clears it |
↑ ↓ / j k |
news, insider | scroll articles |
↑ ↓ / j k |
earnings | scroll the read |
↑ ↓ / j k |
calendar | select event |
← → / h l |
news, insider, earnings | switch ticker |
Enter / o |
news, insider | open article in browser |
Enter / o |
earnings | open the read on alphai.io |
Enter / o |
calendar | open macro source or the company's Earnings view |
v |
news, insider | fullscreen article card; scroll with ↑ ↓, Esc closes |
E |
everywhere | draw pre and post market candles too (Yahoo, Alpaca and Tiingo); says why when there are none |
x |
news | cycle the layout: chart over the list, stacked, or side-by-side |
PgUp PgDn |
news | scroll the article card pane |
PgUp PgDn |
earnings | page through the read |
PgUp PgDn |
calendar | move ten events |
↓ / j on the last row |
news, insider | load the next page of the feed |
f |
news, split | cycle news scope: selected ticker, whole market, trending |
+ / - |
news, insider, split | raise / lower the visible feed's score filter (news: relevance, starts at 7; insider: trade size, starts at 4) |
g |
insider | cycle the trades chart window: 3 months, 12 months, off |
c |
chart, split | toggle candlestick / line chart |
m |
chart, split | toggle the two moving average overlays |
e |
chart, split | average them simple (SMA) or exponential (EMA) |
i |
chart, split | toggle the RSI(14) panel |
b |
chart, split | toggle the volume panel |
n |
chart, split | mark the ticker's cached news on the candles |
t / T |
everywhere | cycle candle interval presets forward / back (each interval with a matching history window; the list is configurable as [chart] presets) |
r |
everywhere | refresh prices and visible data; Calendar refetches macro and retries missing, stale or failed dates |
z |
everywhere | bare mode: hide the header and footer, giving both rows to the view |
} / { |
everywhere | next / previous color preset (session-only until Save) |
s |
everywhere | settings |
? |
everywhere | help overlay: every action with its current keys |
q / Esc / Ctrl-C |
everywhere | quit |
alphai-tui is a single self-contained process, so a terminal multiplexer
(tmux, zellij, screen, or your terminal's own splits) turns it into a
custom trading workspace: run one instance per pane and switch each pane
to the view you want with 1..9.
tmux new-session -d -s market 'alphai-tui --bare NVDA'
tmux split-window -h -t market 'alphai-tui --bare AAPL' # news pane on the right
tmux select-pane -t market -L
tmux split-window -v -t market 'alphai-tui --bare AVGO'
tmux split-window -v -t market 'alphai-tui --bare TSLA'
tmux attach -t market--bare drops the header and the key hints, which a pane with tmux's own
status bar has little use for, and hands both rows to the view; z toggles
it in a running instance and [ui] bare = true makes it the default. The
quote rail stays, so a bare pane still names its ticker and its price.
Tiled panes put frames next to frames, so the shot below also sets
[ui] borders = "none": each panel becomes a tinted surface with a small
gutter and its title above, and the panes read as one desk. The Panels row
in the settings screen switches it live.
Press 4 in the three chart panes and 2 in the tall one, and you get a
wall of charts next to a live scored feed:
Two things the instances share. The config file is one: the last pane to save settings wins, so set things up once and let the other panes just read it. Your AlphAI key's rate budget is the other: every pane showing news or insider data spends requests from the same per-key allowance, so on a free key keep an eye on how many such panes you open.
The same trick turns the terminal into a full trading desk with an AI analyst on staff. Run an agent such as Claude Code in the pane next to alphai-tui and connect it to the AlphAI MCP server, which serves the same news, sentiment and insider data as the dashboard. You watch the tape on one side while the agent digs through whatever the tape surfaces: ask it for the last insider sells and the news that moved the stock this week, and get a sourced brief without leaving the terminal.
Prices
-
yahoo: no API key, intraday quote and history in one request. Timing varies by exchange; extended quotes use the source's timestamps, never the time a response was fetched. Crypto and FX tickers work asBTC-USD,EURUSD=X. Includes extended hours, 52-week range and full market volume. A daily chart may make an additional cached intraday request to timestamp its extended quote.Econtrols which candles are drawn. -
finnhub: needs a key (free at finnhub.io). Real-time-ish quotes; historical candles are premium-only there, so charts build up from quotes collected during the session and reset on restart. Range/interval switching withtdoes not apply to that synthetic history, and candles degrade to flat marks. Free tier is 60 req/min, one request per ticker per poll; the app warns on startup and in the settings screen when the watchlist and the poll interval together go over that. Crypto needs exchange-prefixed symbols (BINANCE:BTCUSDT). Its quote endpoint covers the regular session only, so no 52 week range or volume, and the extended-hours price is borrowed (see "Pre and after hours" below). -
alpaca: needs a key id and secret (free at alpaca.markets). Realtime quotes from the IEX feed plus real historical bars, so charts are complete right after start instead of growing over the session. Crypto works in the usualBTC-USDform. IEX covers one exchange, with sparse pre-market trading from 08:00 ET and after-hours until 17:00 ET on normal days, so by default the extended quote and candles come from consolidated SIP data delayed 15 minutes, then Yahoo if SIP is unavailable or missing the relevant session (see "Pre and after hours" below). Regular candles and the headline quote remain IEX. The chart labels the extended feed, and the rail labels the quote's own source and age. Volume bars from different feeds are not consolidated into a single session; IEX's total is not presented as whole-market volume. Once extended candles are on the chart, regular IEX candles take their volume from the same consolidated bars, so both sessions share one scale. The newest 15 minutes have no volume bar until the delayed feed covers them. An intraday chart with extended hours off shows IEX's own counts and labels themIEX only. Daily charts take the consolidated daily bars whole, so the price range and the volume are the whole market's, while the current day keeps its live IEX close. That costs one request per ticker a minute, on top of the two per poll. If it is refused, the chart keeps IEX's daily bars and labels themIEX only.ALPACA_FEED=delayed_sipuses consolidated data for both regular and extended sessions with a 15-minute delay.ALPACA_FEED=sipuses realtime SIP and requires a paid subscription. The delayed mode usesfeed=delayed_sipfor snapshots andfeed=sipfor historical bars; the client sets the historical end to 15 minutes ago on every subscription. During that lag after the opening bell, today's delayed pre-market quote remains visible until regular data arrives, with its PRE label and age. Getting free keys:- Sign up at alpaca.markets. Email is enough; market data and paper trading need no KYC.
- The free Basic data plan is enabled by default.
- In the dashboard switch the environment to Paper (fine for data), then Home > API Keys > Generate. Copy the Key ID and the Secret; the secret is shown only once.
- Paste both in the settings screen (
s) or exportAPCA_API_KEY_IDandAPCA_API_SECRET_KEY.
Free plan notes: the IEX feed is realtime but thin (roughly 2 to 3 percent of market volume, so charts of illiquid names can be sparse), and the API allows 200 requests/min. The app makes 2 requests per ticker per poll, plus up to 2 per minute for the SIP extended hours when those come from Alpaca. The startup and settings warnings include that allowance when suggesting a polling interval. Changing candle presets can trigger a fresh cache fill. Alpaca sizes a bars page by the minute bars behind it, roughly two weeks of a liquid name's extended hours, so the first fill of a chart window follows up to three more pages to reach the start of the IEX series; later refreshes take the newest page only.
-
tiingo: needs a key from tiingo.com, free or paid. Quotes and intraday bars come from IEX in real time, pre and post market included from 08:00 to 17:30 ET. Daily charts use Tiingo's consolidated end-of-day history, split adjusted, with the whole market's volume. Crypto works in the usualBTC-USDform. Coverage is US stocks, ETFs and mutual funds (funds have daily bars only); listings outside the US, indices and FX are not available here. During the session the price is Tiingo's IEX reference price: since February 2025 IEX's own last trade needs an exchange agreement, and the reference price stays within a few cents of it. IEX's volume is one venue's, so the quote carries none during the day and an intraday chart labels its volumeIEX only. After the close Tiingo publishes the official close and the consolidated volume, and the rail switches to them; with an intraday chart open, the last after-hours price stays beside the close overnight. Before the open and after the bell IEX barely trades, so by default the extended quote comes from the whole market (see "Pre and after hours" below). Withextended_source = "same"it is the IEX price beside the last close, dated by the bar that traded it rather than by the request. One request per poll quotes the whole watchlist, two when crypto is on it. Bars are refreshed once a minute per ticker and daily history every 15 minutes; in between, the live price moves the last candle, and a new candle has no volume bar until the next refresh. The free plan allows 50 requests an hour and 1,000 a day. That covers a couple of tickers polled every few minutes, not a live dashboard: the quote request alone is 240 an hour at the default 15 seconds. The paid Power plan allows 10,000 an hour. A key does not say which plan it is on, so the app does not warn about the budget ahead of time. When an allowance runs out, the error names it, and the automatic switch below moves to another source.
Pre and after hours
IEX, the feed behind alpaca on its free plan and behind tiingo, is one
exchange, and before the open it barely trades: on 30 September 2026 by
08:52 ET Tiingo had one CoreWeave trade of 11 shares at 85.63, while the
whole market had traded 581,000 shares and stood at 87.09. finnhub has
no extended prices at all. So where the premarket and after-hours price
comes from is a setting of its own, extended_source in the config and
the Pre/after hours row in the settings screen:
auto, the default: when the price source sees one exchange or none, the extended quote and candles come from Alpaca's consolidated SIP feed, 15 minutes behind, if Alpaca keys are set, with Yahoo as the backup. Without Alpaca keys they come from Yahoo.yahoo, andalpacaon a SIP feed, keep their own.same: only what the price source reports itself, no extra requests.alpaca: always the consolidated SIP feed, with no Yahoo backup. It needs the Alpaca keys, whatever the price source is.yahoo: always Yahoo, keyless and closer to real time, but subject to its IP blocks.
A borrowed print replaces the source's own whenever it has one for the
session under way, and the rail and the chart title name its feed
(SIP · delayed 15m, Yahoo) and its age. Regular-session prices always
stay the price source's. Borrowing costs about two Alpaca requests or one
Yahoo request per ticker a minute: results are cached for 60 seconds per
ticker and chart window, and an empty or failed refresh keeps the session
already on screen without failing the price poll. A Yahoo IP block pauses
the borrowed Yahoo requests across the watchlist for 30 minutes. Extended
quotes stay available with E off, independently of the candle setting.
When a source stops answering
Every keyless quote feed throttles by IP sooner or later, and Yahoo's blocks are long: measured from one address, the first arrived after about ten requests and held for 19 minutes, the second came after eight and held for over an hour. No client-side retry shortens that, which is why the usual report about tools in this category is that they just stop working. Three things happen here instead:
- Startup is never empty. The last good quotes and candles of every ticker
are kept in
<cache dir>/alphai-tui/quotes.json(~/.cacheon Linux,~/Library/Cacheson macOS), written at most once a minute, and put on screen while the first poll is in flight. The quote rail labels them (cached 2h ago) until live data replaces them, so old prices are never passed off as current. Entries older than a week, or taken with a different range and interval, are ignored rather than drawn. - A
429from Yahoo says what it actually is: an IP block that lasts tens of minutes, with the advice to switch source. It is also the one refusal the client does not retry, since another request only feeds the counter holding the block open. - If every ticker keeps failing for 45 seconds, the app switches to another
source that has its credentials and says so in the footer. It keeps the
rows already on screen, never switches back on its own (probing a
throttled feed is how a block gets extended) and never returns to a
source that failed this session. The header always names the source in
use,
spicks another by hand, andsource_fallback = falsein the config turns the whole thing off.
News, sentiment, insider
- AlphAI: AI-enriched financial news feed. Every
article carries validated tickers, a category, a deterministic 1 to 10
relevance score and a full per-ticker AI analysis (sentiment, price
impact, confidence, novelty, actionability); insider rows are generated
from SEC EDGAR Form 4 filings, one row per economic event. The free tier
(no card) allows 20 requests/min and 100/day. The app is careful with
that budget: news and insider feeds fetch only what the visible view needs
(the trending scope is one extra request), and cache each response for 5 minutes
(
[ui] alphai_ttl_secsin the config changes that), loads further pages only when you ask for them, and the article card reuses data already fetched with the list. The refresh at the end of that cache window asks the server what has arrived since the previous check rather than re-reading the newest page, which costs the same single request, keeps the pages you loaded and the row you are on, and is the only way to see an article that entered the feed behind its own publish time. The relevance filter is applied by the server, so filtered-out articles never occupy page slots; moving it with+/-refetches the visible feed, one request per press at most. The Insider view's rollup and trades chart arrive as one bundle alongside the feed's first page and live in the same cache, so the chart costs no extra requests and thegwindow switch is free. The Earnings view costs one request per ticker, made only while that view is on screen and cached for an hour, because a read is published once a quarter and never changes afterwards. That single response carries the whole history of reads for the ticker and its next confirmed report date, which is also what fills the read shown in the News card, so opening the card still costs nothing. The macro calendar is shared by all views, including the quote-rail flag, and costs one request per six hours by default. Calendar checks company dates using the same earnings response, one company at a time, and keeps them for six hours. These intervals arealphai_ttl_secs * 72; the Earnings view uses* 12. At the minimum setting of 30 seconds, Calendar's interval is 36 minutes, not six hours. Ten companies with Calendar continuously open for 24 hours cost roughly 44 requests at the default TTL, including the macro window. Twenty-five cost roughly 104, before other activity, so a larger list needs a longer TTL. There is no daily quota limiter, and restarting loses these caches. The four-second date-check pace limits this sweep, not other requests or other processes using the key. Manual refresh adds a macro request and any missing, stale or failed company checks. Errors wait for a manual retry; successful cached rows remain visible in Calendar. Feeds page 20 articles at a time, the most every plan allows (50 on Pro keys, detected automatically). Paging back past your plan's archive horizon (30 days on Free, 90 on Basic) shows an upgrade hint instead of older articles. Full API reference: alphai.io/developers.
Ticker forms follow the US/Yahoo convention (AAPL, BTC-USD, VOD.L),
which is also what AlphAI uses. Finnhub-specific symbols like
BINANCE:BTCUSDT will not have news attached.
~/.config/alphai-tui/config.toml on Linux and macOS (%APPDATA% on
Windows), created by the settings screen with mode 0600 since it can hold
keys; --config PATH points at a different file. Saving the settings also
persists the watchlist on screen, and a and d write it straight away. Every key is optional. A misspelled value
in the [ui], [chart], [theme] or [keybindings] sections prints a
warning on startup and keeps that entry's default; only a TOML syntax error
makes the whole file fall back to defaults. The [ui] and [chart] sections set startup
defaults; the session keys (x, f, g, +, -, c, m, i, b, e, n, t)
still change everything live without persisting it:
source = "yahoo"
watchlist = ["AAPL", "MSFT", "NVDA", "BTC-USD"]
every = 15
range = "5d" # startup history window
interval = "15m" # startup candle size; t cycles the chart presets live
news_open = "alphai" # where enter opens news: "alphai" or "original"
source_fallback = true # switch source when this one stops answering
extended_source = "auto" # pre and after hours: auto | same | alpaca | yahoo (also a settings row)
[keys]
alphai = "ak_live_..."
finnhub = ""
alpaca_key_id = ""
alpaca_secret = ""
tiingo = ""
[ui]
default_view = "split" # split | news | table | chart | insider | earnings | summary | portfolio | calendar
quote_rail = true # the price line under the tabs
bare = false # start with no header and no footer (--bare, z)
animations = true # price color fades and refresh spinner; also in settings
synchronized_output = true # use synchronized frames only when terminfo advertises support
news_layout = "chart" # chart | stacked | side (also a row in the settings screen)
news_scope = "ticker" # ticker | market | trending
borders = "rounded" # frame lines: rounded | plain, or none for tinted panels (also a settings row)
news_min_score = 7 # minimum relevance score in news feeds, 1 to 10
insider_min_score = 4 # insider feed filter; the score tracks trade size
insider_chart = "3m" # insider trades chart window at start: 3m | 12m | off
alphai_ttl_secs = 300 # news/sentiment/insider cache lifetime, 30 to 86400
[chart]
style = "candles" # candles | line
sma = true # moving average overlays visible at start
ma_type = "sma" # sma | ema, both using the periods below
rsi = true # RSI panel visible at start
volume = true # volume panel visible at start
extended_hours = true # draw pre and post market candles; Shift+E toggles live
timezone = "exchange" # exchange (ET for US stocks), local, utc
session_shading = true # warm pre-market / cool after-hours backgrounds
time_grid = true # vertical grid shared by price, volume and RSI
news_markers = true # mark the ticker's cached news on the candles
sma_fast = 20 # 2 to 250
sma_slow = 100 # 2 to 250; also sizes the history warm-up
rsi_period = 14 # 2 to 100
right_margin_pct = 20 # free space right of the newest candle, 0 to 50
presets = [ # the combos the t and T keys cycle
["1d", "5m"],
["5d", "15m"],
["1mo", "60m"],
["6mo", "1d"],
["1y", "1d"],
]
# What you hold, one entry per ticker. The p key writes these for you and
# saves them here immediately; editing them by hand works just as well.
# A ticker listed here is polled even when it is not on the watchlist.
[[positions]]
symbol = "AAPL"
qty = 12
avg_price = 182.31
[[positions]]
symbol = "BTC-USD"
qty = 0.25
avg_price = 58200A quantity may be fractional, for crypto or for a broker that sells
slices, and negative for a short, in which case a falling price is a
profit. avg_price is what one unit cost on average: this is not a ledger
and it does not keep lots, so a second buy means updating the average
yourself (or letting p overwrite the line).
[theme] preset swaps in a ready-made palette:
[theme]
preset = "catppuccin-mocha"Each preset on a terminal wearing the matching palette (default on a plain
dark one, since it takes the terminal's own colors):
![]() default |
![]() dracula |
![]() catppuccin-mocha |
![]() catppuccin-macchiato |
![]() catppuccin-frappe |
![]() gruvbox-dark |
![]() nord |
![]() catppuccin-latte |
![]() gruvbox-light |
The panel look is a separate choice. Frame lines are the default (rounded,
or plain); [ui] borders = "none", or the Panels row in the settings
screen, draws tinted panels with a gutter instead:
} and { walk the presets live, --theme catppuccin-mocha picks one
for a single run, and the Theme row in the settings screen (s) does
both: ← → cycle it with a live preview, Save writes it here.
Available: default, catppuccin-mocha, catppuccin-macchiato,
catppuccin-frappe, catppuccin-latte, dracula, gruvbox-dark,
gruvbox-light, nord. Presets are written in hex, so they want a
terminal with 24-bit color. With borders = "none" they tint the panels
one step off the palette's background, the regular session sits on that
tint, and the pre-market and after-hours bands are drawn from it, so the
three stay apart. default uses ANSI foregrounds, no panel tint and
subtle RGB session backgrounds;
session_shading = false preserves a fully transparent chart background. The two
light ones (catppuccin-latte, gruvbox-light) expect a light terminal
background.
pre_market_bg and post_market_bg are the session background slots;
each accepts the same color formats as the foreground slots. Setting either
to "reset" uses the terminal background for that session.
Every color the views draw comes from a named slot, and the optional
[theme] table recolors any of them, over the preset when there is one.
Values are ANSI color names (case-insensitive, light-blue, grey),
#RRGGBB hex, or an ANSI-256 index written as a string like "245". A
bad color, a misspelled slot or an unknown preset prints a warning on
startup and keeps the default; it never breaks the config file. The
defaults are the values shown:
[theme]
accent = "cyan" # header title, active tab, overlay borders, headings
accent_text = "black" # text on the active tab
up = "green" # price up: candles, deltas, sparklines
down = "red" # price down
flat = "gray" # unchanged / no data
pos = "green" # bullish sentiment, insider buys
neg = "red" # bearish sentiment, insider sells
error = "red" # error messages
warn = "yellow" # notices and the editing highlight
score_high = "yellow" # relevance score 8 to 10
sma_fast = "yellow" # fast moving average overlay
sma_slow = "magenta" # slow moving average overlay
rsi_line = "cyan" # RSI line
ref_line = "darkgray" # previous close and RSI 30/70 reference lines
border = "reset" # panel frames; reset keeps the terminal's foreground
text = "reset" # body text on tinted panels; reset keeps the terminal's foreground
subtle = "reset" # sources, ages, axis labels, key hints; reset means the terminal's dim
faint = "reset" # separators and inactive text; reset means the terminal's dim
selection = "reset" # background of the cursor row; reset means reverse video
surface = "reset" # panel background (borders = "none"); reset paints noneThe presets fill the last five from their own palettes: secondary text in
the family's subtext shade, a cursor row that keeps each column's color,
and a panel tint one step off the background. With default they follow
the terminal, which is the only way to stay readable on both a dark and a
light background.
The optional [keybindings] table rebinds any action. An action you list
replaces its default keys entirely; actions you leave out keep theirs. The
value is one key or a list of keys:
[keybindings]
quit = "ctrl-q"
open = ["enter", "w"]
next_preset = "]"
prev_preset = "["A key is written as [ctrl-][alt-][shift-]<base>, where base is a single
character or one of the named keys: esc, enter, tab, backtab,
space, up, down, left, right, home, end, pgup, pgdn,
backspace, delete, insert, f1 to f12. shift- plus a letter
means the uppercase letter (shift-t equals T), and shift-tab equals
backtab.
The actions: quit, next_view, prev_view, settings, help,
refresh, up, down, left, right, page_up, page_down, open,
card, cycle_scope, cycle_layout, score_up, score_down,
insider_chart, chart_style, toggle_sma, toggle_rsi,
toggle_volume, news_markers, ma_type, next_preset, prev_preset,
next_theme, prev_theme, toggle_bare, add_ticker, remove_ticker,
position, extended_hours.
The ? help overlay shows this list with the current keys next to it.
Reserved and never remappable: ctrl-c (force quit), esc, the digits
1 to 9 (view hotkeys), and the keys inside the settings form. A bad or
reserved key, an unknown action, or a key claimed by two actions prints a
warning on startup and falls back safely; the footer always shows the keys
that are actually bound.
The AlphAI response cache (5 minutes), the feed page sizes, the 2 second
poll floor and the chart warm-up factors are fixed. They keep the app a
fair citizen of the free API tiers, and a config knob for them would turn
an innocent-looking file into an abuse vector. ALPACA_FEED,
ALPHAI_API_URL, ALPACA_DATA_URL, YAHOO_CHART_URL and TIINGO_API_URL
stay env-only debug overrides for the same reason.
src/
domain.rs Quote, Candle, TickerData, Range/Interval
config.rs config file load/save (CLI > env > file > defaults)
source/ DataSource trait + implementations
registry.rs the one place a new source registers; CLI, settings and keys derive from it
http.rs shared client builder, JSON fetching and error helpers
yahoo.rs Yahoo v8 chart endpoint (quote + history in one call)
finnhub.rs Finnhub /quote with synthetic session history
alpaca.rs snapshot + real historical bars (IEX/SIP feeds, crypto)
tiingo.rs one IEX quote request per poll, cached IEX bars and daily history, crypto
alphai.rs AlphAI API client + demand-driven fetch task (TTL cache)
keymap.rs semantic actions + the key table (footer hints derive from it)
theme.rs semantic color palette ([theme] overrides)
indicators.rs SMA, EMA and RSI (Wilder smoothing)
poller.rs fetches all symbols concurrently on a timer -> mpsc channel
app.rs App state, event loop, key handling
app/feeds.rs feed cache and every AlphAI request-budget guard
app/settings.rs settings overlay state, rows derived from the registry
ui/ View trait + implementations
table.rs watchlist table
chart.rs candlestick + line chart, SMA overlays, volume and RSI panels
split.rs table + chart
news.rs article list + sentiment rollup + detail pane
insider.rs Form 4 rollup + filing list
insider_chart.rs log-scale trades scatter + weekly dollar bars
earnings.rs structured earnings read + the schedule line
calendar.rs watchlist agenda, report-date progress and event flags
article.rs modal full-article card (AI analysis, context)
settings.rs modal settings overlay
Data flows one way: background tasks (price poller, AlphAI fetcher) push
events over an mpsc channel into App::apply; views are stateless renderers
over &mut App. The UI never blocks on the network, and every AlphAI
request-budget guard lives in one file (app/feeds.rs).
- Implement
source::DataSource(one asyncfetchreturning quote plus candles) in a new module undersrc/source/. The helpers insource/http.rscover the client, JSON fetching and error plumbing. A provider that quotes many tickers in one request can also implementbegin_cycle, which hears the poll's whole symbol list before itsfetchcalls start, and answer all of them from one response (seesource/tiingo.rs). - Append one
SourceInfoentry tosource/registry.rs: id, aliases, a settings hint, the key fields it needs and a constructor. The--sourcehelp and error list, the settings screen rows and picker cycle, config[keys]persistence and env-var overrides all derive from that entry, and the registry tests check it. - Describe the source in this README.
- Implement
ui::Viewas a unit struct in a new module undersrc/ui/: a statelessrenderover&mut App, a newViewIdvariant, a footer hint line, and the capability methods (feed_shown,navigates_articles,has_chart_panel,shows_earnings,shows_calendar) that opt into shared key handling and demand-driven AlphAI fetching. Views never fetch anything themselves. - Add it to
ui::VIEWS. Order in that array defines the tab cycle and the1..9hotkeys; the header pills and the footer hints derive from it.
cargo test # unit + TestBackend rendering tests
cargo clippy --all-targets
cargo fmt --all -- --check
cargo run -- --once AAPL # network smoke test without a TTY
ALPHAI_API_KEY=ak_live_... cargo test live_calendar_smoke -- --ignored # 1 request
ALPHAI_API_KEY=ak_live_... cargo test live_api -- --ignored # 14 requestsCI runs the first three on every push and pull request, on Linux, macOS and Windows. What changed in each release is in CHANGELOG.md.
Issues and PRs are welcome.
MIT. Not investment advice; data comes from third-party sources and can be delayed or wrong. Respect the terms of the data providers you enable.























