aws / aws/amazon-q-developer-cli
Prompt Configuration
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
# Feature Request: Add Custom Q CLI Prompt Configuration
## Description
Add the ability for users to customize their Q CLI prompt through configuration settings. This would allow users to personalize their command-line experience and optimize their workflow by displaying relevant information in their prompt.
This would include, but not be limited to, context usage information (once context usage is exposed to end users).
## Background
Currently, the Q CLI uses a default prompt that cannot be easily customized by users. Many modern shells (bash, zsh, fish) support rich customization options that improve user experience and productivity.
## Proposed Solution
Implement a configuration system that allows users to:
- Define custom prompt formats using variables and formatting options
- Include dynamic information such as:
- Command execution time
- Exit status of previous command
- (Once available) context usage information
- (Nice to have) Set different prompts for different profiles
## User Experience
Users should be able to configure their prompt through:
1. A configuration file (e.g., `~/.amazonq/.promptrc` or other)
2. Environment variables for quick overrides
3. Optional: A simple CLI tool to help build and preview prompts
## Technical Considerations
- Ensure prompt rendering is performant (slow prompts degrade UX)
- Support for color and formatting using standard ANSI escape sequences
- Compatibility with different terminal emulators
- Extensibility to allow for future additions of new variables/information
## Acceptance Criteria
- Users can define custom prompt formats in a configuration file
- Documentation clearly explains available variables and formatting options
- Performance impact is minimal (prompt generation < 50ms)
- Works consistently across supported operating systems and terminals
- Includes at least 3 example prompt configurations for common use cases
Contributor guide
Assessment
This issue has not been assessed yet.