From mining to sending via RPC Assuming that there is a magical mineblocks RPC command that can mine X blocks on demand, what is the complete set of command line commands to start a client, mine my coins to a specific address, see the mined blocks, get the reward and send them to an address XXX?
Put your client into regtest mode. This allows you to mine an arbitrary amount of blocks very quickly. Add this to your bitcoin.conf

regtest=1
daemon=1

Generate the blocks. Run 

bitcoin-cli setgenerate true &lt;number of blocks&gt;


where X is the number of block you want. You'll want at least 101 blocks.
See the mined blocks. Run

bitcoin-cli getblockhash &lt;index&gt;


to get the hash of block number &lt;index&gt;. Then take that hash and run

bitcoin-cli getblock &lt;hash&gt;

Repeat Step 3 for each block you want.
Send the Bitcoins to a new address. Run

bitcoin-cli getbalance


to find out your balance. Run

bitcoin-cli sendtoaddress &lt;address&gt; &lt;amount&gt;



If you don't need to see the contents of the block, you can skip steps 3 and 4.