The last decade has seen a tremendous improvement in theoretical understanding of galaxy clustering on cosmological scales, which culminated in recent CMB-independent measurement of cosmological parameters from spectroscopic galaxy surveys. In this talk I will review the main conceptual and practical developments which led to this progress. I will also highlight the main lessons we learned so far and discuss further improvements that have to be made in order to optimally extract information from the ongoing galaxy surveys such as DESI and Euclid. I will conclude by arguing that in the next couple of years the large-scale structure will become as powerful probe of cosmology as the CMB, and show the immense potential that the combination of the two has in answering some of the open questions in cosmology.