aws / aws/amazon-q-developer-cli
Feature Request: Add vi/emacs editing commands for multi-line input in Amazon Q CLI
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
macOS 15.4.0 (24E248)
### Expected behaviour
Support for vi and emacs editing commands when entering multi-line prompts in Amazon Q CLI, similar to bash's readline capabilities. This would allow for more efficient editing of complex multi-line inputs directly in the CLI.
N.B.: quoting Q: ""'The suggestion to run q doctor and q restart doesn't make sense in this context. Let me explain why:
1. The lack of vi/emacs editing commands is a feature limitation of the Amazon Q CLI, not a bug or configuration issue that would be fixed by diagnostic commands.
2. q doctor is typically used to diagnose installation or configuration problems with the Amazon Q CLI, not to address missing features like editor keybindings.
3. q restart would simply restart the Amazon Q CLI session, but wouldn't add new functionality that isn't already implemented.
These commands wouldn't address the core issue you're experiencing, which is the lack of advanced text editing capabilities in the CLI interface. This is a feature request rather than a technical problem with your installation.
The feature request has been submitted, and that's the appropriate channel for this type of enhancement. Your workaround of using an external editor for complex inputs remains the best approach until such features might be implemented.'''
### Actual behaviour
Currently, editing multi-line prompts is limited to basic cursor movement and Ctrl+J for new lines. Users often resort to composing complex prompts in external editors and pasting them into the CLI.
```
[chat-transcript]
> the prompt says "Use Ctrl(^) + j to provide multi-line prompts." How does that work? Do i type towards the end of the line and then hit command-j to start again on a new line? or what?
The prompt is referring to how you can enter multi-line input when using the Amazon Q CLI.
To enter multi-line prompts in the Amazon Q CLI:
1. While typing your message, press `Ctrl + J` (not Command-J) to create a new line
2. This allows you to continue typing on the next line without submitting your prompt
3. You can add as many lines as needed using this method
4. When you're finished with your multi-line input, press Enter twice to submit the entire prompt
This is useful when you want to:
- Format your question with multiple paragraphs
- Include code blocks or examples
- Structure your query in a more readable way
The key combination is specifically `Ctrl + J` (sometimes written as `^J`), not Command-J, regardless of being on macOS.
[Tool uses: none]
> Can you make a suggestion to the service team that they add support for vi and emacs edit commands? editing a multi-line prompt in Q Developer is very awkward without editor command keys. I end up editing in a different tool and then pasting multi-line commands here.
I understand your frustration with the current multi-line editing experience in Amazon Q CLI. Having vi or emacs-style editing commands would definitely improve the experience for power users like yourself.
I'd be happy to help you report this feature request to the Amazon Q team.
[Tool uses: report_issue]
```
### Steps to reproduce
Try to edit a multi-line prompt in Amazon Q CLI using common editor commands (like vi or emacs bindings) and observe that these commands aren't supported.
### Environment
```yaml
[q-details]
version = "1.7.3"
hash = "3e4ae79d371315e80ddac772b43fff2cba314104"
date = "2025-04-10T05:48:16.435186Z (3d ago)"
variant = "full"
[system-info]
os = "macOS 15.4.0 (24E248)"
chip = "Apple M1"
total-cores = 8
memory = "16.00 GB"
[environment]
cwd = "/Users/USER/w/experiments/playground-python-boto3"
cli-path = "/Users/USER/w/experiments/playground-python-boto3"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "macOS"
install-method = "unknown"
[env-vars]
PATH = "/opt/homebrew/Cellar/pyenv-virtualenv/1.2.4/shims:/Users/USER/.pyenv/shims:/Users/USER/.nvm/versions/node/v22.13.0/bin:/Users/USER/.local/share/mise/installs/node/18.20.2/bin:/Users/USER/.local/share/mise/installs/python/3.12.7/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/USER/.volta/bin:/Users/USER/.cargo/bin:/Users/USER/.local/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Users/USER/.toolbox/bin:/Users/USER/local/bin"
QTERM_SESSION_ID = "65aff920dfdf438692c7288e89a5d5c5"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.7.3"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.apple.Terminal"
[chat-settings]
interactive=true
[chat-trusted_tools]
fs_write=true
use_aws=true
execute_bash=true
fs_read=true
report_issue=true
[chat-failed_request_ids]
none
[chat-context]
current_profile=default
profiles=
default
global_context=
.amazonq/rules/**/*.md
README.md
AmazonQ.md
profile_context=none
files=none
```
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by locating the multi-line prompt input handling and existing Ctrl+J and Enter behavior, then compare it with the requested vi and emacs editing commands; done means those bindings work while editing multi-line prompts and submission still behaves as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100