In recent years, sustainability concerns have emerged in the software engineering community. However, little research focuses on the link between the evolution of a source code and energy consumption. Consequently, most developers don’t know the energy consumption of their software during its development. To address this problem, we want to build a theory that binds the evolution of a source code to its energy consumption profile. This relies on the measurement of the energy consumption evolution of multiple projects using repository mining approaches, the analysis of the reasons for this evolution, the design of proper data visualization to make this information available for the developers, and the evaluation of these objectives through the development of a framework for developers. This theory and the associated framework may help developers have better knowledge of the energy consumption evolution of their software and tools to reduce its consumption.