The following examples show a Tcl script for an RTL project and a netlist project. The first example script, run_bft_kintex7_project.tcl, is available in the Vivado Design Suite installation at:
<install_dir>/Vivado/2020.2/examples/Vivado_Tutorial
You can source these scripts from the Vivado Tcl shell, or the Tcl Console inside of the Vivado IDE.