Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Azure CLI

$ az Official High Risk
Microsoft · Cloud & Infra · MIT · macos / linux / windows

Azure CLI (az) manages Microsoft Azure subscriptions, AKS, Entra ID, and ARM deployments using consistent --output json (-o json) formatting, client-side JMESPath --query filtering, --only-show-errors, and --what-if dry-run previews on ARM template deployments.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
brew install azure-cli
CLI vs MCP Decision CLI Preferred vs MCP

az offers deterministic -o json + JMESPath --query across all Azure Resource Manager services, outperforming large MCP toolsets.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Uniform --output json, built-in JMESPath --query, --yes, and --only-show-errors provide strong machine-readability.

  • Supports -o json, --query (JMESPath), and --only-show-errors globally
Trust & Safety 20 / 25

Subscription isolation via --subscription, RBAC service principals, and --what-if on deployments help, though destructive deletes carry high impact.

  • ARM deployments support --what-if; destructive deletes require --yes
Setup & Portability 12 / 15

Distributed via Homebrew, pip, and OS packages on macOS, Linux, and Windows, though Python dependency weight slows installation.

  • Official azure-cli packages for Homebrew, apt, yum, MSI, and PyPI
Utility & Efficiency 14 / 15

Broad ARM coverage and --query filtering cut token volume substantially.

  • Single CLI covers all Azure control-plane APIs
Maintenance & Lineage 10 / 10

First-party Microsoft tool (Azure/azure-cli) with frequent scheduled releases.

  • Official Azure/azure-cli GitHub repository under MIT
Docs & Verifiability 9 / 10

Detailed --help examples and comprehensive Microsoft Learn reference pages.

  • Consistent --help output and online command index

Security, Auth & Guardrails

Auth Modes
OAuth Browser Service Account Env API Key Config File
Credential Storage

Stores MSAL token cache and subscription context in ~/.azure/, or uses AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI is free (MIT); Azure deployments incur cloud subscription charges.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Azure CLI Agent Rules
- Always verify `az account show --output json` and pass `--subscription` explicitly.
- Append `--output json --only-show-errors` and trim results with `--query`.
- Use `--what-if` for `az deployment` runs; require human approval for `delete` or `purge`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Verify active Azure subscription and tenant
az account show --output json --only-show-errors

Confirms the active subscription ID and tenant before reading or modifying Azure resources.

Query resource groups with JMESPath
az group list --output json --query '[].{name:name,location:location}'

Projects only group name and location using --query to keep output compact.

Controlled Writes & Previews

Preview an ARM/Bicep deployment with --what-if
az deployment group create --resource-group rg-app --template-file main.bicep --what-if

Computes resource creates, updates, and deletes without applying changes.

Strengths for Agents

  • + Built-in JMESPath --query and --output json work consistently across services.
  • + az deployment ... --what-if previews ARM and Bicep mutations safely.
  • + --only-show-errors suppresses noisy warning banners in automated runs.

Caveats & Pitfalls

  • ! Python-based runtime has slower startup latency than compiled Go/Rust CLIs.
  • ! --what-if is limited to ARM/Bicep deployments rather than imperative resource commands.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI