TFP is a command-line Python app that reads a plan.json financial plan and generates a self-contained report.html.
This workflow is designed for collaborating with an AI agent:
- You and the AI agent edit
plan.json. - TFP regenerates
report.html. - You refresh the browser to see updates.
- Ensure Python 3.10+ is installed.
- From the repo root, run:
python3 -m tfp plan.json --serverBy default this:
- Writes/updates
report.html - Serves it at
http://127.0.0.1:8000/report.html - Watches
plan.jsonfor changes and regenerates the report automatically
Use this loop:
- Ask the AI agent to update
plan.json(accounts, income, expenses, taxes, assumptions, etc.). - Save the file.
- TFP detects the change and rebuilds the report.
- Refresh your browser to review the updated charts/tables.
- Repeat until the plan looks right.
Example prompts for the AI agent:
- "Increase annual salary to 180000 and extend retirement date to 2040-06."
- "Add a Roth conversion of 40000/year from 2030-01 to 2037-12."
- "Lower inflation to 2.5% and rerun assumptions."
python3 -m tfp plan.json --server --mode deterministic --port 8000 --watch-interval 0.5Useful flags:
-o, --output: output HTML filename/path (default:report.html)--host: server bind host (default:127.0.0.1)--port: server port (default:8000)--watch-interval: polling interval in seconds (default:1.0)--mode: override simulation mode (deterministic,monte_carlo,historical)
Validate only:
python3 -m tfp plan.json --validateGenerate once without server mode:
python3 -m tfp plan.json -o report.html- If startup fails with validation errors, fix the reported JSON paths in
plan.jsonand rerun. - If
--serveris running but the browser is stale, refresh the page. - If the port is in use, pick another one (for example
--port 8001).