rtk-ai/rtk

Feature request: rtk wrapper for az network (PE connections, app-gateway show)

Open

#1,593 建立於 2026年4月29日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Rust (2,914 fork)batch import
area:clieffort-mediumenhancementhelp wantedpriority:medium

倉庫指標

Star
 (48,085 star)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

Real-world numbers from 30 days of Claude Code transcripts (686 sessions scanned, paired Bash tool_use → tool_result by tool_use_id):

Subcommand Calls Est. tokens Avg/call
az network application-gateway 33 11,158 338
az network private-endpoint-connection 67 4,449 66
az network private-link-service 29 1,794 61
az network watcher 32 1,785 55
(other az network) 87 6,913 79
Total az network 248 26,099 105

Top bloat: az network application-gateway show. AGW JSON includes the full frontendPorts[], httpListeners[], requestRoutingRules[], urlPathMaps[], redirectConfigurations[] — for an AGW with 30+ listeners (typical multi-tenant setups), ~5K+ tokens per call.

Lower-hanging: az network private-endpoint-connection list/show — only 66 tokens/call but 67 calls, frequently used in CI debugging loops. Most of the output is connection-state metadata; the only fields that ever matter for diagnostic loops are name, privateLinkServiceConnectionState.status, privateEndpoint.id.

Suggested wrapper behavior:

  • For az network application-gateway show: collapse httpListeners[] / requestRoutingRules[] / redirectConfigurations[] to one-line summaries; drop etag and provisioningState: Succeeded
  • For az network private-endpoint-connection: emit a compact 3-column form (name | status | privateEndpointId) by default
  • For az network private-link-service show: collapse privateEndpointConnections[] similarly

A generic ARM JSON pruner (filed separately as #1590) would cover ~30% of these savings as a fallback. Happy to defer this issue until that lands.

Methodology note: numbers come from scanning ~/.claude/projects/**/*.jsonl transcripts, pairing Bash tool_use blocks with their tool_result by tool_use_id, stripping any rtk prefix to count like-for-like, and estimating tokens at 4 chars/token.

貢獻者指南