Repository navigation
Help: Quick start in root help, and a readable, colored layout for every command - #1116
Conversation
Root help now opens with common workflows (build a WinUI app, add winapp to an existing app, package for install, automate UI) before listing all commands. Discovery, UI Automation and Performance merge into one Develop & Test panel, and Get Started merges with Run & Debug. The npm wrapper adds an Electron quick start. A test parses every Quick start command against the CLI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
… gap Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
There was a problem hiding this comment.
🟡 Changes recommended
The WinUI Quick start omits entering the generated project directory, causing its next command to target the wrong folder.
1 open finding
What changed in this PR
Root help now introduces common workflows before the full command list, making setup and everyday tasks easier to find.
Changes:
- Adds native CLI and Electron Quick start examples.
- Consolidates command panels and shortens descriptions.
- Tests Quick start placement and command parsing.
| File | Description |
|---|---|
| src/winapp-npm/src/cli.ts | Adds Electron Quick start. |
| src/winapp-CLI/WinApp.Cli/Helpers/CustomHelpAction.cs | Renders workflow examples before commands. |
| src/winapp-CLI/WinApp.Cli/Commands/WinAppRootCommand.cs | Consolidates command panels. |
| src/winapp-CLI/WinApp.Cli/Commands/ToolCommand.cs | Shortens tool description. |
| src/winapp-CLI/WinApp.Cli/Commands/RunCommand.cs | Shortens run description. |
| src/winapp-CLI/WinApp.Cli/Commands/RestoreCommand.cs | Revises restore description. |
| src/winapp-CLI/WinApp.Cli/Commands/PerfCommand.cs | Shortens performance description. |
| src/winapp-CLI/WinApp.Cli/Commands/InitCommand.cs | Simplifies initialization description. |
| src/winapp-CLI/WinApp.Cli/Commands/FindUiCommand.cs | Simplifies control-search description. |
| src/winapp-CLI/WinApp.Cli/Commands/FindApiCommand.cs | Simplifies API-search description. |
| src/winapp-CLI/WinApp.Cli/Commands/EmbedIdentityCommand.cs | Shortens identity description. |
| src/winapp-CLI/WinApp.Cli/Commands/DevToolsCommand.cs | Shortens live-inspection description. |
| src/winapp-CLI/WinApp.Cli/Commands/CreateExternalCatalogCommand.cs | Shortens catalog description. |
| src/winapp-CLI/WinApp.Cli/Commands/CreateDebugIdentityCommand.cs | Simplifies debug-identity description. |
| src/winapp-CLI/WinApp.Cli.Tests/UiHelpTests.cs | Checks workflow rendering and parsing. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Build Metrics ReportValidation passed. All required build and validation jobs succeeded. Binary Sizes
.NET Test Results (TRX reports)Other suites are reflected in the overall validation status above. ✅ 10517 passed, 43 skipped out of 10560 tests in 1727.1s (+18 tests, -713.9s vs. baseline) Test Coverage✅ 87.3% line coverage, 81.5% branch coverage · ✅ no change vs. baseline CLI Startup Time79ms median (x64, Try This BuildInstalls the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing. & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 1116Switching between builds often?Put the tool on your PATH once: & ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPathThen this build is just: winapp-pr 1116Run Updated 2026-10-16 23:15:10 UTC · commit |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
'winapp run/package/init --help' now use the plain-text layout from 'ui' and 'devtools': summary, typical workflow (which can use other commands), usage, examples, and options grouped by purpose. The run and init descriptions are rewritten, and six option descriptions drop internal detail; the CLI still rejects the combinations they no longer mention. Tests check every option is grouped and every example and workflow step parses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
… group The run description again says apps can be packaged or unpackaged, and the init description says .NET projects get PackageReferences instead of winapp.yaml. The npm wrapper no longer erases the last native help line; it prints --add-js-bindings under its own heading. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
Every command except the root now uses the compact help layout, with a Commands list for command groups such as 'cert' and 'config'. In a color terminal, headings, commands, and placeholders are colored, text after a description's first sentence is dimmed, and multi-line entries are spaced apart; redirected help stays plain. run, package, and init merge their workflow and examples into one described Examples list, and long option placeholders are shorter (<name>, <path>, <tfm>). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb
Pages that used System.CommandLine's default help before now show option defaults, allowed values (e.g. --if-exists <Error|Overwrite|Skip>), (REQUIRED) markers, optional and repeatable arguments, and pass-through arguments for store and tool. ui and devtools pages are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cefdbcd6-bef0-4fde-a18d-b01c7060aadb

What and why
winapp --helpused to open with a "Start here" block that only pointed touianddevtools. Those are advanced features, while the first steps (new,init,run,package) only appeared further down, in the command panels. The help page of each command was a different problem: a long description line, then an ungrouped wall of options.Root help now opens with a Quick start of four workflows: build a WinUI app, add winapp to an existing app, package for install, and automate any app's UI. Each step is a real command with a few words on what it does. An All commands: heading introduces the full list below it, so every command is still listed.
npx winapp --help) adds an Electron quick start, because Electron uses the wrapper'snodecommands instead ofwinapp run.Every other command's
--helpnow uses one layout: a summary, a short explanation, usage, examples, arguments, subcommands, and options.<placeholders>grey. Text after the first sentence of a description is grey, so you can skim, and multi-line entries get a blank line between them. Piped output, which agents read, stays plain text with no extra lines.run,packageandinitget described examples that can use other commands. For example,packagestarts withwinapp cert generateand ends withAdd-AppxPackage. Their options are grouped by purpose, for examplerun's Build, Launch, Package layout, and Debug and profile groups. Long placeholders are shorter:-c <name>,-f <tfm>,--exe <path>.cert,configandmanifestlist their subcommands. The help pages that used the old default layout still show option defaults, allowed values (--if-exists <Error|Overwrite|Skip>),(REQUIRED)markers, and argumentsstoreandtoolpass through.uianddevtoolspages: unchanged when piped.Six
run/packageoption descriptions drop internal detail. For example,--debug-outputno longer explains theWINAPP_DBGTOOLS_DIRvariable.--cli-schemashows the same shorter text. The CLI still rejects the combinations they no longer mention, with a clear error.Before / after
Root help, before
Root help, after (top of the page)
winapp run --help, before (the options in an 88-column terminal)winapp run --help, after, piped (the plain text agents read)In a terminal:
winapp cert --help, and the end ofwinapp package --helpAfter: the command panels below Quick start
npm wrapper, appended after the existing Node.js section:
Not tested / risks
npx winapp --helpend to end. I ran the npm unit tests (346 passed), including the one for theinit --helpwrapper option, which now prints under its ownnpm wrapperheading.winappline in them against the real CLI and fail on a misspelled command or option.Add-AppxPackageandnpxlines aren't checked.Checklist
CompactCommandHelpTestscovers several things. Every command's help lists its subcommands and options and fits 88 columns. Colored help has the same text as plain help. Defaults, allowed values,(REQUIRED)and argument shapes are kept, and theuipages are unchanged. Every option is in one group, and every example parses.RootHelp_*covers the Quick start. Command:dotnet run --project src\winapp-CLI\WinApp.Cli.Tests\WinApp.Cli.Tests.csproj -c Release --no-build -- --filter "FullyQualifiedName~CompactCommandHelpTests|FullyQualifiedName~UiHelpTests|FullyQualifiedName~CustomHelpTests|FullyQualifiedName~DevToolsHelpTests|FullyQualifiedName~TargetSelectionParser|FullyQualifiedName~ConfigCommandTests|FullyQualifiedName~UiCommandTests|FullyQualifiedName~Perf". Result: passed, 1370 total and 0 failed. The full suite locally: every failure was environmental (nuget.org blocked on a corp machine, native test fixture not built, npmdistnot built).plugins/winapp/skills/: none quote the help output or the changed descriptions.docs\usage.mdkeeps the full detail for the shortened options.Notes for reviewers
uianddevtoolsas--helpon purpose. Those help pages are curated guides for agents (Agent-firstwinapp uihelp and unknown-command suggestions #942, WinUI DevTools: inspect, comment on and live-edit a running WinUI app #943).packagesays<.csproj|folder>because it doesn't accept a.vcxproj, whilerundoes ([Feature]:winapp packageshould accept a C++.vcxprojlikewinapp rundoes #1115).BannerHelper.UseEmojiis true. Widths are computed on the plain text, so the layout is identical with and without color.HelpName) contain no|. The npm generator turns|into a TypeScript union type, so these don't change the npm API.restorenow reads "Restore SDK packages for an initialized project". .NET projects set up byinithave nowinapp.yaml.