Restore Mac from Time Machine Backup via Terminal
You likely do not want to attempt this from Terminal but if you did you would want to use tmutil restore ... Read the manual page - for what that involves. The issue will be you will have to specify via the command line where in the time capsule snapshot the restoration will be sourced from.

For more likely success you probably should re-boot using the Recovery HD or some other graphical user interface mechanism intended for this kind of restore from disaster scenario that will guide you in finding the right snapshot as described in the Time Machine FAQ