vezel-dev / cathode

A terminal-centric replacement for the .NET console APIs.
https://docs.vezel.dev/cathode
BSD Zero Clause License
92 stars 7 forks source link
console csharp dotnet terminal

Cathode

Cathode

A terminal-centric replacement for the .NET console APIs.

[![License](https://img.shields.io/github/license/vezel-dev/cathode?color=brown)](LICENSE-0BSD) [![Commits](https://img.shields.io/github/commit-activity/m/vezel-dev/cathode/master?label=commits&color=slateblue)](https://github.com/vezel-dev/cathode/commits/master) [![Build](https://img.shields.io/github/actions/workflow/status/vezel-dev/cathode/build.yml?branch=master)](https://github.com/vezel-dev/cathode/actions/workflows/build.yml) [![Discussions](https://img.shields.io/github/discussions/vezel-dev/cathode?color=teal)](https://github.com/vezel-dev/cathode/discussions) [![Discord](https://img.shields.io/badge/discord-chat-7289da?logo=discord)](https://discord.gg/wtzCfaX2Nj) [![Zulip](https://img.shields.io/badge/zulip-chat-394069?logo=zulip)](https://vezel.zulipchat.com)

Cathode is a toolkit for writing terminal-based applications. It is effectively a complete replacement for the .NET console APIs.

With Windows Terminal having replaced the old Windows console host, it makes little sense for console interaction to still be centered around the old 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 supports.

Please note that, since Cathode replaces a very fundamental component of the framework, the use of certain framework APIs (e.g. System.Console) becomes problematic. An analyzer will automatically diagnose usage of such APIs and suggest working replacements.

Usage

This project offers the following packages:

Package Description Downloads
Vezel.Cathode Provides the core terminal API. Downloads
Vezel.Cathode.Extensions Provides terminal hosting and logging for the .NET Generic Host. Downloads

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.

Building

You will need the .NET SDK installed. Simply run ./cake (a Bash script) to build artifacts. You can also use ./cake pack if you do not want to build the documentation (which requires Node.js).

These commands will use the Debug configuration by default, which is suitable for development and debugging. Pass -c Release instead to get an optimized build.

License

This project is licensed under the terms found in LICENSE-0BSD.