starry-night
JavaScript syntax highlighter that uses TextMate grammars and is designed to produce markup matching GitHub's code highlighting.
starry-night is a JavaScript syntax highlighter that uses TextMate grammars. It produces a syntax tree rather than a string, so the result can be turned into HTML, React nodes or ANSI output. The README says its output classes are meant to match GitHub’s and that the stylesheet it ships supports light and dark mode. It calls the project similar to shiki.
Worth knowing
The package is ESM only. The README notes a WebAssembly dependency and rather big grammars, and says it may be too heavy in browsers, where it names lowlight and refractor as more suitable options. The grammars it includes are covered by their own repositories’ licenses, which the README calls permissive.
Identity
- Status
- Active
- Maintainer
- Titus Wormer3
- Maintained by
- Individual
- First release
- 20224
Rendering and deploy
- Install with
- npm, cdn2
Releases
Adoption
Sources
- 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/wooorm/starry-night - 2026-11-16: links, Categories, Runtime, Minimum runtime, Install with, License
github.com/wooorm/starry-night/blob/main/readme.md - 2026-11-16: Maintainer, License, License model
github.com/wooorm/starry-night/blob/main/license - 2026-11-16: First release
api.github.com/repos/wooorm/starry-night/releases - 2026-11-16: Current major version, Last release
api.github.com/repos/wooorm/starry-night/releases/latest - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/@wooorm/starry-night - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@wooorm%2Fstarry-night - 2026-11-16: Contributors
api.github.com/repos/wooorm/starry-night/contributors?per_page=1