Skip to content

CLI: Add system command#40438

Open
dkbennett wants to merge 3 commits intomasterfrom
user/dkbennett/systemcommand
Open

CLI: Add system command#40438
dkbennett wants to merge 3 commits intomasterfrom
user/dkbennett/systemcommand

Conversation

@dkbennett
Copy link
Copy Markdown
Member

Summary of the Pull Request

Adds system command, with the existing "session" command under it.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Added new root subcommand "system"
Moved existing "session" command to be under it.
Updated unit tests.
Updated E2E tests.

Validation Steps Performed

Ran unit tests

Copilot AI review requested due to automatic review settings May 6, 2026 12:26
@dkbennett dkbennett requested a review from a team as a code owner May 6, 2026 12:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new top-level system command group in the WSLC CLI and moves the existing session command tree underneath it, aligning session management under a system-scoped namespace.

Changes:

  • Add SystemCommand and register it under RootCommand; SessionCommand is now reached via wslc system session ....
  • Update CLI parsing/unit/E2E tests to use the new command path.
  • Add localized descriptions for the new system command.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/windows/wslc/WSLCCLICommandUnitTests.cpp Adds coverage for SystemCommand and updates session-related unit tests to the new command path.
test/windows/wslc/e2e/WSLCE2EGlobalTests.cpp Updates E2E command invocations and root help expectations to include system instead of top-level session.
test/windows/wslc/CommandLineTestCases.h Updates command-line parsing test cases to system session ....
src/windows/wslc/commands/SystemCommand.h Declares the new SystemCommand root command.
src/windows/wslc/commands/SystemCommand.cpp Implements SystemCommand and wires SessionCommand as a subcommand.
src/windows/wslc/commands/RootCommand.cpp Registers SystemCommand at the root (and removes top-level SessionCommand).
localization/strings/en-US/Resources.resw Adds localized strings for system command short/long descriptions.

</data>
<data name="WSLCCLI_SystemCommandDesc" xml:space="preserve">
<value>System-level commands</value>
<comment>{Locked="WSL"}Product names should not be translated</comment>
Comment on lines 33 to 38
commands.push_back(std::make_unique<ContainerCommand>(FullName()));
commands.push_back(std::make_unique<ImageCommand>(FullName()));
commands.push_back(std::make_unique<RegistryCommand>(FullName()));
commands.push_back(std::make_unique<SessionCommand>(FullName()));
commands.push_back(std::make_unique<SettingsCommand>(FullName()));
commands.push_back(std::make_unique<SystemCommand>(FullName()));
commands.push_back(std::make_unique<VolumeCommand>(FullName()));
Comment thread src/windows/wslc/commands/SystemCommand.cpp
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