Local Development
For advanced users who want to customize the code, test modifications, or trigger runs manually. Most users don’t need this — GitHub Actions handles everything automatically.
Requirements
- Node.js 22+ — Download
- npm — comes with Node.js
Install
git clone https://github.com/YOUR_USERNAME/richfolio.git
cd richfolio
npm install
Configure
Portfolio (config.json)
cp config.example.json config.json
Edit config.json with your target allocations and current holdings. See Configuration for the full field reference.
API Keys (.env)
cp .env.example .env
Add your API keys. At minimum you need RESEND_API_KEY and RECIPIENT_EMAIL. See API Keys for step-by-step instructions for each service.
Run
# Daily brief — prices + news + AI analysis + email + Telegram
npm run dev
# Intraday alert check — compares vs morning baseline
npm run intraday
# Weekly rebalancing report — prices + allocation drift + email + Telegram
npm run weekly
# Re-analyze single ticker with after-hours price
npm run refresh -- SMH
# Type-check without emitting
npx tsc --noEmit
Check your email and Telegram for the results.