You need the quartus ii scripting reference manual (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/manual/tclscriptrefmnl.pdf).
However, I recommend you start with Quartus' GUI, especially if you're new to Altera. It'll help you understand the process required to take your source code through the tool chain to a target. You'll also find that, via the GUI's message window, Quartus will give you the commands it's running underneath - which will then help you towards your goal. You'll be looking for 'quartus_map', 'quartus_fit' & 'quartus_asm' to generate you programming files for your target.
You might also want to look through
using the quartus ii executables in shell scripts (
http://quartushelp.altera.com/current/master.htm#mergedprojects/reference/scripting/tcl_about_execs_scripts_makes.htm), part of Quartus' online documentation.
Cheers,
Alex