Stateless VS command-line-api

Compare Stateless vs command-line-api and see what are their differences.


A simple library for creating state machines in C# code (by dotnet-state-machine)
Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Revelo Payroll - Free Global Payroll designed for tech teams
Stateless command-line-api
9 21
5,023 3,167
0.6% 0.5%
0.0 8.3
2 months ago 7 days ago
C# C#
GNU General Public License v3.0 or later MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of Stateless. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-06-05.
  • Architecture pattern for Console Apps?
    5 projects | /r/csharp | 5 Jun 2022
    After using stateless for three years, my conclusion is that I cannot imagine a scenario, where it makes sense to use it.
    5 projects | /r/csharp | 5 Jun 2022
  • Has UML died without anyone noticing?
    4 projects | /r/programming | 25 Apr 2021
    I'm playing around with this library for a medium sized state machine I'm setting up, and it has this functionality. I think explicit state machines are a good use-case for having an actual diagram, since they can take up enough space that it becomes hard to build a mental map from reading the code due to locality issues.


Posts with mentions or reviews of command-line-api. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-20.
  • How to configure true dependency injection in System.CommandLine
    3 projects | | 20 Jun 2023
    using System.CommandLine.Invocation; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; namespace System.CommandLine.Builder; internal static class DependencyInjectionMiddleware { public static CommandLineBuilder UseDependencyInjection(this CommandLineBuilder builder, Action configureServices) { return UseDependencyInjection(builder, (_, services) => configureServices(services)); } // This overload allows you to conditionally register services based on the command line invocation context // in order to improve startup time when you have a lot of services to register. public static CommandLineBuilder UseDependencyInjection(this CommandLineBuilder builder, Action configureServices) { return builder.AddMiddleware(async (context, next) => { // Register our services in the modern Microsoft dependency injection container var services = new ServiceCollection(); configureServices(context, services); var uniqueServiceTypes = new HashSet(services.Select(x => x.ServiceType)); services.TryAddSingleton(context.Console); await using var serviceProvider = services.BuildServiceProvider(); // System.CommandLine's service provider is a "fake" implementation that relies on a dictionary of factories, // but we can still make sure here that "true" dependency-injected services are available from "context.BindingContext". // context.BindingContext.AddService(_ => serviceProvider); foreach (var serviceType in uniqueServiceTypes) { context.BindingContext.AddService(serviceType, _ => serviceProvider.GetRequiredService(serviceType)); // Enable support for "context.BindingContext.GetServices<>()" as in the modern dependency injection var enumerableServiceType = typeof(IEnumerable<>).MakeGenericType(serviceType); context.BindingContext.AddService(enumerableServiceType, _ => serviceProvider.GetServices(serviceType)); } await next(context); }); } }
  • C# .NET Tools with System.CommandLine
    3 projects | | 19 Mar 2023
  • Show HN: Replbuilder, quickly build a Python REPL CLI prompt
    5 projects | | 19 Feb 2023
    This looks really nice.

    I've been spending a lot of time with python lately because of new project work, I had never really used python before. It's been really cool to keep finding stuff like this.

    The equivalent of something like in the .net world (eg and even powershell modules ( have a steeper learning curve and take significantly MORE work to set up for the end-user.

  • What is the best architecture for a Console app?
    2 projects | /r/dotnet | 24 Sep 2022 is a library that facilitates making commandline executables with nice arguments and options. It's a little complicated but if you're going to pack in a lot of functionality, you need something like this.
  • Thoughts on authoring cmdlets
    2 projects | /r/dotnet | 11 Aug 2022
    if you're looking into command line utilities built in c#, you might want to check out System.CommandLine. You'll be able to build your comands in c#.
  • Architecture pattern for Console Apps?
    5 projects | /r/csharp | 5 Jun 2022
  • What's your favorite command line arg parser?
    7 projects | /r/csharp | 31 Jan 2022
    System.Commandline is my current favorite.
  • Why would you write extension methods for the type you own?
    2 projects | /r/dotnet | 23 Nov 2021
    In the source of there is a Command class which represents a invocation path for a command line program. There is a corresponding CommandExtensions class which is basically a set of extension methods for Command class. This library owns the Command class and yet extension methods are defined for it. What could be the reason for this decision when all the methods can be directly defined inside the command class?
    2 projects | /r/dotnet | 23 Nov 2021
    Second, is what type "owns" the method. This is the crux of the matter. The library authors apparently decided that a Command should not be concerned with how a Command is invoked. If you look at the Command type, you see no Invoke method - at all. The library authors decided that a command should define what the command is but now how it's invoked. That responsibility is handled inside of the CommandExtensions class.
  • Released my first Nuget package - String Command Parser (for use in discord/slack/teams etc bots)
    2 projects | /r/csharp | 1 Jul 2021

What are some alternatives?

When comparing Stateless and command-line-api you can also consider the following projects:

Automatonymous - A state machine library for .Net - 100% code - No doodleware

Appccelerate - State Machine - A .net library that lets you build state machines (hierarchical, async with fluent definition syntax and reporting capabilities).

MassTransit - Distributed Application Framework for .NET

spectre.console - A .NET library that makes it easier to create beautiful console applications.

LiquidState - Efficient asynchronous and synchronous state machines for .NET

ILRepack - Open-source alternative to ILMerge

Cocona - Micro-framework for .NET console application. Cocona makes it easy and fast to build console applications on .NET.

Command Line Parser - The best C# command line parser that brings standardized *nix getopt style, for .NET. Includes F# support

CommandLineUtils - Command line parsing and utilities for .NET

ILMerge - ILMerge is a static linker for .NET Assemblies.

propeller-vt100-terminal - ANSI / VT-100 Terminal emulator for Parallax Propeller microcontroller with VGA and USB support

runtimelab - This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.