Skip to content

Help: Quick start in root help, and a readable, colored layout for every command - #1116

Merged
Nikola Metulev (nmetulev) merged 11 commits into
mainfrom
nmetulev-improve-top-help-start-here
Oct 16, 2026
Merged

Nikola Metulev (nmetulev) merged 11 commits into
mainfrom
nmetulev-improve-top-help-start-here

Conversation

@nmetulev

@nmetulev Nikola Metulev (nmetulev) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What and why

winapp --help used to open with a "Start here" block that only pointed to ui and devtools. 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.

  • Seven panels become four. Get Started and Run & Debug merge into Set Up & Run. Discovery, UI Automation and Performance merge into Develop & Test.
  • About 11 command short descriptions are shorter, so no row wraps at 80 columns.
  • The npm wrapper (npx winapp --help) adds an Electron quick start, because Electron uses the wrapper's node commands instead of winapp run.

Every other command's --help now uses one layout: a summary, a short explanation, usage, examples, arguments, subcommands, and options.

  • Color, in a terminal only: headings are blue, commands and options bright white, and <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, package and init get described examples that can use other commands. For example, package starts with winapp cert generate and ends with Add-AppxPackage. Their options are grouped by purpose, for example run's Build, Launch, Package layout, and Debug and profile groups. Long placeholders are shorter: -c <name>, -f <tfm>, --exe <path>.
  • Command groups such as cert, config and manifest list 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 arguments store and tool pass through.
  • ui and devtools pages: unchanged when piped.

Six run/package option descriptions drop internal detail. For example, --debug-output no longer explains the WINAPP_DBGTOOLS_DIR variable. --cli-schema shows the same shorter text. The CLI still rejects the combinations they no longer mention, with a clear error.

Before / after

Root help, before

before

Root help, after (top of the page)

after

winapp run --help, before (the options in an 88-column terminal)

run before

winapp run --help, after, piped (the plain text agents read)

run after

In a terminal: winapp cert --help, and the end of winapp package --help

cert help in color

package help in color

After: the command panels below Quick start
 All commands:

 ┌─Set Up & Run───────────────────────────────────────────────────────────────┐
 │  new                    Create a new WinUI app                             │
 │  init                   Add a manifest and SDK packages to a project       │
 │  restore                Restore SDK packages for an initialized project    │
 │  update                 Update packages in winapp.yaml                     │
 │  run                    Run an app from a project, .cs file, or folder     │
 │  create-debug-identity  Add package identity to an exe for debugging       │
 │  unregister             Unregister a sideloaded development package        │
 │  target                 Run commands and copy files on an execution target │
 └────────────────────────────────────────────────────────────────────────────┘

 ┌─Develop & Test────────────────────────────────────────────────────┐
 │  find-ui   Search WinUI controls and samples for working code     │
 │  find-api  Search the Windows APIs your project references        │
 │  devtools  Inspect and live-edit a running WinUI app's XAML       │
 │  ui        Inspect and interact with running Windows app UIs      │
 │  perf      Record WinUI timings, GC context, and process counters │
 └───────────────────────────────────────────────────────────────────┘

 ┌─Package, Sign & Publish─────────────────────────────────┐
 │  package   Create MSIX package or bundle                │
 │  manifest  Create and modify Package.appxmanifest files │
 │  cert      Development certificates for code signing    │
 │  sign      Code-sign an MSIX package or executable      │
 │  az-sign   Code-sign a file using Azure Trusted Signing │
 │  store     Run a Microsoft Store Developer CLI command  │
 └─────────────────────────────────────────────────────────┘

 ┌─Advanced───────────────────────────────────────────────────────────────────┐
 │  embed-identity           Add sparse package identity to an app's manifest │
 │  create-external-catalog  Create CodeIntegrityExternal.cat (TrustedLaunch) │
 │  tool                     Run Windows SDK tools (makeappx, signtool, etc.) │
 │  get-winapp-path          Print the path to the global .winapp directory   │
 │  config                   Show or change your per-user winapp settings     │
 └────────────────────────────────────────────────────────────────────────────┘

npm wrapper, appended after the existing Node.js section:

Electron quick start:
  npx winapp init                              add a manifest and Windows SDKs
  npx winapp node add-electron-debug-identity  run with package identity
  npx winapp node create-addon                 call Windows APIs from a native addon

Not tested / risks

  • I didn't run npx winapp --help end to end. I ran the npm unit tests (346 passed), including the one for the init --help wrapper option, which now prints under its own npm wrapper heading.
  • Colors appear only where winapp already uses them: Windows Terminal or VS Code, with UTF-8 output that isn't piped. Other terminals get the plain layout.
  • Quick start and the examples are hand-written. To keep them from going stale, tests parse every winapp line in them against the real CLI and fail on a misspelled command or option. Add-AppxPackage and npx lines aren't checked.

Checklist

  • Tests added or updated: CompactCommandHelpTests covers 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 the ui pages 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, npm dist not built).
  • Tested locally on Windows: Release build with 0 warnings, and the help rendered in Windows Terminal as shown above.
  • Docs, samples, and plugins/winapp/skills/: none quote the help output or the changed descriptions. docs\usage.md keeps the full detail for the shortened options.
Notes for reviewers

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
Copilot AI balanced review requested due to automatic review settings October 16, 2026 18:15
@nmetulev Nikola Metulev (nmetulev) added the agent-preparing Agent is addressing feedback or completing required validation and CI label Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread src/winapp-CLI/WinApp.Cli/Helpers/CustomHelpAction.cs Outdated
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

⏳ Build in progress — metrics below are from a previous commit and will update when the current build finishes.

Build Metrics Report

Validation passed. All required build and validation jobs succeeded.

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 64.74 MB 64.78 MB 📈 +37.5 KB (+0.06%)
CLI (x64) 64.68 MB 64.72 MB 📈 +36.5 KB (+0.06%)
MSIX (ARM64) 26.80 MB 26.82 MB 📈 +25.0 KB (+0.09%)
MSIX (x64) 28.40 MB 28.43 MB 📈 +32.4 KB (+0.11%)
NPM Package 55.85 MB 55.88 MB 📈 +32.3 KB (+0.06%)
NuGet Package 55.98 MB 56.01 MB 📈 +28.7 KB (+0.05%)

.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 Time

79ms median (x64, winapp --version) · ✅ no change vs. baseline

Try This Build

Installs 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))) 1116
Switching between builds often?

Put the tool on your PATH once:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPath

Then this build is just:

winapp-pr 1116

Run winapp-pr with no arguments to pick from a list of open PRs.


Updated 2026-10-16 23:15:10 UTC · commit 74061cf · workflow run

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
@nmetulev Nikola Metulev (nmetulev) changed the title Root help: add a Quick start of common workflows and merge small panels Help: add a Quick start to root help and workflow-first help for run, package, and init Oct 16, 2026
… 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
@nmetulev Nikola Metulev (nmetulev) changed the title Help: add a Quick start to root help and workflow-first help for run, package, and init Help: Quick start in root help, and a readable, colored layout for every command Oct 16, 2026
@nmetulev
Nikola Metulev (nmetulev) merged commit bda01d8 into main Oct 16, 2026
15 checks passed
@nmetulev
Nikola Metulev (nmetulev) deleted the nmetulev-improve-top-help-start-here branch October 16, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-preparing Agent is addressing feedback or completing required validation and CI docs-not-needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants