PowerTree
Electronic circuit power tree analysis — a fully offline desktop app for budgeting power from source to load with min/typ/max corners, margin analysis, a live flowchart, and report-grade exports (PDF / HTML / Excel / CSV / PNG).
— PySide6 · Windows-first · no accounts, no internet.
pip install powertree
powertree-gui :: desktop app (opens with a Zynq demo board)
powertree --help :: full CLI
| Heat map (power draw) | Block designer (custom pins/size) |
|---|---|
What it does
- Projects hold many power trees (
.ptproj, versioned JSON, self-contained). - Elements: one Source per tree (V min/typ/max + current or power limit), Converters (efficiency %, Vout corners, quiescent current, optional output limit, pass-through output rail for sub-loads), Loads (current- or power-type, typ/peak value, allowed input-voltage window for margin checks), Series elements (resistance, bounded so the math never breaks). Every element carries the same metadata: name, signal name, ref des, part number, pin(s), datasheet link, notes.
- Blocks group elements visually (e.g. one IC with Icc + Iq loads) and show aggregate power.
- Bottom-up solver, auto-refresh: every edit re-solves all three corners (damped fixed-point for series-R × power-load interaction) and repaints instantly.
- Margin analysis: source/converter limit usage, load under/over-voltage vs its allowed window, step-down/boost sanity, collapsed-rail detection — surfaced as findings, node badges, list statuses, and report sections.
- Views: color-coded flowchart (90° routed arrows with rail labels, legend, collapse/expand chips, no overlaps, power text on every card) + hierarchical list view. Layouts: top-down, left-right, or custom drag-to-place.
- Search (Ctrl+F) across name/signal/refdes/part/pins/notes — highlights the canvas and filters the list.
- Documentation notes: hierarchical markdown notes with embedded images, linked to elements — capture where every number came from.
- Exports: PDF report (flowcharts + tables + margins + full notes appendix),
macro-enabled Excel report (
.xlsmwith outline collapse + VBA navigation macros; falls back to.xlsx+ importable.baswhen VBA trust is off), HD PNG flowchart, notes → Markdown / HTML / PDF.
Install & run
From PyPI (recommended):
pip install powertree :: add powertree[mcp] for the AI/MCP server
powertree-gui :: GUI
powertree info my.ptproj :: CLI (same entry: powertree --help)
From source:
git clone https://github.com/bin2ai/powertree
cd powertree
py -3.12 -m venv .venv
.venv\Scripts\pip install -r requirements.txt
.venv\Scripts\python.exe main.py :: or double-click PowerTree.bat
Standalone Windows installer (no Python needed) — build
dist\PowerTree-Setup.zip with installer\build_installer.ps1, unzip, run
install.bat (per-user install, Start-Menu/Desktop shortcuts, uninstaller;
installer\PowerTree.iss builds a setup.exe when Inno Setup is present).
Onboarding: press F1 in the app (Quick start), or read
docs/QUICKSTART.md and
docs/USER_GUIDE.md. A full feature tour with
screenshots: artifacts/PowerTree_Feature_Overview.pdf.
The app opens with a built-in demo (a realistic Zynq-7000 carrier board) so every feature is visible immediately.
Four ways to use it
| Mode | How |
|---|---|
| GUI | powertree-gui — flowchart, list, properties, states, notes, search, waivers |
| CLI | powertree info|solve|validate|nets|headroom|growth|bom|search|export|templates|demo … — JSON with --json; validate exits non-zero on violations (--strict fails on warnings too) |
| Excel | macro-enabled report export, native outline collapse, live formulas, States/Parts sheets |
| AI / MCP | powertree-mcp — 16 tools (open/solve/validate/edit/waive/export); see examples/mcp.json.example for Claude Code / Desktop registration |
powertree info examples\DemoBoard.ptproj
powertree validate examples\DemoBoard.ptproj --strict && echo margins clean
powertree growth examples\DemoBoard.ptproj :: +N% load headroom
powertree export bundle examples\DemoBoard.ptproj -o out\ :: all formats
Tests
.venv\Scripts\python.exe -m pytest tests -q
14 tests cover the solver math (hand-checked corner cases incl. the series-R + power-load fixed point), model constraints, and file-format round-tripping.
Layout
main.py launcher
src/powertree/
model/ elements, bottom-up solver (calc.py), .ptproj serialization
ui/ main window, flowchart canvas, tidy-tree layout, list view,
properties, notes, dark theme
export/ PDF report, Excel (.xlsm/COM + .xlsx), HD PNG, notes MD/HTML/PDF
sampledata.py demo project
tests/ pytest suite
examples/ DemoBoard.ptproj
notes/ Obsidian knowledge base (project docs, not app data)
Excel macros note
.xlsm export embeds VBA (expand/collapse outline, next-finding navigation) through
Excel COM, which requires File → Options → Trust Center → Trust Center Settings →
Macro Settings → “Trust access to the VBA project object model”. Without it you get
an identical .xlsx plus PowerTree_Macros.bas to import manually (Alt+F11 →
File → Import).
Roadmap ideas
Resistive loads · operating modes / duty-cycle scenarios · undo-redo · temperature derating · CSV/BOM import · converter component library · rail sequencing checks · per-corner load values.
Scaffolded 2026-08-06. See CLAUDE.md for how Claude works in this project.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file powertree-0.8.0.tar.gz.
File metadata
- Download URL: powertree-0.8.0.tar.gz
- Upload date:
- Size: 139.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
448b6c6597f0e814ece6b5b5aaf193aee3e1fd1d7bf01b7b1b2ed2e7d02c6aee
|
|
| MD5 |
a212c8e3b20c3e4df04c3519f3b384dd
|
|
| BLAKE2b-256 |
2eabe5012395eb39aa9a911f653006ed7af4b60eeae0cf8ab8908e98a065bcdf
|
Provenance
The following attestation bundles were made for powertree-0.8.0.tar.gz:
Publisher:
publish.yml on bin2ai/powertree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powertree-0.8.0.tar.gz -
Subject digest:
448b6c6597f0e814ece6b5b5aaf193aee3e1fd1d7bf01b7b1b2ed2e7d02c6aee - Sigstore transparency entry: 2385398171
- Sigstore integration time:
-
Permalink:
bin2ai/powertree@52b014d516fc77a132d78e4b95f35bc9140942e8 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/bin2ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@52b014d516fc77a132d78e4b95f35bc9140942e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file powertree-0.8.0-py3-none-any.whl.
File metadata
- Download URL: powertree-0.8.0-py3-none-any.whl
- Upload date:
- Size: 139.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7a2583eed5432e31a3e8fce39f920824002c75a01ac249dffe1596aa0b75dd3
|
|
| MD5 |
bb4605cd879be4f0e3a0ed30b2921a7f
|
|
| BLAKE2b-256 |
bfda32bfc0d7eb0723ca3ee677c57708c287ca73863de00d7550b2a290e612c9
|
Provenance
The following attestation bundles were made for powertree-0.8.0-py3-none-any.whl:
Publisher:
publish.yml on bin2ai/powertree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
powertree-0.8.0-py3-none-any.whl -
Subject digest:
c7a2583eed5432e31a3e8fce39f920824002c75a01ac249dffe1596aa0b75dd3 - Sigstore transparency entry: 2385398752
- Sigstore integration time:
-
Permalink:
bin2ai/powertree@52b014d516fc77a132d78e4b95f35bc9140942e8 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/bin2ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@52b014d516fc77a132d78e4b95f35bc9140942e8 -
Trigger Event:
push
-
Statement type: