Skip to content

Commit d507f0c

Browse files
authored
feat: add agent documentation (#2282)
* add agent documentation * docs changes
1 parent d670227 commit d507f0c

File tree

8 files changed

+555
-217
lines changed

8 files changed

+555
-217
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing Guidelines
22

3-
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
3+
Thank you for your interest in contributing to Amazon Q. Whether it's a bug report, new feature, correction, or additional
44
documentation, we greatly value feedback and contributions from our community.
55

66
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
@@ -20,6 +20,8 @@ reported the issue. Please try to include as much information as you can. Detail
2020

2121
## Contributing via Pull Requests
2222

23+
Before making changes around new features, please first make a feature request and get a statement from the team. This codebase moves quickly, and you work is likely to be lost if not first coordinated with us.
24+
2325
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
2426

2527
1. You are working against the latest source on the _main_ branch.

README.md

Lines changed: 26 additions & 216 deletions
Original file line numberDiff line numberDiff line change
@@ -1,256 +1,66 @@
1+
# Amazon Q CLI
12

2-
<p align="center">
3-
<a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html">
4-
<picture>
5-
<img src="./.github/media/amazon-q-logo.avif" alt="Amazon Q"
6-
width="200px"
7-
>
8-
</picture>
9-
</a>
10-
</p>
11-
12-
<h4 align="center">
13-
Amazon Q CLI brings IDE-style autocomplete and agentic capabilities to your terminal.
14-
</h4>
15-
16-
17-
<div align="center">
18-
<a href="https://github.com/aws/amazon-q-developer-cli/graphs/commit-activity"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/aws/amazon-q-developer-cli"/></a>
19-
<a href="https://github.com/aws/amazon-q-developer-cli/issues"><img alt="GitHub open issues" src="https://img.shields.io/github/issues/aws/amazon-q-developer-cli"/></a>
20-
</div>
21-
22-
23-
<div align="center">
24-
25-
[![Rust Test](https://github.com/aws/amazon-q-developer-cli/actions/workflows/rust.yml/badge.svg)](https://github.com/aws/amazon-q-developer-cli/actions/workflows/rust.yml)
26-
[![Typos Test](https://github.com/aws/amazon-q-developer-cli/actions/workflows/typos.yml/badge.svg)](https://github.com/aws/amazon-q-developer-cli/actions/workflows/typos.yml)
27-
[![Typescript Test](https://github.com/aws/amazon-q-developer-cli/actions/workflows/typescript.yml/badge.svg)](https://github.com/aws/amazon-q-developer-cli/actions/workflows/typescript.yml)
28-
</div>
29-
30-
<p align="center">
31-
<a href="https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html">
32-
<picture>
33-
<img src="./.github/media/amazon-q-cli-features.jpeg" alt="Amazon Q CLI Features"
34-
>
35-
</picture>
36-
</a>
37-
</p>
38-
39-
## 😍 Features
40-
- 🔮 [**Auto Completion**](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-autocomplete.html): IDE-style completions to hundreds of popular CLIs like `git`, `npm`, `docker`, and `aws`.
41-
- 💬 [**Natural Language Chat**](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-chat.html): Interact with your terminal using natural language to ask questions, debug issues, or explore the codebase.
42-
- 🧠 [**Contextual Awareness**](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-chat.html#command-line-chat-context-integration): Integrates context from your local development environment, so answers are tailored to your specific code and setup.
43-
- 🤖 [**Agentic Execution**](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-autocomplete.html): Let Amazon Q take action: generate code, edit files, automate Git workflows, resolve merge conflicts, and more — with your permission.
44-
45-
## ⚡️ Installation
3+
## Installation
464

475
- **macOS**:
486
- **DMG**: [Download now](https://desktop-release.q.us-east-1.amazonaws.com/latest/Amazon%20Q.dmg)
49-
- **Homebrew**: `brew install amazon-q`
507
- **Linux**:
518
- [Ubuntu/Debian](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html#command-line-installing-ubuntu)
529
- [AppImage](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html#command-line-installing-appimage)
5310
- [Alternative Linux builds](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html#command-line-installing-alternative-linux)
54-
- **Windows**:
55-
- Follow the discussions for
56-
[Windows](https://github.com/aws/q-command-line-discussions/discussions/15)
57-
- Or [use it on Windows with WSL](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html#command-line-installing-windows)
58-
- **Remote machines**
59-
- [Autocomplete in SSH](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-autocomplete-ssh.html)
6011

12+
## Contributing
6113

62-
## 🚀 Start Contributing
14+
Thank you so much for considering to contribute to Amazon Q.
15+
16+
Before getting started, see our [contributing docs](CONTRIBUTING.md#security-issue-notifications).
6317

6418
### Prerequisites
6519

6620
- MacOS
6721
- Xcode 13 or later
6822
- Brew
6923

70-
### 1. Clone repo
24+
#### 1. Clone repo
7125

7226
```shell
73-
git clone https://github.com/aws/amazon-q-developer-cli-autocomplete.git
27+
git clone https://github.com/aws/amazon-q-developer-cli.git
7428
```
7529

76-
### 2. Setup
77-
Hassle-free setup:
78-
```shell
79-
npm run setup
80-
```
81-
82-
Or if you'd like to DIY:
83-
84-
<details>
85-
<summary>Manual Setup</summary>
86-
<div>
87-
88-
### 1. Install platform dependencies
89-
90-
For Debian/Ubuntu:
91-
92-
```shell
93-
sudo apt update
94-
sudo apt install build-essential pkg-config jq dpkg curl wget cmake clang libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libdbus-1-dev libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev valac libibus-1.0-dev libglib2.0-dev sqlite3 libxdo-dev protobuf-compiler
95-
```
96-
### 2. Install Rust toolchain using [Rustup](https://rustup.rs):
30+
#### 2. Install the Rust toolchain using [Rustup](https://rustup.rs):
9731

9832
```shell
9933
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
10034
rustup default stable
101-
```
102-
103-
For pre-commit hooks, the following commands are required:
104-
105-
```shell
10635
rustup toolchain install nightly
10736
cargo install typos-cli
10837
```
10938

110-
For MacOS development make sure the right targets are installed:
39+
#### 3. Develop locally
11140

112-
```shell
113-
rustup target add x86_64-apple-darwin
114-
rustup target add aarch64-apple-darwin
115-
```
116-
117-
### 3. Setup Python and Node using [`mise`](https://mise.jdx.dev)
118-
119-
Add mise integrations to your shell:
120-
121-
For zsh:
122-
```shell
123-
echo 'eval "$(mise activate zsh)"' >> "${ZDOTDIR-$HOME}/.zshrc"
124-
```
125-
126-
For bash:
127-
```shell
128-
echo 'eval "$(mise activate bash)"' >> ~/.bashrc
129-
```
130-
131-
For fish:
132-
```shell
133-
echo 'mise activate fish | source' >> ~/.config/fish/config.fish
134-
```
135-
136-
Install the Python and Node toolchains using:
137-
138-
```shell
139-
mise trust
140-
mise install
141-
```
142-
143-
### 4. Setup precommit hooks
144-
145-
Run `pnpm` in root directory to add pre-commit hooks:
146-
147-
```shell
148-
pnpm install --ignore-scripts
149-
```
41+
- To compile and run: `cargo run --bin chat_cli`.
42+
- To run tests: `cargo test`.
43+
- To run lints: `cargo clippy`.
44+
- To format rust files: `cargo +nightly fmt`.
45+
- To run subcommands: `cargo run --bin chat_cli -- {subcommand}`.
46+
- Login would then be: `cargo run --bin chat_cli -- login`
15047

151-
</div>
152-
</details>
48+
## Project Layout
15349

154-
155-
### 3. Start Local Development
156-
To compile and view changes made to `q chat`:
157-
```shell
158-
cargo run --bin chat_cli
159-
```
160-
161-
> If you are working on other q commands, just append `-- <command name>`. For example, to run `q login`, you can run `cargo run --bin chat_cli -- login`
162-
163-
To run tests for the Q CLI crate:
164-
```shell
165-
cargo test -p chat_cli
166-
```
167-
168-
To format Rust files:
169-
```shell
170-
cargo +nightly fmt
171-
```
172-
173-
To run clippy:
174-
```shell
175-
cargo clippy --locked --workspace --color always -- -D warnings
176-
```
177-
178-
179-
180-
### 💡 Quick Tip for Onboarding
181-
182-
Use Q CLI to help you onboard Q CLI!
183-
184-
Start a `q chat` session:
185-
186-
```shell
187-
q chat
188-
```
189-
190-
Once inside `q chat`, you can supply project context by adding the [`codebase-summary.md`](codebase-summary.md) file:
191-
192-
```shell
193-
/context add codebase-summary.md
194-
```
195-
196-
This enables Q to answer onboarding questions like:
197-
198-
- “What does this crate do?”
199-
200-
- “Where is X implemented?”
201-
202-
- “How do these components interact?”
203-
204-
Great for speeding up your ramp-up and navigating the repo more effectively.
205-
206-
207-
208-
209-
## 🏗️ Project Layout
210-
211-
Several projects live here:
212-
213-
- [`autocomplete`](packages/autocomplete/) - The autocomplete react app
214-
- [`dashboard`](packages/dashboard-app/) - The dashboard react app
215-
- [`figterm`](crates/figterm/) - figterm, our headless terminal/pseudoterminal that
216-
intercepts the user’s terminal edit buffer.
217-
- [`q_cli`](crates/q_cli/) - the `q` CLI, allows users to interface with Amazon Q Developer from
50+
- [`chat_cli`](crates/chat_cli/) - the `q` CLI, allows users to interface with Amazon Q Developer from
21851
the command line
219-
- [`fig_desktop`](crates/fig_desktop/) - the Rust desktop app, uses
220-
[`tao`](https://docs.rs/tao/latest/tao/)/[`wry`](https://docs.rs/wry/latest/wry/)
221-
for windowing/webviews
222-
- [`fig_input_method`](crates/fig_input_method/) - The input method used to get cursor
223-
position on macOS
224-
- [`vscode`](extensions/vscode/) - Contains the VSCode plugin needed
225-
for the Amazon Q Developer for command line to work in VSCode
226-
- [`jetbrains`](extensions/jetbrains/) - Contains the VSCode plugin
227-
needed for the Amazon Q Developer for command line to work in Jetbrains IDEs
228-
229-
Other folder to be aware of
230-
231-
- [`build-scripts/`](build-scripts/) - Contains all python scripts to build,
232-
sign, and test the project on macOS and Linux
233-
- [`crates/`](crates/) - Contains all internal rust crates
234-
- [`packages/`](packages/) - Contains all internal npm packages
235-
- [`proto/`](proto/) -
236-
[protocol buffer](https://developers.google.com/protocol-buffers/) message
237-
specification for inter-process communication
238-
- [`tests/`](tests/) - Contain integration tests for the projects
239-
240-
Below is a high level architecture of how the different components of the app and
241-
their IPC:
52+
- [`scripts/`](scripts/) - Contains ops and build related scripts
53+
- [`crates/`](crates/) - Contains all rust crates
54+
- [`docs/`](docs/) - Contains technical documentation
24255

243-
![architecture](docs/assets/architecture.svg)
56+
## Security
24457

58+
For security related concerns, see [here](SECURITY.md).
24559

246-
247-
248-
## 🛡️ Security
249-
250-
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
251-
252-
## 📜 Licensing
60+
## Licensing
25361

25462
This repo is dual licensed under MIT and Apache 2.0 licenses.
25563

64+
Those licenses can be found [here](LICENSE.MIT) and [here](LICENSE.APACHE).
65+
25666
“Amazon Web Services” and all related marks, including logos, graphic designs, and service names, are trademarks or trade dress of AWS in the U.S. and other countries. AWS’s trademarks and trade dress may not be used in connection with any product or service that is not AWS’s, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits AWS.

book.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[book]
2+
title = "Amazon Q CLI Technical Documentation"
3+
src = "docs"

docs/SUMMARY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Summary
2+
3+
[Introduction](./introduction.md)
4+
5+
- [The Agent Format](./the-agent-format.md)
6+
- [Native Tools](./native-tools.md)

0 commit comments

Comments
 (0)