shiki README

The project's README from github.com/shikijs/shiki. As one markdown file: README.md.

Shiki Logo

Shiki 式

NPM version NPM downloads Codecov

A beautiful syntax highlighter based on TextMate grammar, accurate and powerful.

📚 Documentation

Branch

The main branch is currently at v4.x.

Branch Description
v3 v3.23 of Shiki
v2 v2.5 of Shiki
v1 v1.29 of Shiki
v0 v0.14 of Shiki, the legacy version

License

MIT

shiki (shikijs/shiki)

Searching Database…

13.9K ·GitHub
What is this?Shiki is a syntax highlighter for code snippets, built on TextMate grammar so the tokenization is accurate and the output is visually clean.
Is this a library I add to my project, or a standalone app?It is a JavaScript/TypeScript library (published as the 'shiki' package) that you import to highlight code programmatically, not a standalone application.
How do I start using it to highlight code?This README excerpt does not show install commands, but as the 'shiki' npm package you would add it with your package manager and call its highlighter API from JS/TS to render highlighted code.
Why are there separate v0-v4 branches?Shiki keeps older major releases (v0 legacy, v1, v2, v3) on their own branches while active development happens on the v4.x main branch, so users on an older API can still find the matching docs and fixes.
What does 'based on TextMate grammar' actually mean?Shiki tokenizes source code using the same TextMate grammars that power VS Code's highlighting, so the colors and token boundaries closely match what you'd see in that editor rather than a simpler regex-based highlighter.
Is Shiki free to use commercially?Yes, it's MIT-licensed, so it can be used in commercial and open-source projects with minimal restrictions.
Creator
shikijs
Size
16.4 MB
Stars
13.9K
Age
7y
Commits · 90 Days