Terminator 1.0.17
dotnet add package Terminator --version 1.0.17
NuGet\Install-Package Terminator -Version 1.0.17
<PackageReference Include="Terminator" Version="1.0.17" />
<PackageVersion Include="Terminator" Version="1.0.17" />
<PackageReference Include="Terminator" />
paket add Terminator --version 1.0.17
#r "nuget: Terminator, 1.0.17"
#:package Terminator@1.0.17
#addin nuget:?package=Terminator&version=1.0.17
#tool nuget:?package=Terminator&version=1.0.17
Terminator
Terminator is a framework for building user-friendly command-line interfaces (CLIs) in .NET, built on CommandDotNet
, Spectre.Console
and Microsoft.Extensions.DependencyInjection
.
It's designed for creating tools that are easy to use and maintain, especially those that act as a "runner" for other projects.
Minimal example
When a Terminator
-based app is run without arguments, it shows an interactive drop-down list of all available commands. This makes the tool's capabilities discoverable without needing to memorize commands.
dotnet add Terminator
dotnet add CommandDotNet
This is enabled by a simple bootstrap process in your Program.cs
:
using CommandDotNet;
using Terminator.Builder;
// Initialize the CLI application with your root command class
var app = CliBuilder.Initialize<RootCommand>();
await app.RunAsync(args);
// Define your commands
public class RootCommand
{
[Command]
public void TestCommand()
{
Console.WriteLine("Hello, World!");
}
}
Dependency injection
Terminator uses Microsoft.Extensions.DependencyInjection
to manage services. You can register your own services by creating a class that implements the IServiceRegistrar
interface.
using Microsoft.Extensions.DependencyInjection;
using Terminator.DependencyInjection;
// Define your service
public interface IMyService
{
string GetMessage();
}
public class MyService : IMyService
{
public string GetMessage() => "Hello from a service!";
}
// Register your service
public class MyServiceInjections : IServiceRegistrar
{
public void RegisterServices(IServiceCollection services)
{
services.AddSingleton<IMyService, MyService>();
}
}
You can then inject your services into your command methods or constructors.
public class RootCommand
{
[Command]
public void TestCommand(IMyService myService)
{
Console.WriteLine(myService.GetMessage());
}
}
Running the Application
The templates generate helper scripts to make running your application easy across different platforms.
On Linux/macOS: Use the
run.sh
script../run.sh
On Windows: Use the
run.ps1
script with PowerShell../run.ps1
Getting Help
All commands include generated help, which you can access by passing the -h
or --help
flag.
# Get help for the root command
./run.sh -h
# Get help for a subcommand
./run.sh sub -h
Templates
This package comes with templates to get you started with a new Terminator-based CLI application.
Installation
dotnet new install Terminator.Templates
Simple CLI App
This template creates a new command-line application with a basic project structure. It includes a root command and an example subcommand, and is pre-configured to use CommandDotNet
for argument parsing and dependency injection.
To create a minimal Terminator-based CLI app with dependency injection, run:
dotnet new terminator-simple -n YourAppName
Build Tool
This template creates a project for build and release automation. The project includes helper scripts (run.sh
for Linux/macOS and run.ps1
for Windows) to execute build commands. The project structure is set up for build automation tasks.
To create a new build and release tool, run:
dotnet new terminator-build -n YourBuildToolName
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 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. |
-
net8.0
- CliWrap (>= 3.9.0)
- CommandDotNet.IoC.MicrosoftDependencyInjection (>= 7.1.0)
- CommandDotNet.NameCasing (>= 5.1.0)
- CommandDotNet.Spectre (>= 4.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- NuGet.Configuration (>= 6.14.0)
- NuGet.Protocol (>= 6.14.0)
- NuGet.Versioning (>= 6.14.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.5)
-
net9.0
- CliWrap (>= 3.9.0)
- CommandDotNet.IoC.MicrosoftDependencyInjection (>= 7.1.0)
- CommandDotNet.NameCasing (>= 5.1.0)
- CommandDotNet.Spectre (>= 4.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- NuGet.Configuration (>= 6.14.0)
- NuGet.Protocol (>= 6.14.0)
- NuGet.Versioning (>= 6.14.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.17 | 20 | 9/10/2025 |