Skip to content

Releases: igoropaniuk/stonks-cli

stonks-cli v0.6.2

15 Apr 20:44
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Fixed

  • stonks doctor no longer fails on clean installs: replaced the
    packaging.version import (not a declared dependency) with an inline
    tuple-based version comparison.

stonks-cli v0.6.1

14 Apr 07:22
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Added

  • stonks doctor command: 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 -p flags to check several portfolios at once.
  • Homebrew installation: stonks-cli is 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.sh resumability: --from-step N skips already-completed
    steps; --skip-checks bypasses working-tree and branch guards for
    hotfix releases.

stonks-cli v0.6.0

12 Apr 07:58
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Added

  • Portfolio backtesting: press b on 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; a Makefile now 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

05 Apr 17:51
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Added

  • stonks demo command: launches the TUI with a sample portfolio created in
    the system temporary directory; the default portfolio is never touched.
  • stonks import ibkr command: bulk-import positions from an Interactive
    Brokers Flex Query CSV export (multi-section and plain CSV formats
    supported).
  • News feed panel in the dashboard (n to toggle) with per-symbol headlines
    sourced from Yahoo Finance.
  • stonks feed SYMBOL command: print latest news articles to stdout.
  • stonks detail SYMBOL command: print a financial summary to stdout.
  • AI chat screen (c key) backed by OpenAI with portfolio and news context.
  • Interactive candlestick chart screen (g key 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.
  • f key 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.py and table_columns.py
    consolidated into portfolio_table.py.
  • Column weight definition (TABLE_COL_WEIGHTS) moved to portfolio_table.py
    alongside TABLE_COLUMNS so all table schema lives in one place.

stonks-cli v0.4.2

30 Mar 15:22
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

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 show now correctly displays the session badge (PRE/AH/CLS) next
    to the last price.
  • q key 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.py split into focused modules
    (crypto_fetcher.py, stock_detail.py, exchanges.py, market.py)
    for easier navigation and testing.
  • app.py action handlers extracted into dedicated helper modules; form
    dialogs moved to forms.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 Session enum used consistently
    across the fetcher, TUI, and CLI.
  • All market-data passed around as a single MarketSnapshot object instead
    of several separate dictionaries.

stonks-cli v0.4.1

28 Mar 13:21
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

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 add and add-cash commands now raise a clean ClickException on
    an internal lookup failure instead of crashing with a raw AssertionError
    traceback.
  • CoinGecko coin-list cache (_cg_symbol_to_id) is now guarded with a
    threading.Lock using double-checked locking, preventing a race condition
    when two refresh threads start simultaneously.
  • PackageNotFoundError from importlib.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

27 Mar 07:17
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Added

  • stonks show command -- 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: crypto are priced via the CoinGecko public API (no key
    required). New asset_type and external_id fields on positions and
    watchlist entries; a bundled 11 000+ entry coin map covers most symbols
    without a runtime API call. Set COINGECKO_DEMO_API_KEY for 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 L in the dashboard to open the current
    log file in a full-screen TUI view without leaving the app.
  • --log-level CLI option -- control logging verbosity at startup
    (DEBUG, INFO, WARNING, ERROR; default: WARNING).
  • Per-process log file -- each stonks instance writes to
    stonks.<pid>.log in the platform log directory so concurrent instances
    never contend on the same file. Files older than 30 days are removed
    automatically at startup.
  • asset_type dropdown and external_id input added to the Add/Edit
    position and watchlist forms in the TUI.

Fixed

  • CLS session 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.
  • TypeError in fetch_previous_closes caused 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

23 Mar 20:39
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

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

19 Mar 20:14
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

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-plotext dependency for terminal-native line and bar charts.
  • Watchlist support: new watchlist section 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/r keyboard 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 leak curl_cffi HTTP sessions. All download calls
    now pass threads=False to 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

16 Mar 20:02
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Fixed

  • Non-US tickers (e.g. 6758.T, 7203.T) always showing no session label
    despite being outside trading hours. fetch_extended_prices now derives the
    session from the current wall-clock time via current_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 subscriptable crash when fetching
    prices for illiquid or delisted tickers (e.g. KSG.WA) via the individual
    fallback path. TypeError is now caught alongside ValueError, KeyError,
    and AttributeError in fetch_price_single.
  • Unhandled crash in fetch_extended_prices when the batch contains a mix of
    equity and forex tickers. yf.download() internally calls pd.concat(),
    which raises ValueError (or TypeError) 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 showing PRE or
    AH outside trading hours. Non-US exchanges do not offer extended-hours
    trading via yfinance, so current_session() now returns CLS whenever
    the wall-clock time falls outside regular session hours for any exchange
    that does not have extended_hours enabled. Only US exchanges (NASDAQ,
    NYSE, Arca, CBOE, OTC) retain the PRE/AH labels.