Skip to content

[Feature] Config Output To Project Command#84

Open
antonio-amjr wants to merge 2 commits into
project-chip:v2.15.1-cli-developfrom
antonio-amjr:feature/cli_config_output_for_project_command
Open

[Feature] Config Output To Project Command#84
antonio-amjr wants to merge 2 commits into
project-chip:v2.15.1-cli-developfrom
antonio-amjr:feature/cli_config_output_for_project_command

Conversation

@antonio-amjr
Copy link
Copy Markdown
Contributor

Fix: project-chip/certification-tool#983

Description

Simple addition of config output for CLI project command using the argument --config.

The pain point tackled here is when someone would like to create or update a project using another existing project configuration from the list. With this output, one can simply copy and paste to a file to use in project manipulation.

This feature requires a specific project to print the configuration, resulting in error otherwise (I fail to see value printing all the configurations for all existing projects without knowing each is each).
Please note that the --json argument will print more information than the project config, so using the new one would be more straight forward.

Testing

Direct command test and simple sanity of the Project command.

Screenshots

Screenshot 2026-05-18 at 15 24 09

@antonio-amjr antonio-amjr self-assigned this May 18, 2026
@antonio-amjr antonio-amjr added the enhancement New feature or request label May 18, 2026
@antonio-amjr antonio-amjr changed the title [Feature] [Feature] Config Output To Project Command May 18, 2026
Copy link
Copy Markdown
Contributor

@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 new --config option to the list_projects command, enabling users to output project configurations in JSON format. The feedback focuses on improving consistency and robustness: adding a short flag -c to the new option, refactoring the __print_config utility to avoid shadowing the built-in object type, and enhancing error handling by raising a CLIError instead of using click.echo when multiple projects are provided.

Comment thread th_cli/commands/project.py
Comment thread th_cli/utils.py Outdated
Comment thread th_cli/utils.py Outdated
Comment thread th_cli/commands/project.py
@antonio-amjr antonio-amjr changed the base branch from v2.15-cli-develop to v2.15.1-cli-develop May 21, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants