cathode
cathode copied to clipboard
A terminal-centric replacement for the .NET console APIs.
Cathode
A terminal-centric replacement for the .NET console APIs.
Cathode is a toolkit for writing terminal-based applications. It is effectively a complete replacement for the .NET console APIs.
With the Windows console host now supporting virtual terminal sequences, it makes little sense for console interaction to still be centered around the old Windows console host and the many limitations it had. Cathode provides an API centered around a VT100 terminal with some extensions from later models and modern terminal emulators. It works on all desktop platforms that .NET 6+ supports.
Please note that, since Cathode replaces a very fundamental component of the
framework, the use of certain framework APIs becomes problematic. As an example,
intermixing Cathode and System.Console
usage will break. Referencing
Cathode (or a package that uses it) will pull in a Roslyn analyzer that
diagnoses problematic APIs and suggests working replacements.
Usage
This project offers the following packages:
Package | Description | Downloads |
---|---|---|
Provides the core terminal API. | ||
Provides the terminal hosting model. | ||
Provides terminal hosting and logging for the .NET Generic Host. |
To install a package, run dotnet add package <name>
.
See the sample programs for examples of what the API can do. The
samples can be run with
dotnet example
.
For more information, please visit the project home page.
Terminals
This project aims to have excellent support for the following terminal emulators:
- Alacritty
- ConEmu
- foot
- GNOME Terminal
- iTerm2
- kitty
- Konsole
- mintty
- mlterm
- PuTTY
- rxvt-unicode
- Terminal.app
- Terminology
- WezTerm
- Windows Console
- Windows Terminal
- xterm
Even if you are using a terminal emulator that is not listed here, chances are that it will work just fine; these are just the ones that are tested regularly while developing Cathode.
License
This project is licensed under the terms found in
LICENSE-0BSD
.