CLI Reference

Complete reference for all azd app commands and flags.

Global Flags

These flags are available for all commands:

FlagShortDescription
--output-oOutput format (default, json)
--debug-Enable debug logging
--structured-logs-Enable structured JSON logging to stderr
--cwd-CSets the current working directory

Commands

azd app reqsFull Docs

Verifies that all required tools are installed and optionally checks if they are running. Can also auto-generate requirements from your project.

6 flags • 6 examples
azd app depsFull Docs

Automatically detects your project type and installs all dependencies.

7 flags • 6 examples
azd app addFull Docs

Add a well-known container service to your azure.yaml configuration.

3 flags • 5 examples
azd app runFull Docs

Starts your development environment based on project type with support for multi-service orchestration.

17 flags • 9 examples
azd app startFull Docs

Start stopped services.

2 flags • 4 examples
azd app stopFull Docs

Stop running services, execute lifecycle hooks, and tear down the app.

3 flags • 4 examples
azd app restartFull Docs

Restart services.

3 flags • 4 examples
azd app healthFull Docs

Monitor the health status of running services with production-grade reliability and observability features.

21 flags • 9 examples
azd app logsFull Docs

View logs from running services with filtering and follow support.

19 flags • 10 examples
azd app infoFull Docs

Show comprehensive information about running services.

6 flags • 4 examples
azd app testFull Docs

Run tests for all services in your application with support for different test types and aggregated code coverage.

19 flags • 10 examples
azd app certFull Docs

Generate local HTTPS certificates for development.

2 flags • 4 examples
azd app cleanFull Docs

Remove build output and cache directories for the services defined in `azure.yaml`.

4 flags • 6 examples
azd app completionFull Docs

Generate shell autocompletion scripts for `azd app`.

1 flags • 4 examples
azd app configFull Docs

Show the configuration azd app resolved from azure.yaml for each service.

1 flags • 4 examples
azd app doctorFull Docs

Checks whether the local machine can run the project. Where `validate` checks `azure.yaml` itself, `doctor` also checks the environment around it: service paths on disk, required tools on `PATH`, port declarations, and whether the dashboard is already running. Nothing is started and no files are written.

1 flags • 4 examples
azd app envFull Docs

Print the effective environment a service receives when it runs.

10 flags • 10 examples
azd app graphFull Docs

Show services, resources, dependency edges, and startup levels from `azure.yaml`.

4 flags • 8 examples
azd app hooksFull Docs

List the project-level lifecycle hooks configured in `azure.yaml`.

0 flags • 3 examples
azd app initFull Docs

Scans your project to detect services, languages, frameworks, and infrastructure dependencies, then generates or enriches `azure.yaml` with all the settings needed for `azd app run`.

2 flags • 4 examples
azd app mcpFull Docs

Model Context Protocol (MCP) server for AI assistant integration. Enables AI assistants like Claude Desktop and GitHub Copilot to interact with your azd app projects.

0 flags • 3 examples
azd app notificationsFull Docs

View and manage notifications for service state changes and events.

7 flags • 10 examples
azd app openFull Docs

Resolve a service URL from `azure.yaml` or the running app state and open it in the default browser.

2 flags • 4 examples
azd app outdatedFull Docs

Check every service in `azure.yaml` for outdated dependencies and print one aggregated report.

5 flags • 7 examples
azd app portsFull Docs

Reads `azure.yaml` and lists the host port each service binds. An explicit host port is shown as its number; a port left for the tool to assign is shown as `auto`. When two bindings claim the same explicit host port the command reports the conflict and exits non-zero, so it works as a preflight check before `azd app run`.

1 flags • 3 examples
azd app proxyFull Docs

Start a local reverse proxy for running services.

1 flags • 3 examples
azd app removeFull Docs

Remove a service from the `services` section of `azure.yaml`.

0 flags • 3 examples
azd app statusFull Docs

Report whether `azd app run` is currently active for this project, and print a one-line summary per service.

5 flags • 6 examples
azd app support-bundleFull Docs

Collect sanitized project, service, health, and log diagnostics into a local folder for issue reports.

5 flags • 6 examples
azd app validateFull Docs

Validates `azure.yaml` with read-only checks for service references, project paths, ports, service types, modes, and command readiness. Nothing is started and no files are written.

1 flags • 3 examples
azd app versionFull Docs

Show version information for the azd app extension.

1 flags • 3 examples

Quick Reference

Terminal window
# Check prerequisites
azd app reqs
# Install dependencies
azd app deps
# Start development environment
azd app run
# Monitor service health
azd app health --stream
# View logs
azd app logs --follow
# Show running services
azd app info
# Start MCP server for AI debugging
azd app mcp serve

Environment Variables

When running through azd app <command>, these Azure environment variables are automatically available:

VariableDescription
AZURE_SUBSCRIPTION_IDCurrent Azure subscription
AZURE_RESOURCE_GROUP_NAMETarget resource group
AZURE_ENV_NAMEEnvironment name
AZURE_LOCATIONAzure region

AI-Powered Debugging with MCP

The azd app mcp command enables AI assistants like GitHub Copilot to interact with your running services.

Learn about MCP integration →