pftui is a local-first portfolio terminal for self-directed investors and technical operators.
It brings together positions, markets, macro, sentiment, news, and analytics in one system, with a fast terminal UI, a browser dashboard, and a structured CLI your AI agent can work with directly.
Why pftui
- One system, not five — portfolio tracking, watchlists, markets, macro, news, and research state in one place
- Local-first by default — your data stays with you, not inside a hosted black box
- Built for daily use — fast, keyboard-driven, and practical enough to live in every day
- Agent-ready — every major feature is accessible through the CLI with structured JSON output
- More valuable over time — the longer you run it, the richer and more useful your local dataset becomes
🚀 Recommended Setup
The easiest way to get started is to let your AI agent set up pftui with you.
Give it this prompt:
Read AGENTS.md in the pftui repo: https://github.com/skylarsimoncelli/pftui
Install pftui, help me set up pftui with my portfolio and watchlist, and walk me through the functionality
If you use Claude Code, Codex, OpenClaw, or another coding agent, it can read AGENTS.md, install pftui, and guide you through the initial setup.
Manual install options are below in Installation.
🧑💻 For Human Operators
Terminal UI
pftui’s core experience is a fast, keyboard-driven terminal interface built for daily portfolio and market monitoring.
| Key | View | What You Get |
|---|---|---|
1 |
Positions | Live prices, daily P&L, allocation bars, sparklines, RSI, 52W range |
2 |
Transactions | Buy/sell history with cost basis tracking |
3 |
Markets | S&P, NASDAQ, BTC, Gold, DXY, VIX, oil, copper |
4 |
Economy | Yields, currencies, commodities, FRED data, economic calendar, prediction markets, F&G |
5 |
Watchlist | Symbols with price targets and proximity alerts |
6 |
News | Aggregated financial news from major feeds |
7 |
Journal | Trade log, decision history, predictions, searchable notes |
Highlights
- Braille charts with SMA overlays, Bollinger bands, volume bars, ratio analysis, and 6 timeframes
- 11 built-in themes including Midnight, Catppuccin, Nord, Dracula, Solarized, Gruvbox, Inferno, Neon, Hacker, Pastel, and Miasma
- Privacy mode with instant value masking and percentage-only operation
- Vim-style navigation with mouse support
Full reference: docs/KEYBINDINGS.md
Web Dashboard
pftui also includes a responsive browser interface backed by the same local data.
Features include:
- responsive desktop and mobile layout
- TradingView charts
- click-through asset views
- auto-refreshing data
- all native TUI themes
- REST API endpoints for integrations
Details: WEB_DASHBOARD.md
🤖 For AI Agents
pftui gives AI agents structured access to the same system the human operator uses.
Your agent can refresh market data, inspect portfolio state, manage watchlists, record journal entries, review macro conditions, and generate briefs, all through a local database and a CLI with structured JSON output.
That makes pftui a strong foundation for:
- daily and weekly portfolio briefs
- automated monitoring and alerts
- scenario tracking
- research workflows
- multi-agent financial systems
Core commands
Portfolio Management
📦 Installation
Recommended: use the install script. Re-running it upgrades pftui while preserving your local data and config.
|
Homebrew (macOS & Linux)
Cargo
Docker
Debian / Ubuntu
|
&&
Fedora / RHEL
Nix
From Source
&&
In Practice
A quick look at pftui across the terminal UI, web dashboard, analytics views, and CLI.
Architecture
pftui is built as a four-layer intelligence stack. Each layer builds on the one below it, and the database sits at the centre as shared state for everything.
Data Aggregation Engine
One pftui data refresh pulls from 10+ data sources, caches everything locally, and runs pre-processing on top of the raw data. By the time anything else reads from the database, the heavy numerical work is already done.
What it collects: Equity/crypto/commodity/forex prices across 84 symbols. CFTC Commitments of Traders positioning. COMEX gold and silver warehouse inventory. BLS economic data (CPI, NFP, unemployment, wages across 101 series). World Bank structural indicators for 8 economies. Polymarket prediction market odds. Crypto and traditional Fear and Greed indices. Economic calendar events. Financial news from 10+ RSS feeds and Brave Search. BTC on-chain data and ETF flows.
What it computes: RSI, MACD, SMA, and Bollinger Bands across all symbols. Rolling cross-asset correlation matrices. Market regime classification (risk-on, risk-off, transition) with confidence scoring. Daily change detection and threshold alerts. FX normalization for multi-currency portfolios. Prediction market probability shifts.
This pre-processing is important. The Analytics Engine does not re-derive technicals from raw price data. It reads pre-computed RSI from the database and asks the higher-order question: what does RSI 89 on oil mean given the current war scenario? The aggregation layer handles compute. The analytics layer handles interpretation.
No API keys required for core sources. Optional Brave Search API unlocks additional news, economic data, and research queries. See docs/DATA-AGGREGATION.md for full source catalog and pipeline details.
Every data source works out of the box with no API keys:
| Source | Data | Update Cadence |
|---|---|---|
| Yahoo Finance | Equities, ETFs, forex, crypto, commodities | Real-time |
| CoinGecko | Crypto prices, market cap, volume | Real-time |
| Polymarket | Prediction market probabilities | 15-min |
| CFTC Socrata | Commitments of Traders (COT) positioning | Weekly |
| Alternative.me | Crypto Fear & Greed Index | Daily |
| BLS API v1 | CPI, unemployment, NFP, wages | Monthly |
| World Bank | GDP, debt/GDP, reserves for 8 economies | Quarterly |
| CME Group | COMEX gold/silver inventory | Daily |
| Blockchair | BTC on-chain data | Real-time |
| RSS Feeds | Reuters, CoinDesk, Bloomberg, Kitco, CNBC | 10-min |
Optional API keys unlock additional sources (Finnhub, FRED, Alpha Vantage). See docs/API-SOURCES.md.
Database
The database is not a passive store. It is the shared state layer that every other layer reads from and writes to. The aggregation engine writes price caches, sentiment data, and economic indicators. The analytics engine writes scenarios, convictions, and regime classifications. The AI layer writes agent messages, daily notes, and predictions. Every layer's output becomes queryable input for every other layer.
SQLite by default, PostgreSQL for production. Your choice. Both are first-class backends with full feature parity.
Day 1: A snapshot of prices, sentiment, positioning, and economic data.
Day 30: A month of cross-asset price history, weekly COT shifts, and sentiment trends.
Day 300: A proprietary dataset covering daily OHLCV across every asset class, CFTC positioning history, COMEX inventory trends, sentiment cycles, and prediction market accuracy. The kind of data trading desks pay six figures for.
You own this data completely. No cloud sync. No third-party accounts. The longer you run pftui, the more valuable it becomes.
Multi-timeframe Analytics Engine
The core differentiator. Four intelligence layers operating simultaneously across different time horizons. Each uses different data, updates at different frequencies, and produces different signals.
- LOW (hours to days) tracks what is happening right now. Prices, volatility, sentiment, regime classification, correlations, calendar events, and triggered alerts. Updated every refresh cycle. Signal type: tactical.
- MEDIUM (weeks to months) tracks which narratives are winning. Macro scenarios with probabilities, versioned thesis sections, conviction scores per asset, research questions with evidence, economic data, and user predictions with accuracy scoring. Updated daily. Signal type: directional.
- HIGH (months to years) tracks the structural forces reshaping markets. Multi-quarter trends like AI disruption, nuclear renaissance, and commodity supercycles. Each trend has a direction, evidence log, and per-asset impact mapping. Updated weekly or on significant evidence. Signal type: thematic.
- MACRO (years to decades) tracks where we are in the big cycle. Empire lifecycle analysis with power metrics across 8 dimensions, structural cycles with stage tracking, long-term outcome probabilities, and historical parallels with similarity scoring. Updated weekly. Signal type: structural.
Signals flow upward through the layers. A correlation break in LOW gets escalated to MEDIUM, which investigates whether it represents a scenario shift. A scenario shift in MEDIUM feeds evidence to a HIGH trend. Context flows downward. MACRO's assessment of the current empire cycle stage constrains how MEDIUM weights its scenarios, which constrains how LOW interprets short-term moves.
When all four layers agree on an asset, that is the highest conviction signal in the system. When they diverge, that divergence is the investigation worth doing.
See the full documentation: docs/ANALYTICS-ENGINE.md
AI Agentic Layer
pftui is truly agent-native. It was written by AI, beta-tested by AI, and it has been built in public through a feedback loop of agents suggesting fixes and enhancements to other agents which then ship them.
As such, pftui can be operated intuitively by your agent. The repository is fully populated with agentic docs that will assist your agent in bootstrapping a local pftui instance for you, integrating your own personal risk tolerances, time preferances, asset watchlists and portfolio holdings. pftui works best when driven by an always-running autonomous agent, though it can also be driven by session-based assistants.
Every feature in pftui has a CLI command with --json output. Agents use the same database, same commands, and same analysis frameworks that humans do. The result is genuine bidirectional intelligence where both operators contribute to a shared understanding.
Bidirectional communication. Your agent does not just read your data. It contributes to it. Agents update scenario probabilities, log evidence against research questions, set conviction scores, and write daily notes. You review what the agent wrote, adjust where you disagree, and the system incorporates both perspectives. The ongoing dialogue between human conviction and agent analysis is the most valuable output.
Scheduled routines. Morning briefs, market close summaries, weekly reviews, scenario analysis, feedback loop optimization. All cron-driven, all reading from and writing to the same database. Multiple agents can coordinate through pftui agent message, a structured message bus with priority levels, analytics layer tags, and acknowledgment tracking.
Investor Perspectives Panel. Feed your analytics engine data to sub-agents prompted as famous investors. Warren Buffett, Ray Dalio, Stanley Druckenmiller, Michael Burry, and 21 others. Each interprets the same data through a fundamentally different investment philosophy. The consensus tells you where conviction is strongest. The divergence tells you where the interesting questions are.
&&
See the full AI layer guide: docs/AI-LAYER.md and agent operator guide: AGENTS.md
🏗️ Built With
pftui is built in Rust as a fast, single-binary application.
It uses:
- ratatui for the terminal UI
- SQLite by default, with PostgreSQL support via
sqlx - Actix-web for the web dashboard
- TradingView Widget for interactive web charts
No Node required. No Python required. No Docker required.
🗺️ Roadmap
- Configurable homepage (portfolio-first vs watchlist-first)
- Full chart search for any symbol (
/→ chart → quick-add) - Portfolio scenario engine (what-if modeling)
- Enhanced correlation and risk analytics
- Broader economic calendar and event intelligence
Full roadmap: TODO.md · Feature specs: docs/ANALYTICS-SPEC.md
📖 Documentation
| Document | Description |
|---|---|
| PRODUCT-VISION.md | What pftui is, who it's for, and where it's going |
| PRODUCT-PHILOSOPHY.md | Core beliefs, design decisions, and what pftui will never be |
| AGENTS.md | Agent operator guide, setup, workflows, integration patterns |
| CLAUDE.md | Development guide for AI coding agents |
| docs/ARCHITECTURE.md | Code architecture, file map, line ranges |
| docs/DATA-AGGREGATION.md | Data ingestion pipeline and source-unification model |
| docs/ANALYTICS-SPEC.md | Feature specifications |
| docs/AI-LAYER.md | Agent operating model and multi-agent workflows |
| docs/API-SOURCES.md | Free data source reference |
| docs/MIGRATING.md | Backend migration guide (SQLite/PostgreSQL) |
| docs/BACKEND-PARITY.md | Backend parity scope + verification/signoff runbook |
| docs/DISTRIBUTION.md | Snap/AUR/Scoop/Homebrew distribution runbook |
| docs/KEYBINDINGS.md | Full keyboard shortcut reference |
| docs/VISION.md | TUI design principles and quality bar |
| WEB_DASHBOARD.md | Web dashboard setup and API reference |
| TODO.md | Development backlog |
| CHANGELOG.md | Release history |
🤝 Contributing
Issues and PRs welcome. If you use pftui and have ideas, open an issue.
📝 License
MIT, do whatever you want with it.