Summary
Add an AZD_NON_INTERACTIVE environment variable that, when set to true or 1, enables non-interactive (no-prompt) mode without requiring the --no-prompt CLI flag.
Motivation
Currently, non-interactive mode can only be triggered via the --no-prompt CLI flag or automatic agent detection. There is no environment variable equivalent.
CI/CD pipelines and container-based workflows often configure behavior via environment variables rather than modifying command arguments. An AZD_NON_INTERACTIVE=true env var would make it trivial to configure non-interactive mode at the environment level (e.g., in a Dockerfile ENV directive or CI job config) without modifying every azd invocation.
Implementation Notes
- Check for
AZD_NON_INTERACTIVE in ParseGlobalFlags() in cmd/auto_install.go
- Priority: explicit
--no-prompt flag > AZD_NON_INTERACTIVE env var > agent auto-detection
- Accept
true, 1 as truthy values (use strconv.ParseBool for consistency)
- Document the env var in the CLI reference
Summary
Add an
AZD_NON_INTERACTIVEenvironment variable that, when set totrueor1, enables non-interactive (no-prompt) mode without requiring the--no-promptCLI flag.Motivation
Currently, non-interactive mode can only be triggered via the
--no-promptCLI flag or automatic agent detection. There is no environment variable equivalent.CI/CD pipelines and container-based workflows often configure behavior via environment variables rather than modifying command arguments. An
AZD_NON_INTERACTIVE=trueenv var would make it trivial to configure non-interactive mode at the environment level (e.g., in a DockerfileENVdirective or CI job config) without modifying everyazdinvocation.Implementation Notes
AZD_NON_INTERACTIVEinParseGlobalFlags()incmd/auto_install.go--no-promptflag >AZD_NON_INTERACTIVEenv var > agent auto-detectiontrue,1as truthy values (usestrconv.ParseBoolfor consistency)