Skip to content

Commit e57813f

Browse files
Merge pull request #1787 from jasonrandrews/review
add context info to the Q CLI install guide
2 parents 1d982e7 + 36fe91c commit e57813f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

content/install-guides/aws-q-cli.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,54 @@ An example is shown below:
145145

146146
![Connect #center](/install-guides/_images/q.gif)
147147

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.
197+
148198
You're ready to use the Q CLI.

0 commit comments

Comments
 (0)