-
Notifications
You must be signed in to change notification settings - Fork 267
Add azd config options command for config discoverability
#6390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
azd config options command for config discoverability
|
@copilot does this also encompass the possible ENV values that azd uses for configs and feature flags? |
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
Yes! I've updated the implementation to include environment variable information. The output now shows:
The command output now includes an "Environment Variable" column in table format, and the Commit: f20cebb Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot show what the command is and the help looks like for the command. |
Command Usageazd config optionsHelp OutputThe command appears in Output ExamplesTable format (default): JSON format: $ azd config options -o json | jq '.[0:2]'
[
{
"Key": "defaults.subscription",
"Description": "Default Azure subscription ID to use for operations.",
"Type": "string",
"AllowedValues": null,
"Example": "00000000-0000-0000-0000-000000000000",
"EnvVar": ""
},
{
"Key": "alpha.all",
"Description": "Enable or disable all alpha features at once.",
"Type": "string",
"AllowedValues": ["on", "off"],
"EnvVar": "AZD_ALPHA_ENABLE_ALL"
}
]Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot in the output of the command, the table, can we also show the current value that is set. |
Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
Added! The table now includes a "Current Value" column that shows the currently configured value for each setting. Example output with some values set: The column displays:
Commit: 6accc32 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
cli/azd/cmd/config.go
Outdated
| }) | ||
| } | ||
|
|
||
| columns := []output.Column{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was about to leave the same comment. If all of these columns are important, I would recommend making the display a JSON format by default, rather than a table.
If we want a table, I think the columns should just be "Variable", "Current Value", "Allowed Values". Add a link to the docs for the description and examples, or add a tag --verbose for full content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON is not very readable, linking to docs is meh experience. User could just expand their window :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GUIDs in the Current Value and Example columns (defaults.subscription key) are making those columns extra wide and hard to read when wrapped. On my typical VS Code setup (left sidebar, window fully maximized), the output still wraps:
I feel that Current Value would make most sense to omit, since users can use azd config get? We don't include the current value in azd config options --output json either. Otherwise, JSON feels more readable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we format azd config list-alpha feels more readable to me as well:
$ azd config list-alpha
Name: aca.persistDomains
Description: Do not change custom domains when deploying Azure Container Apps.
Status: Off
Name: aca.persistIngressSessionAffinity
Description: Do not change Ingress Session Affinity when deploying Azure Container Apps.
Status: Off
Name: aks.helm
Description: Enable Helm support for AKS deployments.
Status: Off
Name: aks.kustomize
Description: Enable Kustomize support for AKS deployments.
Status: Off
Name: azd.operations
Description: Extends provisioning providers with azd operations.
Status: Off
Name: deployment.stacks
Description: Enables Azure deployment stacks for ARM/Bicep based deployments.
Status: On
Name: language.custom
Description: Enables support for services to use custom language.
Status: Off
Name: llm
Description: Enables the use of LLMs in the CLI.
Status: Off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the default output format to a readable list format similar to azd config list-alpha. The new format:
- Shows one option per section with key/value pairs
- Much easier to read and doesn't wrap
- Removed Current Value from default output (users can use
azd config get) - Table format still available with
-o table
New default output:
Key: defaults.subscription
Description: Default Azure subscription ID to use for operations.
Example: 00000000-0000-0000-0000-000000000000
Key: alpha.all
Description: Enable or disable all alpha features at once.
Allowed Values: on, off
Environment Variable: AZD_ALPHA_ENABLE_ALL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about reducing detail in the list view and adding a show command for more info on a single command?
$ azd config options
Key Type Current Value Environment Variable
defaults.subscription string XXXX-XXXX-12313
defaults.location string eastus2
alpha.all string AZD_ALPHA_ENABLE_ALL
alpha.llm string on AZD_ALPHA_ENABLE_LLM
alpha.language.custom string off AZD_ALPHA_ENABLE_LANGUAGE_CUSTOM
(env) AZD_CONFIG_DIR envvar
$azd config show alpha.all
Key: alpha.all
Description: Enable or disable all alpha features at once.
Allowed Values: on, off
Environment Variable: AZD_ALPHA_ENABLE_ALL
@SophCarp thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have azd config show:


azd config show shows your current configurations (which honestly I think should be azd config list but that's beside the point).
I guess you could do azd config options list and azd config options show to get the table and then the details of one specific one, but that also means 3 nouns before the verb rather than 2. We do have some of those already ( ex: azd template source list ) but not too may. Doing this would also make command be a verb which we try to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show returns everything in JSON, does not take a parameter for a specific one nor does it offer a format like az i.e. az group list -o table
No, I am not in favor of adding an addition verb here either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest iteration seems good to me. There's some overlap between command descriptions if we want to differentiate between get, options and show a bit more:
get : Gets a configuration.
list-alpha : Display the list of available features in alpha stage.
options : List all available configuration settings.
show : Show all the configuration values.
|
@copilot address the help properly for |
- Add getCmdConfigOptionsHelpFooter function with usage examples - Include examples for table format, JSON format, and setting config values - Update usage test snapshots to include new help examples - Improves discoverability and user experience for the new command Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
Fixed! Added proper help examples for The help now includes:
Commit: 2baf73e Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
- Change default format from table to list format similar to list-alpha - Table format is still available with -o table flag - List format is much more readable and doesn't wrap on normal terminals - Remove Current Value column from default output (users can use azd config get) - Update help examples to reflect new default format - Update usage test snapshots Addresses feedback about table readability issues from @JeffreyCA and @SophCarp Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
- Add tests for JSON format output - Add tests for table format output - Add tests for default list format output - Tests verify expected config options are present - Tests verify output contains correct fields Addresses test coverage feedback from @spboyer Co-authored-by: spboyer <7681382+spboyer@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Can you check the formatting:
And also make sure all snapshots are up to date by running this from
|
- Remove trailing whitespace and fix indentation - All formatting issues resolved Addresses feedback from @JeffreyCA Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Fixed!
Commit: d049097 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
|
/check-enforcer override |



Implementation Plan: Add
azd config optionscommandazd config optionscommand actionChanges Made
resources/config_options.yamlwith all config settingspkg/config/config_options.goto load and expose config optionsazd config optionscommand with JSON and table output formatspkg/config/config_options_test.gocmd/config_options_test.go-o tableCommand Output
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.