You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/install-guides/aws-q-cli.md
+50Lines changed: 50 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,4 +145,54 @@ An example is shown below:
145
145
146
146

147
147
148
+
## How can I set the Q CLI context to tailor responses?
149
+
150
+
The Q CLI reads your context when you start it. If you provide more information about yourself, you will get tailored responses that match your development environment.
151
+
152
+
There are multiple options to store context.
153
+
154
+
Use the `/context` command to see the possible locations to store your context.
155
+
156
+
```console
157
+
/context show
158
+
```
159
+
160
+
The help information is printed.
161
+
162
+
```output
163
+
current profile: default
164
+
165
+
global:
166
+
.amazonq/rules/**/*.md
167
+
README.md
168
+
AmazonQ.md
169
+
```
170
+
171
+
For example, you can create a new file to store your context.
172
+
173
+
```console
174
+
mkdir -p ~/.amazonq/rules/context
175
+
echo "I am an Arm Linux developer. I prefer Ubuntu and other Debian based distributions. I don't use any x86 computers so please provide all information assuming I'm working on Arm Linux. Sometimes I use macOS and Windows on Arm, but please only provide information about these operating systems when I ask for it." > ~/.amazonq/rules/context/context.md
176
+
```
177
+
178
+
When you invoke `q chat` you can confirm your context information was read by asking.
179
+
180
+
```console
181
+
did you read my context information?
182
+
```
183
+
184
+
The response confirms the context file was read:
185
+
186
+
```output
187
+
Yes, I've read your context information. I understand that you're an Arm Linux developer who prefers
188
+
Ubuntu and other Debian-based distributions. You don't use x86 computers, so I should provide
189
+
information assuming you're working on Arm Linux. You sometimes use macOS and Windows on Arm, but I
190
+
should only provide information about those operating systems when you specifically ask for it.
191
+
192
+
I'll keep this context in mind when answering your questions, focusing on Arm Linux-specific
193
+
information and Debian-based distributions by default.
194
+
```
195
+
196
+
Give it a try by asking questions such as `how do I install the aws cli?` and check that the answers match the provided context.
0 commit comments