MCPcopy Index your code
hub / github.com/aws/amazon-q-developer-cli

github.com/aws/amazon-q-developer-cli @v1.19.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.19.7 ↗ · + Follow
17,452 symbols 33,852 edges 1,952 files 10,095 documented · 58%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Amazon Q CLI

Installation

Contributing

Thank you so much for considering to contribute to Amazon Q.

Before getting started, see our contributing docs.

Prerequisites

  • MacOS
  • Xcode 13 or later
  • Brew

1. Clone repo

git clone https://github.com/aws/amazon-q-developer-cli.git

2. Install the Rust toolchain using Rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
rustup toolchain install nightly
cargo install typos-cli

3. Develop locally

  • To compile and run: cargo run --bin chat_cli.
  • To run tests: cargo test.
  • To run lints: cargo clippy.
  • To format rust files: cargo +nightly fmt.
  • To run subcommands: cargo run --bin chat_cli -- {subcommand}.
  • Login would then be: cargo run --bin chat_cli -- login

Project Layout

  • chat_cli - the q CLI, allows users to interface with Amazon Q Developer from the command line
  • scripts/ - Contains ops and build related scripts
  • crates/ - Contains all rust crates
  • docs/ - Contains technical documentation

Security

For security related concerns, see here.

Licensing

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

Those licenses can be found here and here.

“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.

Extension points exported contracts — how you extend this code

EnvProvider (Interface)
A trait for accessing environment variables. This provides unit tests the capability to fake system context. [6 implementers]
crates/agent/src/agent/util/providers.rs
CharCounter (Interface)
A trait for types that represent some number of characters (aka bytes). For use in calculating context window size utili [5 …
crates/chat-cli/src/cli/chat/token_counter.rs
CustomizableSend (Interface)
(no doc) [39 implementers]
crates/amzn-codewhisperer-client/src/client/customize/internal.rs
CustomizableSend (Interface)
(no doc) [22 implementers]
crates/amzn-consolas-client/src/client/customize/internal.rs
BenchmarkableEmbedder (Interface)
Trait for benchmarkable embedding models [3 implementers]
crates/semantic-search-client/src/embedding/benchmark_utils.rs
CustomizableSend (Interface)
(no doc) [4 implementers]
crates/amzn-codewhisperer-streaming-client/src/client/customize/internal.rs
CustomizableSend (Interface)
(no doc) [3 implementers]
crates/amzn-toolkit-telemetry-client/src/client/customize.rs
ResolveEndpoint (Interface)
Endpoint resolver trait specific to Amazon Q Developer Streaming [1 implementers]
crates/amzn-qdeveloper-streaming-client/src/config/endpoint.rs

Core symbols most depended-on inside this repo

map
called by 1532
crates/chat-cli/src/database/settings.rs
next
called by 1338
crates/agent/src/agent/agent_loop/mod.rs
to_string
called by 1071
crates/semantic-search-client/src/embedding/trait_def.rs
finish
called by 794
crates/chat-cli/src/auth/pkce.rs
key
called by 579
crates/amzn-codewhisperer-client/src/types/_environment_variable.rs
clone
called by 409
crates/chat-cli/src/cli/chat/tool_manager.rs
as_ref
called by 336
crates/amzn-codewhisperer-client/src/types/_intent.rs
build
called by 316
crates/amzn-codewhisperer-client/src/types/_span.rs

Shape

Method 12,833
Function 2,138
Class 1,960
Enum 491
Interface 30

Languages

Rust100%
Python1%

Modules by API surface

crates/amzn-codewhisperer-client/src/serde_util.rs70 symbols
crates/agent/src/agent/mod.rs69 symbols
crates/chat-cli/src/cli/chat/conversation.rs68 symbols
crates/amzn-codewhisperer-client/src/types/_user_trigger_decision_event.rs64 symbols
crates/amzn-consolas-client/src/config.rs62 symbols
crates/chat-cli/src/cli/chat/mod.rs61 symbols
crates/amzn-codewhisperer-client/src/config.rs61 symbols
crates/amzn-qdeveloper-streaming-client/src/config.rs60 symbols
crates/amzn-codewhisperer-streaming-client/src/config.rs59 symbols
crates/chat-cli/src/cli/chat/tool_manager.rs56 symbols
crates/amzn-toolkit-telemetry-client/src/config.rs56 symbols
crates/chat-cli/src/database/mod.rs55 symbols

For agents

$ claude mcp add amazon-q-developer-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact