antfu/shiki-stream

Streaming highlighting with Shiki. Useful for highlighting text streams like LLM outputs.

59
/ 100
Established

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.

web-development real-time-display syntax-highlighting code-generation-UI LLM-output-rendering
Maintenance 6 / 25
Adoption 20 / 25
Maturity 25 / 25
Community 8 / 25

How are scores calculated?

Stars

572

Forks

11

Language

TypeScript

License

MIT

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.