Skip to content

feat: Add Phase 2 CLI commands - flows, connections, connection references, deployment settings#227

Merged
joshsmithxrm merged 3 commits intomainfrom
feature/phase2-cli
Jan 6, 2026
Merged

feat: Add Phase 2 CLI commands - flows, connections, connection references, deployment settings#227
joshsmithxrm merged 3 commits intomainfrom
feature/phase2-cli

Conversation

@joshsmithxrm
Copy link
Owner

Summary

  • ppds flows command group - Manage cloud flows (feat: Add ppds flows command for cloud flow management #142)

    • ppds flows list - List cloud flows (supports --solution, --state)
    • ppds flows get <name> - Get flow details by unique name
    • ppds flows url <name> - Get Power Automate maker URL for a flow
  • ppds connections command group - List Power Platform connections (feat: Add ppds connections command for connector instance management #144)

    • ppds connections list - List connections from Power Apps Admin API
    • ppds connections get <id> - Get connection details by ID
  • ppds connectionreferences command group - Manage connection references with orphan detection (feat: Add ppds connrefs command for connection reference management #143)

    • ppds connectionreferences list - List connection references
    • ppds connectionreferences get <name> - Get connection reference details
    • ppds connectionreferences flows <name> - List flows using a connection reference
    • ppds connectionreferences connections <name> - Show bound connection details
    • ppds connectionreferences analyze - Analyze flow-to-connection-reference relationships
  • ppds deployment-settings command group - Generate and sync deployment settings files (feat: Add ppds deployment-settings command for ALM deployment settings #145)

    • ppds deployment-settings generate - Generate deployment settings file from current environment
    • ppds deployment-settings sync - Sync existing file with solution
    • ppds deployment-settings validate - Validate deployment settings file against solution

Bug Fixes

  • Fixed connections list API scope (use service.powerapps.com instead of api.powerapps.com)
  • Fixed flows url to use Power Platform Environment ID GUID instead of extracting org subdomain

Test plan

  • All unit tests pass (1123 CLI tests)
  • ppds connections list works with interactive auth
  • ppds flows list returns flows from environment
  • New command tests added for all Phase 2 commands

🤖 Generated with Claude Code

joshsmithxrm and others added 2 commits January 6, 2026 16:12
…ences, deployment settings (#142, #143, #144, #145)

Services:
- IFlowService/FlowService: Cloud flow operations with clientdata parsing
- IConnectionService/ConnectionService: Power Apps Admin API connections
- IConnectionReferenceService/ConnectionReferenceService: CR operations with orphan detection
- IDeploymentSettingsService/DeploymentSettingsService: PAC-compatible deployment settings
- FlowClientDataParser: Extract CR logical names from flow JSON

CLI Commands:
- ppds flows list/get/url
- ppds connections list/get
- ppds connectionreferences list/get/flows/connections/analyze
- ppds deployment-settings generate/sync/validate

Tests:
- FlowServiceTests, FlowClientDataParserTests
- ConnectionReferenceServiceTests
- DeploymentSettingsServiceTests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add command structure tests for:
- ConnectionReferences: ConnectionsCommand, FlowsCommand, GetCommand
- Connections: GetCommand
- DeploymentSettings: GenerateCommand, SyncCommand, ValidateCommand
- Flows: GetCommand, UrlCommand
- Services: ConnectionService

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @joshsmithxrm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the CLI's capabilities by introducing a suite of new commands for managing Power Automate cloud flows, Power Platform connections, and connection references. It also adds robust functionality for handling deployment settings files, enabling better automation and validation for Power Platform solution deployments. These additions aim to provide developers with more granular control and insight into their Power Platform environments directly from the command line.

Highlights

  • New CLI Command Groups: Introduced four new command groups: 'ppds flows' for managing cloud flows, 'ppds connections' for listing Power Platform connections, 'ppds connectionreferences' for managing connection references with orphan detection, and 'ppds deployment-settings' for generating, syncing, and validating deployment settings files.
  • Cloud Flow Management: Added commands to list, get details, and retrieve the Power Automate maker URL for cloud flows.
  • Power Platform Connection Management: Implemented commands to list and get details of Power Platform connections via the Power Apps Admin API.
  • Connection Reference Management & Analysis: Provided commands to list, get details, list associated flows, show bound connections, and analyze relationships for connection references, including orphan detection.
  • Deployment Settings Automation: Enabled generation of deployment settings files from an environment, syncing existing files with solution changes while preserving values, and validating settings against a solution.
  • API Scope Fixes: Corrected the API scope for 'connections list' to use 'service.powerapps.com' and updated 'flows url' to use the Power Platform Environment ID GUID for accurate URL generation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant set of new CLI commands for managing Power Platform resources, including flows, connections, connection references, and deployment settings. This is a major feature addition that greatly enhances the tool's capabilities. The implementation is well-structured, adding new services and commands with support for both JSON and human-readable output. The code also correctly handles API scope changes for authentication. My review identifies a minor but important consistency issue across several of the new commands where human-readable output is written to stdout instead of stderr, which goes against the established CLI design principles for the project. Addressing this will improve the tool's usability in scripted environments.

Copy link

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 adds Phase 2 CLI commands for managing Power Platform flows, connections, connection references, and deployment settings. The implementation includes comprehensive service layers, API integrations, and orphan detection features.

Key changes:

  • Four new command groups with 15 total subcommands for flow and connection management
  • Service layer implementations for flows, connection references, deployment settings, and Power Apps Admin API connections
  • Flow client data parser utility for extracting connection reference dependencies
  • Environment ID tracking for Power Apps Admin API operations

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/PPDS.Dataverse/Services/IFlowService.cs Interface for cloud flow operations with connection reference extraction
src/PPDS.Dataverse/Services/FlowService.cs Implementation querying workflow entities and parsing client data
src/PPDS.Dataverse/Services/IConnectionReferenceService.cs Interface with orphan detection and flow relationship analysis
src/PPDS.Dataverse/Services/ConnectionReferenceService.cs Implementation with case-insensitive CR lookup and orphan detection
src/PPDS.Dataverse/Services/IDeploymentSettingsService.cs Interface for PAC-compatible deployment settings operations
src/PPDS.Dataverse/Services/DeploymentSettingsService.cs Implementation with generate, sync, and validate operations
src/PPDS.Dataverse/Services/Utilities/FlowClientDataParser.cs JSON parser for extracting connection references from flow metadata
src/PPDS.Cli/Services/IConnectionService.cs Interface for Power Apps Admin API connection operations
src/PPDS.Cli/Services/ConnectionService.cs HTTP client implementation for connections API
src/PPDS.Cli/Commands/Flows/* CLI commands for flow operations (list, get, url)
src/PPDS.Cli/Commands/Connections/* CLI commands for connection operations (list, get)
src/PPDS.Cli/Commands/ConnectionReferences/* CLI commands for connection reference operations with analyze command
src/PPDS.Cli/Commands/DeploymentSettings/* CLI commands for deployment settings (generate, sync, validate)
src/PPDS.Auth/Credentials/* Added GetFlowApiTokenAsync for service.powerapps.com scope
src/PPDS.Cli/Infrastructure/* Added EnvironmentId tracking for Power Apps Admin API
Test files Comprehensive unit tests for all new services and commands

The implementation is well-structured with proper separation of concerns, comprehensive error handling, and extensive test coverage. No critical issues were identified.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Change Console.WriteLine to Console.Error.WriteLine for analysis
and validation output to keep stdout clean for machine-readable data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@joshsmithxrm joshsmithxrm merged commit d13cbe5 into main Jan 6, 2026
42 of 43 checks passed
@joshsmithxrm joshsmithxrm deleted the feature/phase2-cli branch January 6, 2026 22:37
@github-project-automation github-project-automation bot moved this from Todo to Done in PPDS Roadmap Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants