

For being not a coder, this is fairly ambitious. I’ve been coding software for thirty years and I’m not sure I can offer anything technical. Personally, I’d probably try to do this in Python rather than shell script. Shell script is fine if you have tools you’re just trying to stitch together, but this is far beyond that.
That being said, I get it. The first coding I ever did was making a character sheet for roleplaying by sending raw commands to my dot matrix printer from my Commodore 64. You have a vision in your head and a computer at your fingertips and you have to bring it all together.
I respect that and if part of your goal is to achieve this using only bash, then god speed. Otherwise I might look at a language that gives you library support and modularity and unit testing. I write Python scripts all the time, and the truth is I don’t know Python at all, so I know it can be done. Define a unit of functionality and build that piece. When that piece works build another component. Then build a parent program that calls those two things. Then build more components. Define functions that can be reused when you have code that needs to do similar things.
The key is to build standalone functionality — what is the smallest useful thing you can do? Build it. Now you can invoke that every time you need to do the thing. Construct your program out of components you create.
This is kinda like if I told AI to build me a web service but keep everything in a single Java class. It would be a wild and unreadable, untestable mess.

You can still build components and assemble them once each individual piece works. It’s easier to start with something that works and add to it than start with a “fully realized” script none of which actually works.
Asking folks to review hundreds of lines of vibe-coded slop (anything, really, but especially vibe coded slop) is a big ask. I sincerely wish you luck, though. We all started somewhere and maybe as you work to fix this you’ll become something of a coder yourself.