area:clieffort-largeenhancementhelp wantedpriority:medium
仓库指标
- Star
- (48,085 star)
- PR 合并指标
- (平均合并 11天 1小时) (30 天内合并 45 个 PR)
描述
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 commandsaz pipelines/az devops invoke: additional high-frequency usage in CI diagnosis workflows
Filtering Opportunities
- JSON output compression:
azdefaults to JSON. Most commands return deeply nested objects where only a few fields matter. Schema-mode or field extraction (likertk json --schema) would work well. - Timeline API: Returns every task/job/phase in a build — only failed records with their
logIdmatter. - 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. - 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