If I have a monero private key, how can I spend from it? Which program lets me import this key and spend from it?
Both the official CLI and GUI will allow you to restore a wallet from keys. In order to import a wallet from keys you need (i) the private spend key, (ii) the private view key, and (iii) the public address. Note that in the current implementation the private spend key is deterministic. Thus, if you only have the private spend key, you can easily "derive" the private view key and public address from it. There are tools out there that will streamline this process for you. For example, there is this tool from core-team member luigi1111. You can use either the addressgen or addresstests page to generate the private viewkey and public address from the private spendkey. In addition, for security reasons, it's generally advised to use these pages offline.
To actually restore a wallet from keys, you have to add the following flag to
On Windows make sure to launch it from the command line. Go to the folder
monero-cli-wallet is located and make sure your cursor isn't located on any of the files. Subsequently do SHIFT + right click and it will give you an option to "Open command window here". Lastly, type the following command:
monero-wallet-cli --generate-from-keys <new-wallet-name>
On Linux and Mac OS X you should use the terminal to launch
monero-wallet-cli. Note that this has to be done from the directory
monero-wallet-cli is located in. The command is as follows:
./monero-wallet-cli --generate-from-keys <new-wallet-name>
For the GUI, it's fairly straightforward, as the wizard will provide you with an option to restore from keys.