claw-portfolioTrack stock and crypto portfolios with CLI - real-time prices, P&L, dividend tracking, multiple portfolios
Install via ClawdBot CLI:
clawdbot install rsoutar/claw-portfolioA CLI tool for tracking stock and crypto portfolios with real-time prices, P&L, and dividend tracking.
Use this skill when you need to:
This skill provides the following capabilities:
Show all holdings with current values and P&L.
Command:
npx tsx portfolio.ts list
Add a new stock or crypto holding.
Command:
npx tsx portfolio.ts add <symbol> <quantity> <price> <name> [type]
Examples:
npx tsx portfolio.ts add AAPL 10 150 "Apple Inc." stock
npx tsx portfolio.ts add BTC 0.5 45000 Bitcoin crypto
Sell shares using FIFO (First-In-First-Out) cost basis method.
Command:
npx tsx portfolio.ts sell <symbol> <quantity> <price> [date]
Examples:
npx tsx portfolio.ts sell AAPL 5 180 2025-06-01
npx tsx portfolio.ts sell BTC 0.25 50000
View sell history for all holdings or a specific symbol.
Command:
npx tsx portfolio.ts history [symbol]
Examples:
npx tsx portfolio.ts history
npx tsx portfolio.ts history AAPL
Show both realized and unrealized profit/loss.
Command:
npx tsx portfolio.ts pnl
View detailed dividend information for stock holdings including yield, Yield on Cost (YOC), and projected annual income.
Command:
npx tsx portfolio.ts dividends
Show portfolio-level dividend summary: total projected income, weighted average yield, and Yield on Cost.
Command:
npx tsx portfolio.ts dividend-summary
Output includes:
View upcoming ex-dividend dates for your holdings.
Command:
npx tsx portfolio.ts calendar [days]
Examples:
npx tsx portfolio.ts calendar # Next 30 days
npx tsx portfolio.ts calendar 60 # Next 60 days
The list command automatically fetches dividend data. Use --no-dividends flag to skip.
Commands:
npx tsx portfolio.ts list # With dividend info
npx tsx portfolio.ts list --no-dividends # Skip dividends
Remove a holding by symbol.
Command:
npx tsx portfolio.ts remove <symbol>
Show total portfolio value and P&L.
Command:
npx tsx portfolio.ts value
List, switch, or create portfolios.
Commands:
npx tsx portfolio.ts portfolios
npx tsx portfolio.ts switch "Portfolio Name"
npx tsx portfolio.ts create "New Portfolio"
Tip: After running npm link, you can use the shorter portfolio command instead of npx tsx portfolio.ts.
First, install the required dependencies:
npm install
This will install all necessary packages including TypeScript runtime (tsx), Next.js, React, and other dependencies listed in package.json.
Optional: Link the CLI globally for easier access:
npm link
After linking, you can use portfolio instead of npx tsx portfolio.ts .
npm run dev # Start web UI (optional)
npm run build # Build for production
You can also run an optional web interface with full dividend tracking support:
npm run dev
Then open http://localhost:3000
Web UI Features:
Portfolio data is stored locally in data/portfolio.json. The data file is created automatically on first run with an empty portfolio.
Generated Feb 24, 2026
Individual investors can monitor their stock and crypto holdings in real-time, track profit/loss, and manage dividend income. This helps in making informed buy/sell decisions and understanding portfolio performance without relying on external platforms.
Small businesses can use this tool to track company investments in stocks or cryptocurrencies, manage multiple portfolios for different projects, and generate reports for financial planning. It supports dividend tracking for income generation and cost basis calculations for tax purposes.
Financial advisors can utilize this skill to quickly assess client portfolios locally, analyze dividend yields and projected income, and provide personalized recommendations. The CLI allows for efficient data export to CSV for further analysis or reporting.
Educators and students in finance courses can simulate portfolio management, track real-time prices, and learn about dividend calculations and P&L analysis. The web UI offers visual tools for better understanding of allocation and income projections.
Cryptocurrency traders can monitor their holdings, track realized and unrealized gains using FIFO cost basis, and manage multiple portfolios for different strategies. Real-time price updates help in timely decision-making and performance evaluation.
Offer a basic free version with core tracking features and CLI access, then charge for advanced analytics, premium API integrations, or team collaboration tools. Revenue can come from monthly subscriptions or one-time purchases for enhanced web UI features.
License the tool to financial institutions or large businesses for internal use, with custom integrations, enhanced security, and dedicated support. Revenue is generated through annual licensing fees based on the number of users or portfolios managed.
Integrate affiliate links to brokerage platforms or financial services within the tool, and partner with data providers for enhanced market insights. Revenue comes from referral commissions and data licensing agreements with third-party providers.
💬 Integration Tip
Ensure the portfolio.ts file is properly configured and dependencies are installed via npm; use the npm link command for easier CLI access and consider setting up environment variables for API keys if extending functionality.
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends, high-resolution charts (RSI/MACD/BB/VWAP/ATR), plus optional web a...
Become an autonomous prediction market trader on Polymarket with AI-powered analysis and a performance-backed token on Base. Trade real markets, build a track record, and let the buyback flywheel run.
Get cryptocurrency token price and generate candlestick charts via CoinGecko API or Hyperliquid API. Use when user asks for token price, crypto price, price chart, or cryptocurrency market data.
Trade and monitor Hyperliquid perpetual futures. Check balances, view positions with P&L, place/cancel orders, execute market trades. Use when the user asks about Hyperliquid trading, portfolio status, crypto positions, or wants to execute trades on Hyperliquid.