antfu/shiki-stream
Streaming highlighting with Shiki. Useful for highlighting text streams like LLM outputs.
Implements `CodeToTokenTransformStream`, a Web Streams API transformer that incrementally tokenizes code as it arrives, emitting themed tokens chunk-by-chunk rather than waiting for complete input. Introduces optional "recall" tokens to handle syntax context changes mid-stream, allowing consumers to retroactively discard outdated tokens for fine-grained updates. Provides ready-made Vue and React renderers plus a cached renderer API for progressively updated code display.
572 stars and 344,655 monthly downloads. Available on npm.
Stars
572
Forks
11
Language
TypeScript
License
MIT
Category
Last pushed
Jan 06, 2026
Monthly downloads
344,655
Commits (30d)
0
Dependencies
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/antfu/shiki-stream"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
mangiucugna/json_repair
A python module to repair invalid JSON from LLMs
iw4p/partialjson
+1M Downloads! Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing...
yokingma/fetch-sse
An easy API for making Event Source requests, with all the features of fetch(), Supports...
kaptinlin/jsonrepair
A high-performance Golang library for easily repairing invalid JSON documents. Designed to fix...
a-r-d/ai-json-safe-parse
Depedency free safe fuzzy JSON parsing for semi malformed LLM responses