fitr
v0.2.0
Published
Financial Investment Tracker
Maintainers
Readme
Investment Portfolio Tracker
A command-line tool for tracking your investment portfolio built with TypeScript and Node.js.
Requirements
- Node.js 18 or higher
- npm 8 or higher
Features
- Track positions in stocks, ETFs, crypto, and other assets
- Fetch real-time prices from Yahoo Finance API
- Store historical price data for each asset
- Calculate performance metrics (gain/loss, percentage changes)
- View your portfolio online or offline
Installation
Option 1: Install from npm (Recommended)
npm install -g fitrOption 2: Local Development Setup
git clone https://github.com/adimoldovan/fitr.git
cd fitr
npm install
npm run build
npm linkUsage
Run fitr to start the program. The following commands are available:
Quick Start
Here's a simple workflow to get started:
- Install the tool:
npm install -g fitr - Add your first transaction:
fitr transaction add - View your portfolio:
fitr - Sync latest prices:
fitr -s
Main Commands
fitr: Display your portfolio summary-s, --sync: Fetch and update historical price data for all assets and calculate portfolio performance-g, --growth-rate <rate>: Set the expected annual growth rate for portfolio predictions (default: 0.07)-p, --skip-prediction: Hide the prediction table-v, --verbose: Enable verbose logging mode-D, --dev-data: Use development data directory--help, -h: Display help information
Transaction Management
fitr transaction add: Add a new transaction--help, -h: Display help information
fitr transaction list: List transactions-s, --symbol <symbol>: Filter transactions by asset symbol--help, -h: Display help information
Data Structure
The portfolio tracker stores all data in JSON files in your home directory or iCloud Drive for MacOS:
config.json: Configuration fileportfolio.json: Contains the main portfolio summary with all assets and their latest valuesprices/{SYMBOL}.json: Historical prices for each assettransactions/{SYMBOL}.json: Transactions data for each assetcurrency.json: Currency exchange rates cache
When using the -D, --dev-data flag, data is stored in the data/ directory of your current working directory instead.
Uninstall
npm uninstall -g fitr