r/PowerShell • u/Creative-Type9411 • Jun 14 '26
Script Sharing MiniBot - An OpenAI compatible Powershell console agent.
I've been playing around with local models, and I like making stuff myself instead of using someone else's ;P
This isn't meant to show off, it's not polished at all, I didn't try to make it look cool (yet) but it is already very useful, and since it's powershell, it's fully customizable for us
https://github.com/illsk1lls/MiniBot
It's a basic version of something like Grok build or Claude code, or Pi etc... to interact with OpenAI compatible models local or remote
I made this today and the first time it worked I thought it was the coolest thing ever. I know there are mature offerings out there but this is surprisingly effective and useful. I actually have a slightly better version setup on my prod side so i can irm ... | iex it and then have it ask for creds for NPMplus access list locked redirects (which is where my current test model is being served from)
LMK what you think..
3
u/BlackV Jun 14 '26
At a quick glance
why is this
not just a
-force/-refreshparameter instead (Edit: wait there is a parameter alreadyGet-NpmPlusCreds -ForceRefresh $ForceCredRefresh)2. why are you using
[bool]$confirminstead of[switch]as is standard powershell practice?3. You have the following line
your users have to guess that the other option is
cmd, you do 0 validation on what someone might select there i could useInvoke-RunCommand -shell piesand it all falls over (or does it?)4. on a similar topic, there is just not a lot of error handling or validation of input at all
5. if
why not just use
$NpmCreds.User/$NpmCreds.Passin you code instead?6. I'm not a fan of storing creds in a txt file, when you could just pass around a credential object
1
u/skilife1 Jun 14 '26
On vacation for the next week, but when I get a chance I will give this a try and offer feedback. I built a PS script to automate browser interactions with CoPilot. The challenge I had was obtaining output in a predictable and consistent format so I could use the output for downstream processing. I'd like to see if your approach overcomes that issue.
1
u/ByronScottJones Jun 15 '26
It looks good, but I noticed that you used hard coded config instead of a parameter block. I just submitted a PR that adds a param block to your code. I didn't copy the comments over, if you want me to do that I can.