# wooorm/starry-night

Syntax highlighting, like GitHub

Repository: https://github.com/wooorm/starry-night
Canonical: https://ross.abutalabs.com/products/starry-night
Language: JavaScript
License: MIT
License Family: permissive
Topics: ast, code, github, gogh, highlight, highlighting, linguist, prettylights, syntax, treelights, virtual
Last push: 2026-06-08T18:04:06+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 86, release rhythm 63, longevity 100
- inputs: {"age_days": 1576, "days_push": 86, "days_rel": 86, "gap_med": 109.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1812, forks 37 (observed 2026-08-28T04:05:39.510357+00:00)

## What it is
starry-night is an open-source JavaScript syntax highlighting library that replicates GitHub's PrettyLights highlighting using TextMate grammars, supporting 600+ languages. It produces hast syntax trees that can be serialized to HTML or integrated with unified, remark, rehype, markdown-it, or React.

## Use cases
- highlight code blocks in markdown like GitHub does
- syntax highlight 600+ languages on a website
- render code snippets with GitHub-style colors
- add syntax highlighting to a static site generator
- highlight code in React components
- integrate syntax highlighting with remark or rehype

## When to avoid
- you need a tiny client-side highlighter in the browser (consider lowlight or refractor)
- you only need highlighting for a handful of common languages
- you cannot tolerate a WASM dependency

## Facets
- artifact type: library
- maturity: active
- function: parser, developer-tools, markdown
- domain: web-development, frontend, developer-tools, documentation
- platform: browser, wasm
- tags: syntax-highlighting, textmate-grammars, github-prettylights, hast, rehype, remark, nodejs, javascript

## Member repositories
- wooorm/starry-night (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:39.510357+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:21:13.953451+00:00, confidence not recorded.
  - readme: https://github.com/wooorm/starry-night (fetched 2026-08-28T04:05:39.510357+00:00, sha 4223526a3e40)
- Data as of 2026-08-30T08:39:29.467469+00:00.
