tye
command-line-api
tye | command-line-api | |
---|---|---|
22 | 22 | |
5,314 | 3,308 | |
- | 0.7% | |
0.0 | 7.6 | |
6 months ago | about 19 hours ago | |
C# | C# | |
MIT License | MIT License |
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.
tye
- The End of the Tye Experiment
-
How to configure true dependency injection in System.CommandLine
System.CommandLine is the official .NET library that provides common functionality for command-line applications. This includes features like argument parsing, automatic help text generation, tab autocomplete, suggestions, corrections, sub-commands, user cancellation, and much more. Many official .NET tools are built on top of System.CommandLine, including the .NET CLI, Kiota, Tye, numerous Azure tools, and other .NET additional tools.
-
Provision microservices infra directly from .sln file
I though tye was a typo but it is an actual project: https://github.com/dotnet/tye
-
Modular Architecture Design question | Re-using modules in multiple applications
I would like to build modules, either in a modular monolith style, or in a microservice style using DAPR and/or Tye.
-
How many of you run your application services locally?
GitHub: https://github.com/dotnet/tye
-
Docker compose when a projektor is spilt into multiple repositories
If you like working with docker compose, you might want to take a look at https://github.com/dotnet/tye
-
Docker-compose vs bridge to kubernetes for local development with debugging
I think it's a good option or docker compose with your services only. Maybe check out project tye. Although it seems abandoned.
-
How to develop .NET applications on Kubernetes with Skaffold
Thoughts on scaffold vs Tye ?
-
Good nuget packages or GitHub repos to check out?
https://github.com/dotnet/tye for starting up many services/projects and tying them all together
-
The complexity of launching local environment
Docker, and check out also Tye https://github.com/dotnet/tye
command-line-api
-
DotMake Command-Line VS command-line-api - a user suggested alternative
2 projects | 13 Dec 2023
System.CommandLine is a very good parser but you need a lot of boilerplate code to get going and the API is hard to discover.
-
How to configure true dependency injection in System.CommandLine
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". // https://github.com/dotnet/command-line-api/blob/2.0.0-beta4.22272.1/src/System.CommandLine/Invocation/ServiceProvider.cs 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
command-line-api
-
Pro .NET Console Apps
I wouldn't go so far as to call it a dead duck. The project is being actively worked on. https://github.com/dotnet/command-line-api
-
Show HN: Replbuilder, quickly build a Python REPL CLI prompt
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 https://github.com/dotnet/command-line-api) and even powershell modules (https://learn.microsoft.com/en-us/powershell/module/microsof...) 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?
https://github.com/dotnet/command-line-api 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
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#.
-
Fellow C# coders, I was randomly making a RANDOM script just for fun, when all of a sudden, an error popped up! For some reason, my program just can't detect a method called "Main" when it's right there! (Program does not contain a static "Main" method suitable for an entry point) Thank you!
What you're trying to do can be accomplished with something like System.CommandLine.DragonFruit. This basically lets you define a strongly typed Main method overload, and it handles converting the string[] for you
- Architecture pattern for Console Apps?
-
What's your favorite command line arg parser?
System.Commandline is my current favorite.
What are some alternatives?
dapr - Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.
spectre.console - A .NET library that makes it easier to create beautiful console applications.
draft - A tool for developers to create cloud-native applications on Kubernetes.
Cocona - Micro-framework for .NET console application. Cocona makes it easy and fast to build console applications on .NET.
okteto - Develop your applications directly in your Kubernetes Cluster
ILRepack - Open-source alternative to ILMerge
awesome-dotnet - A collection of awesome .NET libraries, tools, frameworks and software
Command Line Parser - The best C# command line parser that brings standardized *nix getopt style, for .NET. Includes F# support
Refit - The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.
ILMerge - ILMerge is a static linker for .NET Assemblies.
zeebe-dapr-example - An example that allows to orchestrate Dapr microservices with the Zeebe process engine.
CommandLineUtils - Command line parsing and utilities for .NET