aws / aws/amazon-q-developer-cli
Feature request: Add /editor as an alias for /edit command
- 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
When a user types /editor, the CLI should recognize this as an alias for the /edit command and open the text editor accordingly. When I accidentally typed in /editor it gave me a lot of instruction that wasn't necessary. A simple recommendation of "you may have been trying to /edit" would have nudged me in the right direction. Instead I burned three prompts and it finally figured out what I was going for.
### Actual behaviour
Currently, typing /editor results in an error or unrecognized command message, while /edit works as expected to open a text editor.
```
[chat-transcript]
> /editor
> fix /editor
I notice you're trying to use the `/editor` command, but this doesn't appear to be a valid command in the Amazon Q CLI interface.
If you're trying to open or edit a file, I can help you with that. Here are some options:
1. I can create or edit files for you using my file system tools
2. You can use your system's text editor by running a bash command
Would you like me to:
- Create a new file for you?
- Edit an existing file?
- Open your system's default text editor?
Please let me know what you're trying to accomplish, and I'll help you with the appropriate command.
[Tool uses: none]
> edit with system tool
I'll help you open a text editor using your system's tools. On macOS, you can use various text editors like TextEdit, VS Code, or others. Let me execute a command to open TextEdit, which is the default text editor on macOS:
[Tool uses: execute_bash]
> y
I've opened TextEdit for you. If you'd prefer a different editor, I can help with that too. For example:
- For VS Code: `open -a "Visual Studio Code"`
- For Sublime Text: `open -a "Sublime Text"`
- For BBEdit: `open -a BBEdit`
Is there a specific file you'd like to edit? If so, I can help you open that file directly in your editor.
[Tool uses: none]
> I want to enter a prompt within a text editor and have it executed here, I think there's a way to do that beyond simple cut/paste
I understand you're looking for a way to compose a longer prompt in a text editor and then have it executed in Amazon Q without manually copying and pasting.
Currently, the Amazon Q CLI doesn't have a built-in feature like `/editor` (which you might be familiar with from other AI tools) that would allow you to compose a prompt in an external editor and automatically send it back to the chat interface.
Your options are:
1. Compose your text in an editor, then copy and paste it into the Amazon Q CLI interface
2. Create a text file with your prompt and then use a command to read that file and pipe its contents to Amazon Q (though this would start a new conversation)
If you'd like to create a file for your prompt that you can edit and then paste back here, I can help you create that file:
[Tool uses: fs_write]
> n
I understand you don't want to create a file.
Currently, Amazon Q CLI doesn't have a built-in feature similar to what some other AI tools offer (like `/editor` in ChatGPT) that would allow you to compose a prompt in an external editor and automatically send it back to the chat interface.
Your main options for entering longer prompts are:
1. Type directly in the CLI interface
2. Compose your text in any editor, then copy and paste it into the Amazon Q CLI
3. If you're using Amazon Q frequently with similar prompts, you could create shell scripts that pipe text into the CLI
If you have any other questions or if there's something else I can help you with, please let me know.
[Tool uses: none]
> you absolutely have a capability that's kind of like /editor, usually you would launch vi or something like that within this terminal/zsh but I seem to have forgotten the command
You're right, and I apologize for the confusion. In the Amazon Q CLI, you can use the `/edit` command to open a text editor for composing longer prompts. This will open your default terminal editor (like vi, vim, nano, etc.) where you can compose your message, and when you save and exit, that text will be sent as your prompt.
Try typing:
\```
/edit
\```
This should open your default terminal editor. After you write your prompt and save/exit, the content will be submitted to Amazon Q.
If you have a specific editor preference, you might need to ensure your EDITOR environment variable is set appropriately in your shell configuration.
[Tool uses: none]
> you should have an "alias" or something that sees someone type in /editor and automatically re-routes to /edit
You're absolutely right. That would be a great usability improvement for Amazon Q CLI. Having `/editor` as an alias for `/edit` would be more intuitive for users who might be familiar with similar commands in other tools.
I'll make sure this feedback gets to the right team. The Amazon Q CLI is still evolving, and suggestions like this help make it better for everyone.
Would you like me to help you submit this as a feature request to the Amazon Q team?
[Tool uses: none]
> y
[Tool uses: report_issue]
```
### Steps to reproduce
1. Launch Amazon Q CLI
2. Type /editor instead of /edit
3. Observe that the command is not recognized
### Environment
```yaml
[q-details]
version = "1.7.3"
hash = "3e4ae79d371315e80ddac772b43fff2cba314104"
date = "2025-04-10T05:48:16.435186Z (14d 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"
cli-path = "/Users/USER"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "macOS"
install-method = "unknown"
[env-vars]
PATH = "/Users/USER/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/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:/Users/USER/.local/bin:/Users/USER/Library/Application Support/JetBrains/Toolbox/scripts"
QTERM_SESSION_ID = "b3a235f15f4d4144966313c8514a3f34"
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]
[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
Assessment
This issue has not been assessed yet.