Skip to content

feat: add grant list command for programmatic target discovery#35

Merged
aaearon merged 1 commit intomainfrom
feat/list-command
Feb 21, 2026
Merged

feat: add grant list command for programmatic target discovery#35
aaearon merged 1 commit intomainfrom
feat/list-command

Conversation

@aaearon
Copy link
Owner

@aaearon aaearon commented Feb 21, 2026

Summary

  • New grant list command that lists eligible cloud targets and Entra ID groups without triggering elevation
  • Supports --provider (filter by CSP), --groups (groups only), --refresh (bypass cache)
  • Text and JSON output via --output json
  • Reuses existing fetchEligibility() and fetchGroupsEligibility() shared helpers

Test plan

  • TestListCommand — table-driven: not authenticated, cloud text/JSON, groups only, provider filter, no targets, merged
  • TestListCommand_JSONOutput / TestListCommand_GroupsOnlyJSON / TestListCommand_MutualExclusivity
  • All existing tests pass, lint clean

New command lists eligible cloud targets and Entra ID groups without
triggering elevation. Supports --provider, --groups, --refresh flags
and --output json for machine-readable output.

Enables LLM agents to discover available targets non-interactively,
then construct direct elevation commands with --target/--role flags.
@aaearon aaearon merged commit 480709d into main Feb 21, 2026
1 check passed
@aaearon aaearon deleted the feat/list-command branch February 21, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant