Icod.Terminal
1.0.0
dotnet add package Icod.Terminal --version 1.0.0
NuGet\Install-Package Icod.Terminal -Version 1.0.0
<PackageReference Include="Icod.Terminal" Version="1.0.0" />
<PackageVersion Include="Icod.Terminal" Version="1.0.0" />
<PackageReference Include="Icod.Terminal" />
paket add Icod.Terminal --version 1.0.0
#r "nuget: Icod.Terminal, 1.0.0"
#:package Icod.Terminal@1.0.0
#addin nuget:?package=Icod.Terminal&version=1.0.0
#tool nuget:?package=Icod.Terminal&version=1.0.0
Icod.Terminal

Icod.Terminal is the managed, cross-platform live-terminal session layer for the Icod library family. It sits between Icod.TermInfo and higher-level consumers such as Icod.DCurses, terminal-aware command-line tools, monitors, editors, pagers, and REPLs.
Status
1.0.0 is the stable release of the intended 1.x contract.
Stable 1.0 promotes the contract qualified by 1.0.0-rc1 without adding a new terminal-protocol family or changing the frozen public API. It consolidates the accumulated 0.x behavior into durable 1.x authorities, freezes the exported API/enum layout, defines compatibility and migration policy, and validates the package through Terminal-owned package/invariant gates plus current downstream compatibility checks.
The one intentional pre-1.0 API correction is that a live TerminalSession no longer exposes its raw input transport through TerminalSession.Input. ITerminalInput remains public for custom transport injection. Application input now has one authoritative live-session path through ReadEventAsync(...) and typed query operations.
Full release notes and concise release history:
Installation
dotnet add package Icod.Terminal --version 1.0.0
The package targets:
net8.0
net9.0
net10.0
and depends on Icod.TermInfo 1.10.0 and Icod.Timing 1.0.0.
Architecture
Icod.TermInfo
^
|
Icod.Terminal
^
|
Icod.DCurses
^
|
terminal applications
Icod.TermInfo is the immutable terminal-capability authority. Icod.Terminal owns the live terminal conversation: endpoint observation, terminal modes, input decoding, lifecycle, active query routing, semantic output, and scoped/reversible terminal state. Icod.DCurses owns the higher-level virtual-screen/curses presentation model.
PTY/process hosting remains orthogonal to this package.
Quick start
using Icod.Terminal;
await using TerminalSession session = await TerminalSession.OpenAsync(
new TerminalSessionOptions {
InputMode = TerminalInputMode.CBreak,
EchoInput = false
}
);
await session.WriteTextAsync( "Terminal session ready.\r\n" );
TerminalEvent terminalEvent = await session.ReadEventAsync(
TimeSpan.FromSeconds( 1 )
);
For a curses-style virtual screen, prefer Icod.DCurses rather than rebuilding windows/cells/diff policy directly over TerminalSession.
Core 1.x guarantees
One authoritative input path
A live TerminalSession owns the only authoritative input reader for its transport. Ordinary consumers use:
ReadEventAsync(...)for application input and lifecycle events;- typed query operations for terminal responses.
Do not run a competing Console.Read*, stream read, or retained custom-transport read on the same live terminal conversation.
Bounded query routing
Queries share the same incremental input/router domain as application input. The contract includes bounded parser state, ambiguity-aware query serialization, finite caller timeouts, pre-emission versus post-emission cancellation semantics, bounded late-response ownership, and lifecycle query generations.
A timeout is not automatically proof that the terminal does not support a feature.
Reversible ownership
Scoped state uses leases where overlapping ownership matters. The 1.x documentation distinguishes:
- exact restoration — a captured/observed external baseline is replayed exactly;
- terminal-policy reset — control returns to terminal policy without claiming the exact previous value;
- Icod-owned nested state — an outer library-owned value can be restored even when the pre-Icod state is not observable;
- ephemeral metadata — explicit output with no lifecycle replay/restoration state.
TerminalSession.DisposeAsync() remains final cleanup/restoration authority for session-owned state.
Output serialization boundary
Use session semantic operations for ordinary terminal output. TerminalSession.Output remains available only as an advanced borrowed transport and is outside normal session serialization when used directly by callers.
WriteTerminalStringAsync(...) is intended for already-resolved terminfo capability strings; it is not a recommendation to construct arbitrary OSC/CSI/vendor traffic manually.
Semantic terminal features
The supported semantic surface includes:
- application text and resolved terminfo capability output;
- terminal titles (OSC 0/1/2);
- current-location publication (OSC 7);
- hyperlinks (OSC 8);
- clipboard/selection operations and explicit reads (OSC 52);
- cursor style observation/ownership (DECSCUSR/DECRQSS);
- synchronized output (DEC private mode 2026);
- terminal progress (OSC 9;4);
- terminal pointer shape (OSC 22);
- semantic prompt/command metadata (OSC 133);
- indexed palette and selected dynamic terminal colors (OSC 4/104, 10–14, 17, 19 and resets);
- negotiated modern keyboard reporting;
- bracketed paste, focus, and mouse input protocols;
- bounded safe OSC 9 notification and Windows-CWD compatibility operations.
The safe OSC 9 subset intentionally excludes host-affecting vendor commands for sleep/blocking UI, GUI macros, process launch, environment disclosure, and emulator mutation.
Modern keyboard reporting
Modern keyboard reporting is opt-in through the compound input-protocol lease. Traditional keyboard decoding remains the compatibility floor.
The public modes are semantic:
Disambiguated
EventTypes
AllKeys
Kitty support is negotiated before reversible ownership is acquired. xterm modifyOtherKeys remains decode-only and is not blindly activated.
Security and privacy
Semantic APIs validate and bound terminal protocol data before commitment where the contract permits it. The library deliberately avoids a generic raw vendor-command API as the ordinary extension mechanism.
Several operations disclose caller-supplied metadata by design:
- clipboard contents;
- current filesystem locations;
- hyperlinks;
- OSC 133 command-line metadata;
- desktop notification text;
- keyboard/mouse/focus/paste input.
The library does not automatically discover or redact secrets. Applications remain responsible for deciding what data is appropriate to publish.
Compatibility policy
The stable 1.0 public API is machine-frozen across net8.0/net9.0/net10.0. Existing public enum numeric values are part of that baseline.
For the stable 1.x line:
- patch releases fix/harden the documented contract without intentionally breaking it;
- minor releases may add compatible API/semantic features with an intentional baseline update;
- ordinary removals, renames, signature breaks, enum renumbering, or incompatible ownership/security/restoration changes require a new major release.
Vendor runtime EOL alone is not sufficient reason to drop net8.0 or net9.0; a concrete security/toolchain/maintenance blocker is required.
Platform support
The built-in SystemTerminalControlProvider supports:
- Windows;
- Linux;
- macOS.
Other hosts receive controlled Unsupported results from the built-in provider. Custom implementations may be supplied through ITerminalControlProvider, ITerminalInput, and ITerminalOutput.
Permanent documentation
The links below are intentionally pinned to the v1.0.0 tag so documentation bundled with the stable package cannot silently drift as main advances:
- Architecture
- Terminal Session and Ownership
- Lifecycle and Restoration
- Input and Events
- Queries and Responses
- Modern Keyboard Security and Compatibility
- Presentation and Reversible State
- Semantic Output Protocols
- Security and Privacy
- Licensing
- Public API Baseline
- Compatibility and Versioning
- Migration to 1.0
Historical T-series, 0.x baselines, and the rc1 baseline remain available as design/release evidence.
Samples
Repository samples are indexed by task in samples/README.md. They cover session basics, rich input, queries, scoped presentation/state, colors, titles, location, hyperlinks, clipboard, semantic prompt metadata, and notifications.
Build and validation
On Windows:
build.cmd
On POSIX hosts:
sh build.sh
PR validation runs Windows/Linux/macOS runtime/source validation, the frozen 1.0 public-API fingerprint, one portable package candidate, and four parallel package-contract shards retaining contracts from 0.8 through the stable 1.0 release line. The package-candidate gate also verifies the exact project-appropriate GPL/LGPL header template for every tracked .cs and .csproj file.
The repository also runs current Icod.DCurses 0.1.0 integration/ownership acceptance, including a package-boundary soak against the freshly packed Terminal artifact. Because DCurses is still an early downstream, these checks are compatibility witnesses for the integration paths it currently exercises, not exhaustive proof of every Icod.Terminal 1.x contract. Terminal's own API, invariant, unit/hardening, and package gates remain the primary release evidence for the full surface.
After merge, Release distribution validation runs six Windows/Linux/macOS x64/ARM64 runtime jobs plus the single portable package/four-shard package contract.
Release process
1.0.0 is publishable only after the exact stable-promotion PR head is green, the merge result passes Release distribution validation, and publication is explicitly authorized.
The tag-triggered workflow requires curated docs/releases/<version>.md release notes and re-runs the frozen API, hardening, historical package, stable release-line package, and current downstream compatibility gates before publication. It does not fall back to generic auto-generated GitHub notes.
Tagging triggers publication; no release tag should be created merely because a PR is green.
Development roadmap
Current release status is tracked in Icod.Terminal-Development-Roadmap.md. The completed rc1 program remains preserved in Icod.Terminal-1.0.0-rc1-Development-Roadmap.md.
License
The published Icod.Terminal library package and the C# sources compiled into the library are licensed under LGPL-3.0-or-later.
Repository executable/test programs—including Icod.Terminal.Tests, samples, package smoke tests, validation utilities, and downstream acceptance tools—are licensed under GPL-3.0-or-later. Their GPL license does not change the LGPL license of the reusable Icod.Terminal library they consume.
The root LICENSE contains the LGPLv3 terms and the incorporated GPLv3 terms. See Licensing for the project-by-project policy and source-header requirements.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net10.0
- Icod.TermInfo (>= 1.10.0)
- Icod.Timing (>= 1.0.0)
-
net8.0
- Icod.TermInfo (>= 1.10.0)
- Icod.Timing (>= 1.0.0)
-
net9.0
- Icod.TermInfo (>= 1.10.0)
- Icod.Timing (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Icod.Terminal:
| Package | Downloads |
|---|---|
|
Icod.DCurses
Managed, cross-platform curses-like terminal UI library for .NET, built on Icod.TermInfo and Icod.Terminal. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 9 | 9/8/2026 |
| 1.0.0-rc1 | 47 | 9/7/2026 |
| 0.18.0 | 47 | 9/7/2026 |
| 0.17.0 | 49 | 9/7/2026 |
| 0.16.0 | 64 | 9/6/2026 |
| 0.15.0 | 48 | 9/6/2026 |
| 0.14.0 | 57 | 9/6/2026 |
| 0.13.0 | 64 | 9/6/2026 |
| 0.12.0 | 48 | 9/5/2026 |
| 0.11.0 | 51 | 9/5/2026 |
| 0.10.0 | 55 | 9/5/2026 |
| 0.9.0 | 50 | 9/5/2026 |
| 0.8.0 | 64 | 9/5/2026 |
| 0.7.0 | 51 | 9/5/2026 |
| 0.6.1 | 52 | 9/4/2026 |
| 0.6.0 | 46 | 9/4/2026 |
| 0.5.0 | 51 | 9/4/2026 |
| 0.4.0 | 52 | 9/4/2026 |
| 0.3.0 | 3,797 | 8/29/2026 |
| 0.3.0-alpha.8 | 77 | 8/28/2026 |
Icod.Terminal 1.0.0 establishes the stable 1.x contract across net8.0/net9.0/net10.0 with the same frozen public API and enum layout qualified by 1.0.0-rc1. Breaking change from the final 0.x line: public TerminalSession.Input is removed so a live session retains one authoritative input/query-routing path; ITerminalInput remains public for custom transport injection. Stable 1.0 adds no new terminal protocol family beyond rc1; it promotes the documented architecture, ownership, lifecycle, query, restoration, security, compatibility, and package contracts to stable support. Full notes: https://github.com/uniblab/Icod.Terminal/blob/v1.0.0/docs/releases/1.0.0.md ; migration: https://github.com/uniblab/Icod.Terminal/blob/v1.0.0/docs/Migration-to-1.0.md