Trigger setup mode through the CLI or programatically

I am working through some scripts to update/configure photons before they are sent out as a part of a product. For convenience in settings the photons up, I would like to be able to run code from my computer to put a USB-connected photon into setup mode. Is that possible?