Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The release date for version 0.1.0 is set to a future date (2026-03-13). This appears to be a typo. Please correct it to the actual release date.


### 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
62 changes: 25 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]...
Expand All @@ -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:
Expand Down
Loading