rtk-ai/rtk

feat: add Azure CLI (az) filter support

Open

#1,208 opened on Apr 11, 2026

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clieffort-largeenhancementhelp wantedpriority:medium

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (Avg merge 11d 1h) (45 merged PRs in 30d)

Description

Description

RTK supports aws for cloud CLI filtering but not az (Azure CLI). Azure CLI commands produce verbose JSON output that is highly compressible.

Use Case

Common az commands in CI/CD and development workflows:

Command Typical Output What's Needed
az pipelines build list --top 3 -o json ~500 lines / 21 KB Build ID, name, result, status
az devops invoke --area build --resource timeline 1000+ lines Failed task names + log IDs
az devops invoke --area build --resource logs 50-500 lines Log content (timestamps strippable)
az account get-access-token ~10 lines Just the token value
az cosmosdb keys list ~10 lines Just the key values

Impact

From rtk discover in a .NET monorepo environment:

  • az cosmosdb: 80 missed commands
  • az pipelines / az devops invoke: additional high-frequency usage in CI diagnosis workflows

Filtering Opportunities

  1. JSON output compression: az defaults to JSON. Most commands return deeply nested objects where only a few fields matter. Schema-mode or field extraction (like rtk json --schema) would work well.
  2. Timeline API: Returns every task/job/phase in a build — only failed records with their logId matter.
  3. Log output: Lines are prefixed with 28-char timestamps (2026-02-23T21:56:47.0126790Z) that can be stripped. Tail-only (last N lines) is usually sufficient.
  4. Token/key responses: Compact to just the value.

Suggested Subcommands

rtk az pipelines build list   # Compact build list (ID, name, result, time)
rtk az devops invoke          # Filter timeline/logs (strip noise, show failures)
rtk az account                # Compact token/account info
rtk az cosmosdb               # Compact key/connection string output

Environment

  • rtk 0.35.0 (macOS arm64)
  • az 2.x (Azure CLI)
  • Claude Code with PreToolUse hook

Contributor guide