Skip to content

feat: add support for awscli #205

@chenrui333

Description

@chenrui333

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

  1. Add src/aws_cmd.rs for rtk aws ....
  2. Wire a new Aws command in src/main.rs.
  3. Add rewrite rule in .claude/hooks/rtk-rewrite.sh (aws ... -> rtk aws ...).
  4. Add discover rule in src/discover/registry.rs so aws is recognized as supported.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions