In this talk I will present a formulation of general relativity in generalized harmonic gauge on compactified hyperboloidal slices. The evolved fields and equations of motion rely on a choice for outgoing and ingoing null vectors and the decomposition of all geometric quantities against them. I will show results for the spherically-symmetric numerical evolutions, for which we recover the expected physics at null infinity. In this case decay towards null infinity for the chosen variables naturally classifies according to the 'good-bad-ugly' system, for which regularization is performed by means of suitably chosen gauge source functions. I will end by discussing the ongoing extension to the three dimensional case.