Skip to content

Add AZD_NON_INTERACTIVE environment variable support #7388

Description

@spboyer

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement

Fields

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions