Skip to content

Switch oss.cs CLI arg parsing to ConsoleAppFramework - #38

Merged
kzu merged 3 commits into
mainfrom
copilot/update-oss-cs-args
May 12, 2026
Merged

kzu merged 3 commits into
mainfrom
copilot/update-oss-cs-args

Conversation

Copilot AI commented May 12, 2026

Copy link
Copy Markdown
Contributor

System.CommandLine required significant boilerplate for what is just three optional string options: explicit Option<T> objects, RootCommand wiring, and SetHandler with repeated option references.

Changes

  • Drop System.CommandLine@2.0.7 in favor of ConsoleAppFramework@*
  • Replace Option<> / RootCommand / SetHandler setup with a single ConsoleApp.RunAsync lambda — parameters auto-bind to --project, --repo, --package
// Before: ~10 lines of plumbing + SetHandler(..., projectOption, repoOption, packageOption)
// After:
await ConsoleApp.RunAsync(args, async (
    /// <summary>Project name</summary>
    string? project = null,
    /// <summary>Repo name (defaults to project name)</summary>
    string? repo = null,
    /// <summary>Package ID (defaults to Devlooped.{project})</summary>
    string? package = null) =>
{
    // handler body unchanged
});

Copilot AI assigned Copilot and kzu May 12, 2026
@kzu
kzu marked this pull request as ready for review May 12, 2026 21:42
@kzu
kzu merged commit 25cec66 into main May 12, 2026
1 check passed
@kzu
kzu deleted the copilot/update-oss-cs-args branch May 12, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants