NTokenizers.Extensions.Spectre.Console
3.0.0
dotnet add package NTokenizers.Extensions.Spectre.Console --version 3.0.0
NuGet\Install-Package NTokenizers.Extensions.Spectre.Console -Version 3.0.0
<PackageReference Include="NTokenizers.Extensions.Spectre.Console" Version="3.0.0" />
<PackageVersion Include="NTokenizers.Extensions.Spectre.Console" Version="3.0.0" />
<PackageReference Include="NTokenizers.Extensions.Spectre.Console" />
paket add NTokenizers.Extensions.Spectre.Console --version 3.0.0
#r "nuget: NTokenizers.Extensions.Spectre.Console, 3.0.0"
#:package NTokenizers.Extensions.Spectre.Console@3.0.0
#addin nuget:?package=NTokenizers.Extensions.Spectre.Console&version=3.0.0
#tool nuget:?package=NTokenizers.Extensions.Spectre.Console&version=3.0.0
NTokenizers.Extensions.Spectre.Console
Stream-capable Spectre.Console rendering extensions for NTokenizers (XML, JSON, Markdown, TypeScript, CSS, HTML, C#, SQL, TOML, C, C++, Go, Java, Kotlin, Python, Rust and Swift), Style-rich console syntax highlighting
This library builds on:
- Spectre.Console for advanced console rendering
- NTokenizers for modular, stream‑based tokenization
Together, they enable expressive syntax highlighting directly in the console.
await AnsiConsole.Console.WriteMarkdownAsync(stream);
All references to Markup were renamed to Markdown. And so WriteMarkupText was renamed to WriteMarkdown in v2.
Especially suitable for parsing AI chat streams, NTokenizers excels at processing real-time tokenized data from AI models, enabling efficient handling of streaming responses and chat conversations without buffering entire responses.
Check out the AI Example to learn more about that.
Example: Writing a 'simple' string
var help = """"
#### Some extra instructions to accomodate multiline input:
|Command|Description|
|**Shift-Enter**|to place a soft new line|
|**Ctrl-B**|to paste multiline, do not use **Ctrl-V**, because that will input a _<Enter>_'s|
|**bye**|type bye to end the chat session|
|**clear**|type clear to clear the chat history|
"""";
AnsiConsole.Console.WriteMarkdown(help);
Check out the documentation Here.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- NTokenizers (>= 7.0.1)
- Spectre.Console (>= 0.55.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NTokenizers.Extensions.Spectre.Console:
| Package | Downloads |
|---|---|
|
PinkRooster.SpectreConsole
Shows an AI agent's run on a Spectre.Console terminal: reasoning, tool calls with their timing and the markdown answer as it streams, plus prompts to approve a tool call, answer the agent's question or type a line. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 88 | 10/10/2026 |
| 2.4.0 | 520 | 5/30/2026 |
| 2.3.0 | 135 | 5/27/2026 |
| 2.2.0 | 2,146 | 1/14/2026 |
| 2.1.0 | 151 | 1/4/2026 |
| 2.0.1 | 326 | 12/17/2025 |
| 2.0.0 | 190 | 12/11/2025 |
| 1.0.0 | 471 | 12/8/2025 |
| 0.7.0-preview | 170 | 12/6/2025 |
| 0.6.0-preview | 691 | 12/3/2025 |
| 0.5.0-preview | 727 | 12/2/2025 |
| 0.4.0-preview | 717 | 12/2/2025 |
| 0.3.0-preview | 716 | 12/2/2025 |
This release upgrades to NTokenizers 7.0.1 and reworks the Markdown renderer from a buffer-then-display model into a fully forward-only, per-token streaming pipeline, with a number of parsing and rendering fixes.
## Markdown streaming (rewrite)
- Markdown is now rendered forward-only: each token is written to the console as it arrives, the left side (borders, gutters, markers) is composed from the active nesting frame stack, and lines wrap only when a token no longer fits. The previous buffer-then-render LiveBlock model is gone.
- Nested Markdown (blockquote, heading, list items) is streamed token by token; list-item content can contain nested blocks such as quotes and lists.
- Root paragraphs are written directly and verbatim, so soft breaks inside a paragraph are preserved.
- Nested HTML style/script content is tokenized and streamed inline without the previous per-element handler delay.
- Nested list indentation and frame ordering are corrected.
- A pending block separator no longer renders as a blank line before a list's nested list.
- Console width is cached with a redirected-output fallback (80), removing the WindowWidth IOException when stdout is redirected.
- The unused generic Heading style property was removed; headings render through MarkdownHeadingStyles.
## Tables
- Tables render in a Spectre live region that grows and refreshes as rows arrive, restoring the previous growing-table behavior on the new streaming path.
## Writers
- The Emoji writer now supports the `:rocket:` short-code syntax.
- The Link writer rendering was improved.
## Dependencies
- Upgraded to NTokenizers 7.0.