Everlong.CommandLine
0.2.0
Prefix Reserved
dotnet add package Everlong.CommandLine --version 0.2.0
NuGet\Install-Package Everlong.CommandLine -Version 0.2.0
<PackageReference Include="Everlong.CommandLine" Version="0.2.0" />
<PackageVersion Include="Everlong.CommandLine" Version="0.2.0" />
<PackageReference Include="Everlong.CommandLine" />
paket add Everlong.CommandLine --version 0.2.0
#r "nuget: Everlong.CommandLine, 0.2.0"
#:package Everlong.CommandLine@0.2.0
#addin nuget:?package=Everlong.CommandLine&version=0.2.0
#tool nuget:?package=Everlong.CommandLine&version=0.2.0
Everlong.CommandLine
Everlong.CommandLine is a command-tree based CLI framework built on System.CommandLine. It grows out of the internals of Psm (personal scripts manager) and powers its command tree, interactive menus and service injection.
dotnet add package Everlong.CommandLine
⚠️ Early development: depends on System.CommandLine 3.x preview; API may change before 1.0.
What's included
| Area | Types |
|---|---|
| Command base | CommandBase (auto-registers ExecuteAsync as the action), RunInteractiveAsync |
| Interactive UI | InteractiveMenu (subcommand picker, ↑↓ select, inline args), IInteractiveCommand (leaf custom UI) |
| DI | IProvider (command-tree scoped services), ParseResultExtensions.ActivateBranch() + ChainInjector |
| Helpers | ConsoleHelper, ProcessRunner, GitHelper, FileHelper, FileSystemWalker, FormatHelper, WildcardHelper |
| Windows | WindowsHelper (UAC elevate), DialogHelper (WinForms pickers via embedded PowerShell) |
Requirements
- .NET 8+
LangVersion preview(the codebase uses C# 14fieldkeyword; a .NET 10 SDK compiler is recommended)
Quick Start
using System.CommandLine;
using Everlong.CommandLine;
var root = new RootCommand("my tool");
// build your command tree from CommandBase subclasses, then:
ParseResult pr = root.Parse(args);
return await pr.ActivateBranch().InvokeAsync();
Subcommands inherit CommandBase, override Execute(ParseResult) (sync) or
ExecuteAsync(ParseResult, CancellationToken) (async, cancellable), and receive
services through [Inject] from the nearest IProvider ancestor (via Everlong.DI).
License
MIT
| 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 was computed. 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
- Everlong.DI (>= 0.4.0)
- System.CommandLine (>= 3.0.0-preview.5.26302.115)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
0.2.0: Migrated to Everlong.DI 0.4.0 (v2 member-anchored injection) — consumers must drop [Injectable], keep partial + [Inject] (see docs/MIGRATION-v0.2.0.md). | 0.1.0: Initial release — CommandBase command-tree base, interactive subcommand menu, chain DI injection (ActivateBranch), console/process/git/file/windows helpers.