Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ grant status
grant revoke # interactive multi-select
grant revoke <session-id> # direct by ID
grant revoke --all # revoke all

# Access request workflow
grant request submit # interactive: pick workspace, role, fill details
grant request submit --provider azure --target "Prod" --role "Contributor" --reason "Incident"
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grant request submit example looks like a fully flag-driven submission, but --role is display-only and the command still requires interactive role selection unless --role-id is provided. Also, in non-interactive mode submit requires --reason, --date, --timezone, --from, --to (and --role-id). Consider either updating the example to include --role-id + scheduling flags (and maybe --yes) or clarifying in the comment that it will prompt for missing fields in a TTY.

Suggested change
grant request submit --provider azure --target "Prod" --role "Contributor" --reason "Incident"
grant request submit --provider azure --target "Prod" --role "Contributor" --reason "Incident" # still prompts in a TTY for role selection/scheduling
grant request submit --provider azure --target "Prod" --role-id "<role-id>" --reason "Incident" --date "2025-01-15" --timezone "America/New_York" --from "09:00" --to "17:00" --yes

Copilot uses AI. Check for mistakes.
grant request list # list your requests
grant request list --state PENDING --role APPROVER
grant request get # fuzzy-pick a request (TTY) or pass <id>
grant request get <request-id>
grant request cancel <request-id> # cancel an open request
grant request approve <request-id> # approve a pending request (approvers only)
grant request reject <request-id> # reject a pending request (approvers only)
```

![grant env demo](demo/demo-env-status.gif)
Expand Down Expand Up @@ -102,16 +113,31 @@ Running `grant` with no subcommand elevates cloud permissions (the core behavior
| `status` | Show auth state and active sessions |
| `favorites` | Manage saved role favorites (`add`/`list`/`remove`) |
| `revoke` | Revoke sessions (interactive, by ID, or `--all`) |
| `request` | Manage access requests through an approval workflow (see subcommands below) |
| `update` | Self-update to the latest release from GitHub |
| `version` | Print version information |

### `grant request` subcommands

| Subcommand | Description |
|------------|-------------|
| `submit` | Submit an on-demand access request (interactive workspace + role picker, or direct with flags) |
| `list` | List access requests (`--state`, `--result`, `--priority`, `--role CREATOR\|APPROVER`, `--search`, `--sort`, `--desc`) |
| `get [id]` | Show full request details; omit `<id>` in a TTY to open a fuzzy picker |
| `cancel [id]` | Cancel an open request; omit `<id>` in a TTY to pick from your open requests |
| `approve [id]` | Approve a pending request (approvers only); omit `<id>` in a TTY to pick from pending requests |
| `reject [id]` | Reject a pending request (approvers only); omit `<id>` in a TTY to pick from pending requests |
Comment on lines +126 to +129
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subcommand arg placeholder/name is inconsistent with the actual CLI help. The Cobra Use strings are get [requestId], cancel [requestId], approve [requestId], reject [requestId] (and the long help refers to <requestId>). Consider standardizing the README to match the CLI (e.g., use [requestId] everywhere, or consistently use <requestId>), rather than mixing [id] with <id>.

Suggested change
| `get [id]` | Show full request details; omit `<id>` in a TTY to open a fuzzy picker |
| `cancel [id]` | Cancel an open request; omit `<id>` in a TTY to pick from your open requests |
| `approve [id]` | Approve a pending request (approvers only); omit `<id>` in a TTY to pick from pending requests |
| `reject [id]` | Reject a pending request (approvers only); omit `<id>` in a TTY to pick from pending requests |
| `get [requestId]` | Show full request details; omit `[requestId]` in a TTY to open a fuzzy picker |
| `cancel [requestId]` | Cancel an open request; omit `[requestId]` in a TTY to pick from your open requests |
| `approve [requestId]` | Approve a pending request (approvers only); omit `[requestId]` in a TTY to pick from pending requests |
| `reject [requestId]` | Reject a pending request (approvers only); omit `[requestId]` in a TTY to pick from pending requests |

Copilot uses AI. Check for mistakes.

### Flags

**Global:** `--verbose, -v` (detailed output) | `--output, -o` (`text` or `json`)

**Elevation** (`grant`, `env`, `favorites add`):
`--provider, -p` | `--target, -t` | `--role, -r` | `--favorite, -f` | `--group, -g` | `--groups` | `--refresh`

**`grant request submit`:**
`--provider, -p` | `--target, -t` | `--role` | `--role-id` | `--reason` | `--priority` | `--date` | `--timezone` | `--from` | `--to` | `--yes` | `--refresh`
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grant request submit flags list is missing the short forms that the CLI exposes (--role, -r and --yes, -y). Aligning this list with the actual submit command flags will make it easier to copy/paste from the README.

Suggested change
`--provider, -p` | `--target, -t` | `--role` | `--role-id` | `--reason` | `--priority` | `--date` | `--timezone` | `--from` | `--to` | `--yes` | `--refresh`
`--provider, -p` | `--target, -t` | `--role, -r` | `--role-id` | `--reason` | `--priority` | `--date` | `--timezone` | `--from` | `--to` | `--yes, -y` | `--refresh`

Copilot uses AI. Check for mistakes.

Target matching is case-insensitive and supports partial match; interactive mode provides fuzzy search.

## Configuration
Expand Down
Loading