Summary
Please add native support for aws/awscli commands in RTK.
AWS CLI output is often very verbose (large JSON payloads, multi-resource listings, progress noise), so it burns a lot of LLM context compared to the actual signal.
High-value commands (phase 1)
aws s3 ls
aws s3 cp
aws s3 sync
aws ec2 describe-instances
aws logs tail
aws cloudformation describe-stacks
aws ecs describe-services
aws eks list-clusters / aws eks describe-cluster
Expected behavior
- On success: compact summaries (counts/resources/status) instead of full payloads.
- On failure: preserve clear error code/message and actionable stderr.
- For unsupported subcommands: safe passthrough (
rtk aws ... still works without dropping output correctness).
- Keep command semantics unchanged (output compaction only).
Why this fits current RTK architecture
Current code already has this pattern for infra commands:
- command routing in
src/main.rs
- infra filters in
src/container.rs (docker / kubectl)
- auto-rewrite integration in
.claude/hooks/rtk-rewrite.sh
- discover classification in
src/discover/registry.rs
aws appears to be currently uncovered in rewrite/discover, so it remains an unhandled high-volume command family.
Implementation sketch
- Add
src/aws_cmd.rs for rtk aws ....
- Wire a new
Aws command in src/main.rs.
- Add rewrite rule in
.claude/hooks/rtk-rewrite.sh (aws ... -> rtk aws ...).
- Add discover rule in
src/discover/registry.rs so aws is recognized as supported.
- Add tests + README examples.
Acceptance criteria
rtk aws ... supports at least the phase-1 commands above.
- Token reduction is measurable on verbose AWS commands (target: 70%+).
- Error paths remain actionable.
- Hook and discover integration included.
Summary
Please add native support for
aws/awsclicommands in RTK.AWS CLI output is often very verbose (large JSON payloads, multi-resource listings, progress noise), so it burns a lot of LLM context compared to the actual signal.
High-value commands (phase 1)
aws s3 lsaws s3 cpaws s3 syncaws ec2 describe-instancesaws logs tailaws cloudformation describe-stacksaws ecs describe-servicesaws eks list-clusters/aws eks describe-clusterExpected behavior
rtk aws ...still works without dropping output correctness).Why this fits current RTK architecture
Current code already has this pattern for infra commands:
src/main.rssrc/container.rs(docker/kubectl).claude/hooks/rtk-rewrite.shsrc/discover/registry.rsawsappears to be currently uncovered in rewrite/discover, so it remains an unhandled high-volume command family.Implementation sketch
src/aws_cmd.rsforrtk aws ....Awscommand insrc/main.rs..claude/hooks/rtk-rewrite.sh(aws ...->rtk aws ...).src/discover/registry.rssoawsis recognized as supported.Acceptance criteria
rtk aws ...supports at least the phase-1 commands above.