antfu/shiki-stream

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

56
/ 100
Established

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.

Maintenance 10 / 25
Adoption 20 / 25
Maturity 18 / 25
Community 8 / 25

How are scores calculated?

Stars

572

Forks

11

Language

TypeScript

License

MIT

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.