Summary
Add CLI flags to apply a fuzzy filter and/or tag selector at startup, so claws can launch directly into a pre-filtered resource list — mirroring the existing in-TUI / and :tag commands.
Motivation
When working with a known subset of resources in a large account (e.g., a handful of EC2 bastion hosts among hundreds of instances), reaching them currently takes multiple steps:
claws -p prod -r us-west-2 -s ec2
- Wait for the full list to load
- Press
/ and type the filter, or :tag Role=bastion
Both filters already exist inside the TUI. Surfacing them as CLI flags would let users wrap common workflows in shell aliases and get from terminal to selecting the right instance in zero extra keystrokes. A concrete example: aliasing a one-shot command that lands on the prod bastion list, ready for a → SSM Session Manager.
Proposed solution
Two new flags, named after the existing in-TUI commands:
# Fuzzy filter (equivalent to pressing `/bastion<Enter>` after launch)
claws -s ec2 -f bastion
claws -s ec2 --filter bastion
# Tag filter (equivalent to `:tag Role=bastion`)
claws -s ec2 --tag Role=bastion
# Repeatable for multiple tags
claws -s ec2 --tag Env=prod --tag Role=bastion
Ideally also settable under startup: in config.yaml for persistence, matching how view, profiles, and regions already work:
startup:
view: ec2
filter: bastion
tags:
- Role=bastion
- Env=prod
Alternatives considered
- Shell alias + manual keystrokes — works today for
/, but still requires typing the filter by hand after launch, and doesn't compose with tag filters (which need command mode :).
- Piping into stdin — not viable for a Bubbletea TUI.
Additional context
This would compose well with the existing -p / -r / -s flags and unlock single-command workflows like:
alias prod-bastions='claws -p prod -r us-west-2 -s ec2 --tag Role=bastion'
From there it's a → SSM Session Manager and you're in. Happy to take a stab at a PR if the direction sounds right.
Summary
Add CLI flags to apply a fuzzy filter and/or tag selector at startup, so claws can launch directly into a pre-filtered resource list — mirroring the existing in-TUI
/and:tagcommands.Motivation
When working with a known subset of resources in a large account (e.g., a handful of EC2 bastion hosts among hundreds of instances), reaching them currently takes multiple steps:
claws -p prod -r us-west-2 -s ec2/and type the filter, or:tag Role=bastionBoth filters already exist inside the TUI. Surfacing them as CLI flags would let users wrap common workflows in shell aliases and get from terminal to selecting the right instance in zero extra keystrokes. A concrete example: aliasing a one-shot command that lands on the prod bastion list, ready for
a→ SSM Session Manager.Proposed solution
Two new flags, named after the existing in-TUI commands:
Ideally also settable under
startup:inconfig.yamlfor persistence, matching howview,profiles, andregionsalready work:Alternatives considered
/, but still requires typing the filter by hand after launch, and doesn't compose with tag filters (which need command mode:).Additional context
This would compose well with the existing
-p/-r/-sflags and unlock single-command workflows like:From there it's
a→ SSM Session Manager and you're in. Happy to take a stab at a PR if the direction sounds right.