Coldcard/ckcc-protocol ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python library and command line tool for talking to a Coldcard hardware wallet over USB.

I want a simple package that I can install with pip, then use from the terminal to do the common wallet tasks people need, like listing connected devices, checking the firmware version, getting xpubs and public keys, signing short messages, signing PSBT transactions, sending backups and restores, and uploading firmware updates. It should also support the simulator for testing, and let me choose a specific device by serial if more than one is connected.

Please make the command line feel straightforward and friendly, with helpful help text and clear output. If you need to check the latest Coldcard protocol details or USB access docs online, go ahead. Include enough code and tests so I can run it locally and try the main commands without having to figure out the protocol myself.