Sponsored by Deepsite.site

Amazon Q Developer Cli

Created By
aws7 months ago
โœจ Agentic chat experience in your terminal. Build applications using natural language.
Content

Amazon Q

Amazon Q CLI brings IDE-style autocomplete and agentic capabilities to your terminal.

GitHub commit activity GitHub open issues

Rust Test Typos Test Typescript Test

๐Ÿ˜ Features

  • ๐Ÿ”ฎ Auto Completion: IDE-style completions to hundreds of popular CLIs like git, npm, docker, and aws.
  • ๐Ÿ’ฌ Natural Language Chat: Interact with your terminal using natural language to ask questions, debug issues, or explore the codebase.
  • ๐Ÿง  Contextual Awareness: Integrates context from your local development environment, so answers are tailored to your specific code and setup.
  • ๐Ÿค– Agentic Execution: Let Amazon Q take action: generate code, edit files, automate Git workflows, resolve merge conflicts, and more โ€” with your permission.

โšก๏ธ Installation

๐Ÿš€ Start Contributing

Prerequisites

  • MacOS
    • Xcode 13 or later
    • Brew

1. Clone repo

git clone https://github.com/aws/amazon-q-for-command-line.git

2. Setup

Hassle-free setup:

npm run setup

Or if you'd like to DIY:

Manual Setup

1. Install platform dependencies

For Debian/Ubuntu:

sudo apt update
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

2. Install Rust toolchain using Rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable

For pre-commit hooks, the following commands are required:

rustup toolchain install nightly
cargo install typos-cli

For MacOS development make sure the right targets are installed:

rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin

3. Setup Python and Node using mise

Add mise integrations to your shell:

For zsh:

echo 'eval "$(mise activate zsh)"' >> "${ZDOTDIR-$HOME}/.zshrc"

For bash:

echo 'eval "$(mise activate bash)"' >> ~/.bashrc

For fish:

echo 'mise activate fish | source' >> ~/.config/fish/config.fish

Install the Python and Node toolchains using:

mise trust
mise install

4. Setup precommit hooks

Run pnpm in root directory to add pre-commit hooks:

pnpm install --ignore-scripts

3. Start Local Development

To compile and view changes made to q chat:

cargo run --bin chat_cli

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

To run tests for the Q CLI crate:

cargo test -p chat_cli

To format Rust files:

cargo +nightly fmt

To run clippy:

cargo clippy --locked --workspace --color always -- -D warnings

๐Ÿ’ก Quick Tip for Onboarding

Use Q CLI to help you onboard Q CLI!

Start a q chat session:

q chat

Once inside q chat, you can supply project context by adding the codebase-summary.md file:

/context add codebase-summary.md

This enables Q to answer onboarding questions like:

  • โ€œWhat does this crate do?โ€

  • โ€œWhere is X implemented?โ€

  • โ€œHow do these components interact?โ€

Great for speeding up your ramp-up and navigating the repo more effectively.

๐Ÿ—๏ธ Project Layout

Several projects live here:

  • autocomplete - The autocomplete react app
  • dashboard - The dashboard react app
  • figterm - figterm, our headless terminal/pseudoterminal that intercepts the userโ€™s terminal edit buffer.
  • q_cli - the q CLI, allows users to interface with Amazon Q Developer from the command line
  • fig_desktop - the Rust desktop app, uses tao/wry for windowing/webviews
  • fig_input_method - The input method used to get cursor position on macOS
  • vscode - Contains the VSCode plugin needed for the Amazon Q Developer for command line to work in VSCode
  • jetbrains - Contains the VSCode plugin needed for the Amazon Q Developer for command line to work in Jetbrains IDEs

Other folder to be aware of

  • build-scripts/ - Contains all python scripts to build, sign, and test the project on macOS and Linux
  • crates/ - Contains all internal rust crates
  • packages/ - Contains all internal npm packages
  • proto/ - protocol buffer message specification for inter-process communication
  • tests/ - Contain integration tests for the projects

Below is a high level architecture of how the different components of the app and their IPC:

architecture

๐Ÿ›ก๏ธ Security

See CONTRIBUTING for more information.

๐Ÿ“œ Licensing

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

โ€œ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.

Recommend Clients
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
VISBOOM
WindsurfThe new purpose-built IDE to harness magic
Continueโฉ Create, share, and use custom AI code assistants with our open-source IDE extensions and hub of models, rules, prompts, docs, and other building blocks
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP PlaygroundCall MCP Server Tools Online
LutraLutra is the first MCP compatible client built for everyone
Cherry Studio๐Ÿ’ Cherry Studio is a desktop client that supports for multiple LLM providers.
MCP ConnectEnables cloud-based AI services to access local Stdio based MCP servers via HTTP requests
y-cli ๐Ÿš€A Tiny Terminal Chat App for AI Models with MCP Client Support
A Sleek AI Assistant & MCP Client5ire is a cross-platform desktop AI assistant, MCP client. It compatible with major service providers, supports local knowledge base and tools via model context protocol servers .
ZedCode at the speed of thought โ€“ Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ChatWiseThe second fastest AI chatbotโ„ข
Roo Code (prev. Roo Cline)Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.
Cline โ€“ #1 on OpenRouterAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
DeepChatYour AI Partner on Desktop
HyperChatHyperChat is a Chat client that strives for openness, utilizing APIs from various LLMs to achieve the best Chat experience, as well as implementing productivity tools through the MCP protocol.
chatmcpChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
CursorThe AI Code Editor
Refact.aiOpen-source AI Agent for VS Code and JetBrains that autonomously solves coding tasks end-to-end.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.