aws / aws/amazon-q-developer-cli

Revert to custom permissions when disabling /trustall

Open
#1,139 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

## Feature Request: Save and Restore Custom Tool Permission Settings in Amazon Q CLI

### Current Behavior
Currently, Amazon Q CLI offers the following permission management options:
- Set individual tool permissions (trust/untrust specific tools)
- Use `trustall` to trust all tools
- Use `reset` to return all tools to default permission settings.

When a user has configured custom tool permissions and then uses `trustall`, there is no way to return to their previous custom settings. The only option is to use `reset`, which reverts to default permissions rather than the user's custom configuration.

### Use Case
As a user who frequently works with a specific set of trusted tools but occasionally needs to use `trustall` for certain operations, I want to be able to easily return to my custom permission settings without having to manually reconfigure each tool's permission, which can be especially time taking if there are a lot of available tools.

---

### Requested Feature
Add the ability to automatically save custom tool permission configurations as part of the existing Q CLI profile system and restore them when needed.

### Proposed Solution
1. Enhance the existing profile system to automatically save tool permission settings
2. Add a new command:
- `restore-permissions` - Restore the last saved permission settings for the current profile

3. Add configuration options:
- Auto-save permission settings (enabled by default?)
- Configure auto-save frequency (on every change, on exit (preferred), etc.)

4. When switching between profiles, automatically load the saved permission settings for that profile

### Benefits
- Improved user experience by reducing repetitive configuration
- Easier to maintain principle of least privilege for individual profiles
- More flexibility in permission management
- Time savings for users who frequently switch between permission contexts
- Integration with existing profile system for a more cohesive experience

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.