|
| 1 | +# Amazon Q CLI |
1 | 2 |
|
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 |
| -[](https://github.com/aws/amazon-q-developer-cli/actions/workflows/rust.yml) |
26 |
| -[](https://github.com/aws/amazon-q-developer-cli/actions/workflows/typos.yml) |
27 |
| -[](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 |
46 | 4 |
|
47 | 5 | - **macOS**:
|
48 | 6 | - **DMG**: [Download now](https://desktop-release.q.us-east-1.amazonaws.com/latest/Amazon%20Q.dmg)
|
49 |
| - - **Homebrew**: `brew install amazon-q` |
50 | 7 | - **Linux**:
|
51 | 8 | - [Ubuntu/Debian](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html#command-line-installing-ubuntu)
|
52 | 9 | - [AppImage](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html#command-line-installing-appimage)
|
53 | 10 | - [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) |
60 | 11 |
|
| 12 | +## Contributing |
61 | 13 |
|
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). |
63 | 17 |
|
64 | 18 | ### Prerequisites
|
65 | 19 |
|
66 | 20 | - MacOS
|
67 | 21 | - Xcode 13 or later
|
68 | 22 | - Brew
|
69 | 23 |
|
70 |
| -### 1. Clone repo |
| 24 | +#### 1. Clone repo |
71 | 25 |
|
72 | 26 | ```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 |
74 | 28 | ```
|
75 | 29 |
|
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): |
97 | 31 |
|
98 | 32 | ```shell
|
99 | 33 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
100 | 34 | rustup default stable
|
101 |
| -``` |
102 |
| - |
103 |
| -For pre-commit hooks, the following commands are required: |
104 |
| - |
105 |
| -```shell |
106 | 35 | rustup toolchain install nightly
|
107 | 36 | cargo install typos-cli
|
108 | 37 | ```
|
109 | 38 |
|
110 |
| -For MacOS development make sure the right targets are installed: |
| 39 | +#### 3. Develop locally |
111 | 40 |
|
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` |
150 | 47 |
|
151 |
| -</div> |
152 |
| -</details> |
| 48 | +## Project Layout |
153 | 49 |
|
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 |
218 | 51 | 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 |
242 | 55 |
|
243 |
| - |
| 56 | +## Security |
244 | 57 |
|
| 58 | +For security related concerns, see [here](SECURITY.md). |
245 | 59 |
|
246 |
| - |
247 |
| - |
248 |
| -## 🛡️ Security |
249 |
| - |
250 |
| -See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. |
251 |
| - |
252 |
| -## 📜 Licensing |
| 60 | +## Licensing |
253 | 61 |
|
254 | 62 | This repo is dual licensed under MIT and Apache 2.0 licenses.
|
255 | 63 |
|
| 64 | +Those licenses can be found [here](LICENSE.MIT) and [here](LICENSE.APACHE). |
| 65 | + |
256 | 66 | “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.
|
0 commit comments