CodeWhisperer's features are becoming a part of Amazon Q Developer. Learn more
Natural language to bash translation
The cw ai
command lets you write a natural language instruction such as
“copy all files in my current directory to Amazon S3”. CodeWhisperer will then translate it to an
instantly executable shell code snippet. The cw ai
command is useful in those common situations where the correct bash
syntax is easy to forget. Examples include reversing a git
commit, finding strings inside files with
grep
, or compressing files with tar
.
To get started, run either of the following
cw ai
prompt
#
prompt
![An example of natural language translation.](/images/codewhisperer/latest/userguide/images/command-line-translation2.gif)
To opt out of using #
to invoke CodeWhisperer, go to Settings -> Translate and toggle off Hashtag substitution.
![CodeWhisperer interface showing Translation feature settings with Hashtag Substitution toggle.](/images/codewhisperer/latest/userguide/images/hashtag-substitution.png)