-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Typin is a simple to use, yet powerful framework for building both interactive command line applications and command line tools. It is build based on the source code of CliFx.
Etymology: Typin is made out of "Typ" for "Type" and "in" for "interactively". It's pronounced as "Ty pin".
Install the package via NuGet: dotnet add package Typin
See: Typin concepts and basic app and advanced features
Typin follows Semantic Versioning 2.0.0. Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards compatible manner, and
- PATCH version when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
There's still a good deal of work to be done to make Typin great. If you want to help, please comment on or open an issue, or contribute.
Recent code for
*-dev-*
or*-rc-*
releases can be found ondevelop
branch.
Since Typin has its roots in CliFx you may also be interested in this simpler CLI Framework.
Differences between Typin and Clifx:
-
Interactive mode with auto-completion, parameter escaping with
"
, and support for user-defined shortcuts, - Middleware pipeline,
- Custom directives,
-
Build-in DI support with
Microsoft.Extensions.DependencyInjection
that is used accross entire framework, - IOptionFallbackProvider for custom fallback providers instead of only environment variable fallback,
- Ability to modify exception handling messages,
- DI injectable
ICliContext
with lots of useful data, - Introduced negative numbers handling,
- Manual property in
CommandAttribute
that can be used to provide a long, extended description of a commmand - Custom help writer.
- Custom modes support and application lifetime.
- Startup message color personalization through a callback method.
- Console IO wrapper classes (
StandardStreamReader
andStandardStreamWriter
) and IO interfaces. - Logging with
Microsoft.Extensions.Logging
. - Native support for
Half
,DateOnly
, andTimeOnly
. - Optional option names by providing a kebab case name.
- Better char parsing: support for the following escape sequences: '\0', '\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', and Unicode escape e.g. \u006A).
- (more coming soon).
See CHANGELOG.md for a complete list of changes.
Getting started
Advanced features
- Reporting errors
- Exception handling
- Metadata and startup message
- Graceful cancellation
- Dependency injection
- Middleware pipeline
- Environment variables
Utilities
Tests
Misc