The early history of the universe might be described by a topological phase followed by a standard second phase of Einstein gravity. To study this scenario in its full generality, we consider a four-manifold of Euclidean signature in the topological phase, which shares a common boundary with a corresponding manifold of Lorentzian signature in the Einstein phase. We find that the boundary should have vanishing extrinsic curvature, whereas the manifold in the topological phase should have zero Euler number. In addition, we show that the second phase must be characterized by an initial vanishing Weyl tensor and that the standard cosmological flatness problem is not automatically solved unless a conformal invariant boundary term is added. We also characterize the scalar perturbations in the standard Einstein phase. We show that they must contain an initial non-vanishing shear component inherited from the topological phase and we estimate the non-Gaussian parameters. Finally, we argue that the topological early universe cosmology shares common features of previous ideas, such as the so-called Weyl curvature hypothesis, the universe's creation out of nothing and the no-boundary proposal.