diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..cb3d471 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,37 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.0] - 2026-03-13 + +### Added + +- Support for multiple portfolios +- Cash position support via `add-cash` / `remove-cash` commands +- Configurable total portfolio currency via YAML +- Pre-market and after-hours pricing surfaced in the dashboard +- Consolidated total across all portfolio currencies +- Configurable price refresh interval +- Interactive TUI dashboard (`dashboard` command) +- Portfolio management exposed through a CLI +- Live market price fetching to value the portfolio +- Persistent portfolio positions across CLI sessions +- Dockerfile for containerised deployment +- Pending status display while initial prices are loading +- Dataclasses for `Position` and `Portfolio` +- CI workflows: sanity checks, conventional commits check, markdown linter +- Pre-commit hooks configuration +- Development tools and CI check script + +### Fixed + +- Guard against worker callback firing after app teardown + +### Changed + +- Renamed `show` command to `dashboard` + +[0.1.0]: https://github.com/igorpaniuk/stonks-cli/releases/tag/v0.1.0 diff --git a/README.md b/README.md index 1c4254e..ca11e53 100644 --- a/README.md +++ b/README.md @@ -15,24 +15,20 @@ Track your investment portfolio directly from the terminal. --- -## Prerequisites +## Installation -- **Python 3.11+** -- **Poetry** — [installation guide](https://python-poetry.org/docs/#installation) -- An internet connection (prices are fetched from Yahoo Finance via - [yfinance](https://github.com/ranaroussi/yfinance)) +**Requirements:** Python 3.11+ ---- +```bash +pip install stonks-cli +``` -## Fetching the project +Or with [pipx](https://pipx.pypa.io/) (recommended — keeps the tool isolated): ```bash -git clone https://github.com/igorpaniuk/stonks-cli.git -cd stonks-cli +pipx install stonks-cli ``` ---- - ## Preparing configuration in YAML format stonks-cli stores your portfolio in a YAML file. By default the file is read @@ -148,15 +144,7 @@ Append the appropriate suffix to the base ticker symbol. --- -## Installing and running the project with Poetry - -### Install dependencies - -```bash -poetry install -``` - -### Usage +## Usage ```text stonks [OPTIONS] COMMAND [ARGS]... @@ -172,40 +160,40 @@ Commands: dashboard Display the current portfolio with live prices and P&L. ``` -#### Add a position +### Show the portfolio + +```bash +# Launch the TUI with the default 5-second refresh +stonks dashboard + +# Refresh prices every 30 seconds +stonks dashboard --refresh 30 +``` + +### Add a position ```bash # Add 10 shares of Apple at $150.00 -poetry run stonks add AAPL 10 150.00 +stonks add AAPL 10 150.00 # Add a non-US stock (ASML on Euronext Amsterdam) -poetry run stonks add ASML.AS 5 680.00 +stonks add ASML.AS 5 680.00 # Use a custom portfolio file -poetry run stonks -p ~/my-portfolio.yaml add NVDA 2 800.00 +stonks -p ~/my-portfolio.yaml add NVDA 2 800.00 ``` When a symbol is added a second time, the quantity is increased and the average cost is recalculated as a weighted average automatically. -#### Remove a position +### Remove a position ```bash # Remove 5 shares (partial close) -poetry run stonks remove AAPL 5 +stonks remove AAPL 5 # Remove all shares (position deleted) -poetry run stonks remove AAPL 10 -``` - -#### Show the portfolio - -```bash -# Launch the TUI with the default 5-second refresh -poetry run stonks dashboard - -# Refresh prices every 30 seconds -poetry run stonks dashboard --refresh 30 +stonks remove AAPL 10 ``` The TUI displays a table with the following columns: