At the time of writing, Shiki does not have an API for adding line numbers, however, it is fairly easy to do so with CSS. We have seen you can use CSS counters to add line numbers as a pseudo-element at the start of each line.