antfu/shiki-stream
Streaming highlighting with Shiki. Useful for highlighting text streams like LLM outputs.
When you're building a web application that displays code, especially if that code is generated in real-time by an AI, this project helps you apply syntax highlighting as it streams in. It takes raw code text as it's being produced and outputs a stream of themed tokens, which can then be rendered in a user interface. This is designed for web developers who want to show dynamic code output with proper formatting to their users.
572 stars and 361,264 monthly downloads. Available on npm.
Use this if you need to display syntax-highlighted code that is being generated or received incrementally, like from a large language model, in a web application.
Not ideal if you only need to highlight static, pre-existing blocks of code, or if your application is not built for the web.
Stars
572
Forks
11
Language
TypeScript
License
MIT
Category
Last pushed
Jan 06, 2026
Monthly downloads
361,264
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
yokingma/fetch-sse
An easy API for making Event Source requests, with all the features of fetch(), Supports...
iw4p/partialjson
+1M Downloads! Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing...
kaptinlin/jsonrepair
A high-performance Golang library for easily repairing invalid JSON documents. Designed to fix...
HAibiiin/json-repair
Repair JSON! A Java library for fixing JSON anomalies generated by LLMs.