r/PiCodingAgent • u/championswimmer • 3d ago
Plugin A library for pi extension makers to implement "Settings" dialogs
I have been making a lot of pi extensions/plugins, mostly for myself but few have become popular as well.
One common pattern I make in all of them is obviously the settings of that extension itself. Over time Pi has improved its TUI and now even has mouse mode, which some of my older extensions required rewriting the settings implemention to adopt.
I thought creating settings is a common pattern; there are few standard things
- settings location -> <pi-agent-dir/project-dir>/<extension-name>.json
- handling of 'dirty' state and Ctrl+S type saving
- a wrapper over pi-tui with mouse/keyboard handling
- dialog, margins, borders, all of that
If the extension can just declaratively set the config it needs, the settings UI, mechanism to save, etc can all be handled by a common library.
So here it goes: pi-extension-settings-tui
0
u/rimaa_nahk 2d ago
I was planning to build something similar for pi-bifrost, this is right on time, I will surely give it a try
0
0
u/Strong_Essay1176 2d ago
Pop up settings in terminal should be forbidden and banned.