Releases: igoropaniuk/stonks-cli
Releases · igoropaniuk/stonks-cli
stonks-cli v0.6.2
Immutable
release. Only release title and notes can be modified.
Fixed
stonks doctorno longer fails on clean installs: replaced the
packaging.versionimport (not a declared dependency) with an inline
tuple-based version comparison.
stonks-cli v0.6.1
Immutable
release. Only release title and notes can be modified.
Added
stonks doctorcommand: run environment health checks before opening the
TUI. Verifies Python version, installed version vs. latest PyPI release,
portfolio file integrity, yfinance and CoinGecko API connectivity, live
forex rates, NYSE calendar availability, and each portfolio symbol.
Reports OK / WARN / FAIL per check; exits with code 1 if any hard check
fails. Supports multiple-pflags to check several portfolios at once.- Homebrew installation:
stonks-cliis now available via
brew tap igoropaniuk/tap && brew install stonks-cli.
Fixed
- Images and links in the PyPI package description now use absolute GitHub
URLs so they render correctly on the project page. make_release.shresumability:--from-step Nskips already-completed
steps;--skip-checksbypasses working-tree and branch guards for
hotfix releases.
stonks-cli v0.6.0
Immutable
release. Only release title and notes can be modified.
Added
- Portfolio backtesting: press
bon any portfolio to simulate its historical
growth against a benchmark (default: SPY), with configurable start year,
initial amount, annual cashflows, and rebalancing strategy. Backtest
results screen shows CAGR, Sharpe ratio, max drawdown, best/worst
year, and an annual returns chart for both the portfolio and benchmark.
Changed
- Build tooling migrated from Poetry to
uv; aMakefilenow provides
unified targets (make check,make test,make format) used by CI,
pre-commit hooks, and local development alike. - Internal refactoring
- Public API cleanup: leading underscores removed from cross-module types and
screen classes (RowMeta,TuiRowData,to_tui_rows,ROW_KIND_LABELS,
form screen classes).
stonks-cli v0.5.0
Immutable
release. Only release title and notes can be modified.
Added
stonks democommand: launches the TUI with a sample portfolio created in
the system temporary directory; the default portfolio is never touched.stonks import ibkrcommand: bulk-import positions from an Interactive
Brokers Flex Query CSV export (multi-section and plain CSV formats
supported).- News feed panel in the dashboard (
nto toggle) with per-symbol headlines
sourced from Yahoo Finance. stonks feed SYMBOLcommand: print latest news articles to stdout.stonks detail SYMBOLcommand: print a financial summary to stdout.- AI chat screen (
ckey) backed by OpenAI with portfolio and news context. - Interactive candlestick chart screen (
gkey on any equity or watchlist
row): zoomable OHLC chart with pre/post-market session badges, bid/ask
overlay, and automatic history prefetch when scrolling to the edges. fkey in the dashboard opens the stock detail screen for the selected row
(same as pressing Enter, now also available without leaving the keyboard row).- Absolute daily price change column ("Daily Chg") displayed alongside the
percentage column ("Daily Chg %"); both are suppressed for closed-session
tickers. - Dashboard table columns now stretch to fill the full terminal width and
reflow proportionally on every resize; horizontal scrolling eliminated. - Empty portfolios now open the TUI and show "No positions yet.
Press 'a' to add your first position." instead of exiting immediately. - Adding a position via the TUI now triggers an immediate market data refresh
so the new symbol's price appears without waiting for the next interval. - Form dialogs (add/edit position, watchlist, cash) now confirm on Enter and
auto-focus the first actionable widget when opened.
Fixed
- Detail screen (
stonks detail/ row selection in TUI) now shows its own
footer bindings only; dashboard bindings (a, e, r, l, n, c) no longer
bleed through. Same fix applied to the log viewer and chat screens. - Detail screen footer now shows scroll bindings (up/down/pageup/pagedown).
- Cash position order is now preserved when editing an existing cash entry.
Changed
- Internal refactor: shared helpers (
helpers.py) and cross-module messages
(messages.py) extracted;table_rows.pyandtable_columns.py
consolidated intoportfolio_table.py. - Column weight definition (
TABLE_COL_WEIGHTS) moved toportfolio_table.py
alongsideTABLE_COLUMNSso all table schema lives in one place.
stonks-cli v0.4.2
Immutable
release. Only release title and notes can be modified.
Fixed
- Detail screen charts now show period-appropriate x-axis labels (days for
1 Day, months for 1 Month, years for 5 Years) and rounded y-axis ticks. stonks shownow correctly displays the session badge (PRE/AH/CLS) next
to the last price.qkey in the detail screen now closes the view even when a scroll widget
has focus.- Multi-portfolio dashboard layout no longer clips rows at the bottom.
- Detail screen no longer crashes when a background data fetch completes
after the screen has already been dismissed.
Changed
- Large internal refactor:
fetcher.pysplit into focused modules
(crypto_fetcher.py,stock_detail.py,exchanges.py,market.py)
for easier navigation and testing. app.pyaction handlers extracted into dedicated helper modules; form
dialogs moved toforms.py.- Shared view-model layer introduced so the TUI dashboard and
stonks show
command build rows from the same data source. - Market session constants replaced with a
Sessionenum used consistently
across the fetcher, TUI, and CLI. - All market-data passed around as a single
MarketSnapshotobject instead
of several separate dictionaries.
stonks-cli v0.4.1
Immutable
release. Only release title and notes can be modified.
Added
- Error status bar in the TUI -- add and edit operations now surface
validation and duplicate-entry errors in a dedicated error bar below the
status line. The bar is hidden by default and cleared automatically after
a subsequent successful operation.
Fixed
- Price refresh exceptions (e.g. network errors in
build_market_snapshot)
are now caught in the worker thread, logged at ERROR level with a full
traceback, and shown to the user via the error bar instead of being
silently swallowed. - CLI
addandadd-cashcommands now raise a cleanClickExceptionon
an internal lookup failure instead of crashing with a rawAssertionError
traceback. - CoinGecko coin-list cache (
_cg_symbol_to_id) is now guarded with a
threading.Lockusing double-checked locking, preventing a race condition
when two refresh threads start simultaneously. PackageNotFoundErrorfromimportlib.metadata.version()is handled in
__init__.py; source checkouts without installed package metadata now fall
back to"0.0.0.dev"instead of making the package unimportable.
stonks-cli v0.4.0
Immutable
release. Only release title and notes can be modified.
Added
stonks showcommand -- one-shot portfolio snapshot with live prices
printed to stdout; supports multi-portfolio headers, session badges
(PRE/AH/CLS), Daily chg, and a Total line in the base currency.
Contributed by @MrCry0.- Cryptocurrency support -- positions and watchlist items with
asset_type: cryptoare priced via the CoinGecko public API (no key
required). Newasset_typeandexternal_idfields on positions and
watchlist entries; a bundled 11 000+ entry coin map covers most symbols
without a runtime API call. SetCOINGECKO_DEMO_API_KEYfor higher rate
limits. - Daily % change column -- shows intraday gain/loss vs. the previous
close for every position and watchlist row; green for gains, red for
losses; suppressed (--) for closed sessions. - Log viewer screen -- press
Lin the dashboard to open the current
log file in a full-screen TUI view without leaving the app. --log-levelCLI option -- control logging verbosity at startup
(DEBUG,INFO,WARNING,ERROR; default:WARNING).- Per-process log file -- each
stonksinstance writes to
stonks.<pid>.login the platform log directory so concurrent instances
never contend on the same file. Files older than 30 days are removed
automatically at startup. asset_typedropdown andexternal_idinput added to the Add/Edit
position and watchlist forms in the TUI.
Fixed
CLSsession label now shown correctly for non-trading tickers (e.g.
crypto outside market hours); daily change is suppressed for closed
sessions instead of showing a stale value.TypeErrorinfetch_previous_closescaused by mixing tz-aware and
tz-naive datetime objects when building the lookback window.- Watchlist and position rows are now correctly distinguished in the
edit/remove TUI handlers. - Log messages in the fetcher reformatted for improved readability
(symbols logged without extra quoting, list reprs replaced with joined
strings).
stonks-cli v0.3.1
Immutable
release. Only release title and notes can be modified.
Fixed
- Dashboard can now open successfully for portfolios that contain only
watchlist items and no held positions. - Default dashboard refresh interval increased to 60 seconds to reduce
unnecessary polling and lower the risk of hitting upstream rate limits. - Non-ASCII typographic symbols introduced by editors or copied rich text were
replaced with ASCII-safe equivalents across repository text and UI strings.
Changed
- CI and pre-commit now run a Unicode normalization check that flags common
LLM-style non-ASCII symbols and invisible whitespace before changes are
accepted.
stonks-cli v0.3.0
Immutable
release. Only release title and notes can be modified.
Added
- Stock detail screen: press Enter on an equity row to open a full-screen
detail view for the selected ticker, showing:- Performance overview (YTD, 1Y, 3Y, 5Y trailing returns vs S&P 500)
- Price charts for multiple periods (1 Day, 1 Month, 1 Year, 5 Years)
- Financial summary (Previous Close, Open, Bid/Ask, Day's Range, 52-Week
Range, Volume, Market Cap, P/E, EPS, Earnings Date, Dividend, etc.) - Earnings trends: EPS actual vs estimate bar chart with next-quarter
estimate, and Revenue vs Net Income quarterly chart - Analyst insights: price targets, recommendation key, and stacked bar chart
of analyst recommendations by month - Statistics: valuation measures and financial highlights
- Full company/fund name displayed below the detail screen header.
textual-plotextdependency for terminal-native line and bar charts.- Watchlist support: new
watchlistsection in the portfolio YAML for
tracking tickers without holdings. Watchlist rows appear in the dashboard
with dimmed styling, show live prices only, and are excluded from the
portfolio total. - Add/edit/remove watchlist items via
a/e/rkeyboard shortcuts with a
symbol-only form dialog.
Fixed
- Cursor position preserved after table refresh.
- Currency preserved when adding shares to an existing position.
- macOS "Too many open files" crash:
yf.download()internally spawns
thread-pool workers that leakcurl_cffiHTTP sessions. All download calls
now passthreads=Falseto reuse a single session, a non-blocking lock
prevents overlapping refresh cycles, and the exchange-name worker pool is
reduced from 8 to 2.
Changed
- Column headers are now clickable to sort rows.
- Add/edit/remove positions via keyboard shortcuts (a/e/r).
- Tab shortcut shown in the footer status bar.
stonks-cli v0.2.1
Immutable
release. Only release title and notes can be modified.
Fixed
- Non-US tickers (e.g.
6758.T,7203.T) always showing no session label
despite being outside trading hours.fetch_extended_pricesnow derives the
session from the current wall-clock time viacurrent_session()rather than
the yfinance bar timestamp, which is always within regular hours for exchanges
that have no extended-hours data. TypeError: 'NoneType' object is not subscriptablecrash when fetching
prices for illiquid or delisted tickers (e.g.KSG.WA) via the individual
fallback path.TypeErroris now caught alongsideValueError,KeyError,
andAttributeErrorinfetch_price_single.- Unhandled crash in
fetch_extended_priceswhen the batch contains a mix of
equity and forex tickers.yf.download()internally callspd.concat(),
which raisesValueError(orTypeError) when tz-aware daily forex bars
are concatenated with tz-naive minute equity bars. The exception is now
caught so the fetch falls back gracefully to the tier-2/tier-3 paths. - Non-US tickers (e.g.
6758.T,IWDA.AS) incorrectly showingPREor
AHoutside trading hours. Non-US exchanges do not offer extended-hours
trading via yfinance, socurrent_session()now returnsCLSwhenever
the wall-clock time falls outside regular session hours for any exchange
that does not haveextended_hoursenabled. Only US exchanges (NASDAQ,
NYSE, Arca, CBOE, OTC) retain thePRE/AHlabels.