Tags: finance, cli, ai-agents, open-source, portfolio-performance
Most personal finance tools are designed for humans staring at screens. Portfolio Performance is a great example — it’s a powerful, open-source desktop application for tracking investments, but all that rich data is locked behind a GUI. If you want to build automated workflows, run analytical scripts, or let an AI agent reason about your portfolio, you’re stuck.
That’s why I built pp-cli — a command-line tool written in Go that queries Portfolio Performance XML files directly from the terminal.
pp-cli reads the same .xml files that Portfolio Performance uses and exposes the data through simple commands:
# Get an overview of your portfolio file
pp -f portfolio.xml info
# List all securities
pp -f portfolio.xml securities
# Show accounts with balances
pp -f portfolio.xml accounts
# Display portfolio holdings
pp -f portfolio.xml portfolios
# View all transactions chronologically
pp -f portfolio.xml transactions
# Validate file integrity
pp -f portfolio.xml validate
Every command supports multiple output formats via the -o flag — table (default), JSON, CSV, and TSV. The JSON output is what makes this interesting for automation.
Here’s the core idea: pp-cli turns an offline portfolio file into a structured data source that any program — including AI agents — can consume.
Consider a typical AI-powered finance workflow:
pp -f portfolio.xml portfolios -o json and gets structured dataThe critical difference from cloud-based finance APIs: your data never leaves your machine. There’s no OAuth dance with a brokerage, no third-party aggregator scraping your bank credentials, no subscription fee. Just a local XML file and a binary.
Any agent framework — whether it’s Claude’s tool use, LangChain, Agno, or a simple script — can integrate pp-cli as a tool:
# Example: pp-cli as a tool definition
{
"name": "query_portfolio",
"description": "Query personal portfolio data from Portfolio Performance",
"commands": {
"holdings": "pp -f portfolio.xml portfolios -o json",
"transactions": "pp -f portfolio.xml transactions -o json",
"accounts": "pp -f portfolio.xml accounts -o json",
"summary": "pp -f portfolio.xml info -o json"
}
}
The agent calls the appropriate command, parses the JSON response, and works with real portfolio data — all without network access to sensitive financial accounts.
pp-cli is intentionally minimal. It does one thing: make Portfolio Performance data accessible from the command line. But that simplicity is the point. It’s a building block.
Here’s what becomes possible when you combine pp-cli with other tools:
The data stays local, the tooling stays open-source, and the workflows stay yours to customize.
Download the latest release for your platform from the GitHub releases page, or build from source with Go 1.21+:
git clone https://github.com/from68/pp-cli.git
cd pp-cli
go build -o pp
Pre-built binaries are available for Linux (amd64/arm64), macOS (Apple Silicon), and Windows.
Point it at your Portfolio Performance XML file and start querying:
pp -f ~/Documents/portfolio.xml info
pp -f ~/Documents/portfolio.xml securities -o json
pp-cli is at version 0.1.1 — the foundation is solid, but there’s room to grow. The immediate focus is on making it the most reliable way to extract data from Portfolio Performance files so that higher-level tools and agents can build on top of it with confidence.
If you’re interested in building finance workflows on top of local portfolio data, contributions and ideas are welcome: github.com/from68/pp-cli