Stock Tracker CLI is a powerful command-line tool that enables easy management of your stock portfolio while providing AI-powered investment analysis. With features like real-time stock data, intelligent insights, and automated email reports, it streamlines investment tracking and helps make informed decisions.
Stock Tracker CLI
A powerful command-line tool designed for comprehensive stock portfolio management, equipped with AI-driven investment analysis. This CLI interface simplifies tracking stock positions and provides real-time insights to enhance investment strategies.
Begin by configuring the necessary API keys to ensure seamless data retrieval and analysis:
# Configure Groq API key for AI analysis
stock-tracker setup-ai
# Configure Alpha Vantage API key for stock data
stock-tracker setup-alpha-vantage
# Configure email settings (optional for sending reports)
stock-tracker setup-email
Obtain Free API Keys:
Add stock positions with ease:
# Add stock positions
stock-tracker add AAPL 10 150.00
stock-tracker add MSFT 5 300.00
stock-tracker add GOOGL 3 2800.00
Quickly generate reports to assess portfolio performance:
# View the portfolio report in the terminal
stock-tracker report
# Obtain AI-powered analysis
stock-tracker ai-report
# Send AI report via email
stock-tracker ai-report --email recipient@example.com
Here is a sample report generated by the Stock Tracker CLI:
Stock Portfolio Report
Generated on: 2025-11-09 10:30:00
╔════════╦══════════╦════════════════╦═══════════════╦════════════╦═════════════════╗
║ Symbol ║ Quantity ║ Purchase Price ║ Current Price ║ Value ║ Gain/Loss (%) ║
╠════════╬══════════╬════════════════╬═══════════════╬════════════╬═════════════════╣
║ AAPL ║ 10.0 ║ $150.00 ║ $178.50 ║ $1,785.00 ║ +$285.00 (+19%) ║
║ MSFT ║ 5.0 ║ $300.00 ║ $385.20 ║ $1,926.00 ║ +$426.00 (+28%) ║
║ GOOGL ║ 3.0 ║ $2,800.00 ║ $2,950.00 ║ $8,850.00 ║ +$450.00 (+5%) ║
╚════════╩══════════╩════════════════╩═══════════════╩════════════╩═════════════════╝
Portfolio Summary:
Total Value: $12,561.00
Total Gain/Loss: +$1,161.00 (+10.2%)
For those preferring containerized solutions, utilize Docker for easy creation and execution:
# Build the image
docker-compose build
# Run one-time report
docker-compose run stock-tracker stock-tracker report
# Schedule reports (daily at 4:30 PM UTC on weekdays)
docker-compose up -d cron
Set up essential variables within a .env file:
GROQ_API_KEY=your_groq_api_key
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key
EMAIL_SMTP_SERVER=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USERNAME=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
EMAIL_RECIPIENT=recipient@example.com
Utilizes various Python packages for enhanced functionality, including click for CLI operations and pandas for data manipulation.
Contributions are encouraged and can be made via Pull Requests. For any issues encountered, kindly report them on the GitHub Issues page.
Stock Tracker CLI provides a streamlined method for managing stock investments while accessing AI-powered market insights, making it an essential tool for investors looking to optimize their portfolios.
No comments yet.
Sign in to be the first to comment.