Function calls over USB without cloud connection

I have not been able to make this work. I want to run WiFi.Listen() over USB manually when the credentials change. It seems using function calls with Particle CLI just relays commands to the cloud which is not possible when wifi credentials have changed.

Why not place the device in listening mode using the mode button?

I can’t make it work in semi-auto mode. It only stays active for 30s and doesn’t work at all while RGB is white. It only works during a connection attempt.
I have a Particle.connect() call at the beginning of setup() which times out after 30s.
The only way I know to end a connection attempt is with WiFi.off(). Then a timer turns it on again after 600s.
Does listen() or the setup button work with WiFi.off()? I see now that maybe the fix is to turn it right back on so the setup button works until the next timer cycle.
Still, it would be great to be able to run functions offline over USB to add credentials or whatever.

Holding the mode button for ~10s should erase all credentials, allowing you to add new ones. Running the device in Safe mode is always a good idea if your own program is causing issues. Give that a shot?

I see now the solution to my problem is to use serial to issue commands which are executed by the loop application.
This seems like a good way to go to enter commands directly without the cloud connection.
There seems to be quite a bit of info on this to get me started here: Serial Tutorial