I believe that the “rename” option in the gui-based manager actually does a clone to the new name, then goes through and moves all dependencies to the new qube (i.e, if it’s a template, anything that uses that template gets reassigned to the new qube, likewise with default disposable VMs if that applies). Then the old qube is deleted. If you do a rename in the GUI-based manager, you can actually see a qube with your new name is created immediately, and for a while both qubes exist.
So if you want to do it on the command line, you have to reproduce that process. The clone (to new name) and delete (of the qube with the old name) is easy; reassigning dependencies on your old qube to the new one is trickier to automate (but obviously, it’s possible).
Caveat: I could be wrong about this, but it sure looks like it’s clone,-reassign-and-delete when I watch it happening. And sometimes, the last delete doesn’t happen because the system missed a dependency that needed to be switched [typically, a qube using itself as its dispvm], so you have qubes by both the old and new names for a while until you manually set things right.