Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README file to update commands and make it easy to copy-paste CLI commands directly #929

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

kkashilk
Copy link
Collaborator

Issue #, if available:

Problem:

  1. husky install is deprecated
  2. Shell commands cannot be copied into CLI directly because of the comments added in code-snippets

Description of changes:

1) Fix husky install step command

In husky v9 (Link), the installation process changed. Instead of using husky install, the recommended approach is now to use the husky command directly, which is already correctly configured in the package.json:

"scripts": {
  "prepare": "husky",
  "precommit": "lint-staged --config .lintstagedrc.mjs"
}

The prepare script with just husky is the correct modern way to set up husky in v9. This automatically runs when you do pnpm install and sets up the git hooks.

The pre-commit hook is also properly configured to run:

pnpm run precommit
pnpm run -r precommit

To work with husky in this project:

  1. You don't need to run husky install manually - it's handled by the prepare script
  2. To modify existing hooks, just edit the files in the .husky directory

2) Make copy-paste easy from README to CLI directly

  1. Make all code-snippets consistently use shell for syntax-highlighting
  2. Remove comments from code-snippets so that they can be copy-pasted into CLI directly

@kkashilk kkashilk requested a review from a team as a code owner March 25, 2025 00:56
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.86%. Comparing base (151873d) to head (b0440e4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
+ Coverage   13.74%   13.86%   +0.11%     
==========================================
  Files        2360     2370      +10     
  Lines      204441   205481    +1040     
  Branches   184805   185845    +1040     
==========================================
+ Hits        28109    28485     +376     
- Misses     174840   175473     +633     
- Partials     1492     1523      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mr-lee mr-lee merged commit 3545e45 into aws:main Mar 25, 2025
10 checks passed
@kkashilk kkashilk deleted the readme-update branch March 25, 2025 01:15
dingfeli added a commit that referenced this pull request Mar 29, 2025
commit 467c7f3
Author: Maxim Hayes <[email protected]>
Date:   Fri Mar 28 18:40:30 2025 -0400

    feat(commands): add /issue command to chat (#990)

    This command simply prompts amazon Q to use the `report_issue` tool. Any additional text beyond /issue will be provided in the prompt.

    Ref: #972

commit 5a704ba
Author: Xipu Li <[email protected]>
Date:   Fri Mar 28 14:12:52 2025 -0700

    docs(README): add local development instructions for q chat (#995)

commit 8f638b0
Author: Maxim Hayes <[email protected]>
Date:   Fri Mar 28 15:08:49 2025 -0400

    refactor(tools): add context to report_issue tool (#980)

    - Add the ability to add context to `Tool`s, without passing in awkward args to the generic invoke function.
    - Graceful tool error if context fails to be set (should be impossible).

commit 65d7f50
Author: Maxim Hayes <[email protected]>
Date:   Fri Mar 28 14:51:06 2025 -0400

    feat(tools): increase transcript length, record all user input (#984)

    For `report_issue` tool:
    - Take last 10 chats instead of last 5
    - Also accept any user input, like commands (/acceptall, /clear).

commit d705b33
Author: kkashilk <[email protected]>
Date:   Fri Mar 28 09:16:53 2025 -0700

    feat(cli): improve context file display (#983)

    - Always show context file count regardless of expand flag
    - Let users know that no files are currently being added to context

commit 1b29eb7
Author: Xipu Li <[email protected]>
Date:   Thu Mar 27 21:00:37 2025 -0700

    Prettify README + setup script (#976)

commit 8a4afec
Author: Maxim Hayes <[email protected]>
Date:   Thu Mar 27 19:36:12 2025 -0400

    feat(tools): add gh_issue (#974)

    Addresses #873

    Add the gh_issue tool that allows Q to open pre-filled issue templates with additional information. Similar to q issue, when asked to report an issue, a browser will open to the template (or URL if the browser cannot be opened).

    Features:

    - Triggers when asked to create or report an issue, or to open a feature request.
    - Adds additional chat information automatically.
    - Q could fill in expected/actual behavior, steps to reproduce, title.
    - Includes any request IDs that resulted in an error.
    - Includes chat context (from /context show --expand). This also includes their sizes.
    - Includes the last 5 user-assistant requests from the chat transcript. This also includes any tool uses or errors that were displayed.

commit 7307b53
Author: Xipu Li <[email protected]>
Date:   Thu Mar 27 14:50:46 2025 -0700

    fix(chat): update timeout message for clarity in assistant responses (#975)

commit ea30d6f
Author: kkashilk <[email protected]>
Date:   Wed Mar 26 16:26:58 2025 -0700

    refactor(chat): Add command suggestions for common single-word inputs (#953)

    Improve user experience by detecting when users type common commands like
    exit, quit, or help without the leading slash prefix. Instead of
    making unnecessary LLM calls, provide helpful suggestions to use the
    proper command format (e.g., '/quit', '/help').

    🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)

commit 0e85517
Author: Xipu Li <[email protected]>
Date:   Wed Mar 26 12:11:06 2025 -0700

    docs: add onboarding tips for using Q CLI in README (#950)

commit 0497da7
Author: kkashilk <[email protected]>
Date:   Wed Mar 26 10:17:42 2025 -0700

    fix(chat): Improve command parsing to handle paths starting with slash (#945)

    Fixes an issue where pasting error messages or file paths that start
    with a slash (/) would be incorrectly interpreted as commands. This
    change improves the command parser to better distinguish between actual
    commands and text that happens to start with a slash character.

    Closes #894

commit 242c09c
Author: Maxim Hayes <[email protected]>
Date:   Wed Mar 26 09:59:38 2025 -0400

    feat(chat): no-interactive mode (#878)

    * feat(chat): no-interactive mode

    Related: #808

    - Prints to STDOUT instead.
    - Does not print non-response text, e.g.
    - Runs tools as long as --accept-all is also provided. Otherwise it will error. You can bypass this by asking to not run tools in the prompt.
    - Continues to work with pipes, e.g.
      - echo "give a cool tip" | q chat --no-interactive -> outputs a cool tip
      - echo "give a cool tip" | q chat --no-interactive "write hello world." -> outputs hello world code and a cool tip
      - q chat --no-interactive -> does nothing and immediately returns

    Does NOT print without any formatting/styling codes or labels. That will require a larger refactor in a separate PR.

    * fix arg name in test

    * format

commit 36f1ae1
Author: sai srinivas somarouthu <[email protected]>
Date:   Wed Mar 26 05:14:37 2025 -0700

    fix(build): Support aarch64 architecture in AppImage bundle name (#937) (#944)

    Replace hardcoded amd64 reference with dynamic architecture detection
    based on the target triple. This allows proper AppImage bundle naming
    for both amd64 and aarch64 architectures.

    Co-authored-by: Somar Sai <[email protected]>

commit 447c3ff
Author: kkashilk <[email protected]>
Date:   Tue Mar 25 21:33:00 2025 -0700

    feat(cli): Add file/folder name auto-completion in q chat (#930)

    * Add file/folder name auto-completion in q chat

    * feat(cli): Add PathCompleter for file path suggestions

    Implement PathCompleter struct to provide filesystem path completion
    functionality in the CLI, enhancing the user experience with
    intelligent path suggestions during input.

    🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)

    * use file-path completion as fallback

commit 84f8cca
Author: Felix Ding <[email protected]>
Date:   Tue Mar 25 10:31:31 2025 -0700

    Revert "Mcp enablement squashed (#925)" (#928)

    This reverts commit 752d524.

commit 2786f01
Author: Kyle Thomson <[email protected]>
Date:   Mon Mar 24 20:13:52 2025 -0700

    feat(cli) Bash pipe command safety (#927)

    * feat(cli): Add find and grep as commands to the safe list

    Rational: these are common commands used by the CLI to determine the current state of the users workspace when understanding context for a task.

    * feat(cli): Support safe piped commands in execute_bash

    Allow piped commands that only use safe read-only operations like 'find | grep' or 'ls | grep'. Each command in the pipe chain is validated against the READONLY_COMMANDS list.

    🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)

commit 3545e45
Author: kkashilk <[email protected]>
Date:   Mon Mar 24 18:14:54 2025 -0700

    chore: Update README file to update commands and make it copy-paste friendly (#929)

commit 752d524
Author: Felix Ding <[email protected]>
Date:   Mon Mar 24 16:54:22 2025 -0700

    Mcp enablement squashed (#925)

    * Squashed mcp-enablement changes

    * moves shellexpand to workspace dep

    * reverts changes in lock file

    * fixes tests

    * fixes fmt

    * updates lock file

    * Revert "updates lock file"

    This reverts commit f847c6f.

    * uses lock file from main

    * updates lock file

    * regenerates lock file

    * updates ci workflow to do a full fetch

    * allows lock file to be generated offline in the ci

    * Revert "allows lock file to be generated offline in the ci"

    This reverts commit 40a3b1a.

    * allows all custom tool actions

    * disables cache to get through CI

    * Revert "disables cache to get through CI"

    This reverts commit 46277c8.

    * force regenerate lock file

    * force regenerate lock file for test

    * baselines lock file to main

    * reverts lock file regenerate step

    * merges in main

commit 151873d
Author: Felix Ding <[email protected]>
Date:   Mon Mar 24 14:02:55 2025 -0700

    Revert "Mcp enablement squashed (#883)" (#924)

    This reverts commit 853d86b.

commit 853d86b
Author: Felix Ding <[email protected]>
Date:   Fri Mar 21 13:58:39 2025 -0700

    Mcp enablement squashed (#883)

    * Squashed mcp-enablement changes

    * moves shellexpand to workspace dep

    * reverts changes in lock file

    * fixes tests

    * fixes fmt

    * updates lock file

    * Revert "updates lock file"

    This reverts commit f847c6f.

    * uses lock file from main

    * updates lock file

    * regenerates lock file

    * updates ci workflow to do a full fetch

    * allows lock file to be generated offline in the ci

    * Revert "allows lock file to be generated offline in the ci"

    This reverts commit 40a3b1a.

    * allows all custom tool actions

    * disables cache to get through CI

    * Revert "disables cache to get through CI"

    This reverts commit 46277c8.

    * force regenerate lock file

    * force regenerate lock file for test

commit 3328253
Author: Chay Nabors <[email protected]>
Date:   Thu Mar 20 23:15:28 2025 -0700

    feat: add rfc process (#881)

commit b6bf5f1
Author: Brandon Kiser <[email protected]>
Date:   Thu Mar 20 18:32:48 2025 -0700

    chore: bump version to 1.7.2 (#877)

commit 454e76f
Author: Brandon Kiser <[email protected]>
Date:   Thu Mar 20 17:43:37 2025 -0700

    chore: add beta notice to /profile and /context help text (#875)
dingfeli added a commit that referenced this pull request Mar 29, 2025
* Squashed mcp-enablement changes

* moves shellexpand to workspace dep

* reverts changes in lock file

* fixes tests

* fixes fmt

* updates lock file

* Revert "updates lock file"

This reverts commit f847c6f.

* uses lock file from main

* updates lock file

* regenerates lock file

* updates ci workflow to do a full fetch

* allows lock file to be generated offline in the ci

* Revert "allows lock file to be generated offline in the ci"

This reverts commit 40a3b1a.

* allows all custom tool actions

* disables cache to get through CI

* Revert "disables cache to get through CI"

This reverts commit 46277c8.

* force regenerate lock file

* force regenerate lock file for test

* baselines lock file to main

* reverts lock file regenerate step

* merges in main

* simplifies transport trait, adds test to transport

* adds mcp server name validation

* parallelizes custom tool load

* fixes parser erroring out on tool calls that has no input

* changes to request method to only listen for response

* enables child processes to accept env var specified in config as well as inherit those that are from parent

* loads config from designated folders

* adds highlight to mcp config conflict warning messages

* redacts images in the form of base64 encoded string from tool call results

* makes deserialization into tool call result optional

* merges from main

* improves custom tool description format

* Squashed commit of the following:

commit 467c7f3
Author: Maxim Hayes <[email protected]>
Date:   Fri Mar 28 18:40:30 2025 -0400

    feat(commands): add /issue command to chat (#990)

    This command simply prompts amazon Q to use the `report_issue` tool. Any additional text beyond /issue will be provided in the prompt.

    Ref: #972

commit 5a704ba
Author: Xipu Li <[email protected]>
Date:   Fri Mar 28 14:12:52 2025 -0700

    docs(README): add local development instructions for q chat (#995)

commit 8f638b0
Author: Maxim Hayes <[email protected]>
Date:   Fri Mar 28 15:08:49 2025 -0400

    refactor(tools): add context to report_issue tool (#980)

    - Add the ability to add context to `Tool`s, without passing in awkward args to the generic invoke function.
    - Graceful tool error if context fails to be set (should be impossible).

commit 65d7f50
Author: Maxim Hayes <[email protected]>
Date:   Fri Mar 28 14:51:06 2025 -0400

    feat(tools): increase transcript length, record all user input (#984)

    For `report_issue` tool:
    - Take last 10 chats instead of last 5
    - Also accept any user input, like commands (/acceptall, /clear).

commit d705b33
Author: kkashilk <[email protected]>
Date:   Fri Mar 28 09:16:53 2025 -0700

    feat(cli): improve context file display (#983)

    - Always show context file count regardless of expand flag
    - Let users know that no files are currently being added to context

commit 1b29eb7
Author: Xipu Li <[email protected]>
Date:   Thu Mar 27 21:00:37 2025 -0700

    Prettify README + setup script (#976)

commit 8a4afec
Author: Maxim Hayes <[email protected]>
Date:   Thu Mar 27 19:36:12 2025 -0400

    feat(tools): add gh_issue (#974)

    Addresses #873

    Add the gh_issue tool that allows Q to open pre-filled issue templates with additional information. Similar to q issue, when asked to report an issue, a browser will open to the template (or URL if the browser cannot be opened).

    Features:

    - Triggers when asked to create or report an issue, or to open a feature request.
    - Adds additional chat information automatically.
    - Q could fill in expected/actual behavior, steps to reproduce, title.
    - Includes any request IDs that resulted in an error.
    - Includes chat context (from /context show --expand). This also includes their sizes.
    - Includes the last 5 user-assistant requests from the chat transcript. This also includes any tool uses or errors that were displayed.

commit 7307b53
Author: Xipu Li <[email protected]>
Date:   Thu Mar 27 14:50:46 2025 -0700

    fix(chat): update timeout message for clarity in assistant responses (#975)

commit ea30d6f
Author: kkashilk <[email protected]>
Date:   Wed Mar 26 16:26:58 2025 -0700

    refactor(chat): Add command suggestions for common single-word inputs (#953)

    Improve user experience by detecting when users type common commands like
    exit, quit, or help without the leading slash prefix. Instead of
    making unnecessary LLM calls, provide helpful suggestions to use the
    proper command format (e.g., '/quit', '/help').

    🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)

commit 0e85517
Author: Xipu Li <[email protected]>
Date:   Wed Mar 26 12:11:06 2025 -0700

    docs: add onboarding tips for using Q CLI in README (#950)

commit 0497da7
Author: kkashilk <[email protected]>
Date:   Wed Mar 26 10:17:42 2025 -0700

    fix(chat): Improve command parsing to handle paths starting with slash (#945)

    Fixes an issue where pasting error messages or file paths that start
    with a slash (/) would be incorrectly interpreted as commands. This
    change improves the command parser to better distinguish between actual
    commands and text that happens to start with a slash character.

    Closes #894

commit 242c09c
Author: Maxim Hayes <[email protected]>
Date:   Wed Mar 26 09:59:38 2025 -0400

    feat(chat): no-interactive mode (#878)

    * feat(chat): no-interactive mode

    Related: #808

    - Prints to STDOUT instead.
    - Does not print non-response text, e.g.
    - Runs tools as long as --accept-all is also provided. Otherwise it will error. You can bypass this by asking to not run tools in the prompt.
    - Continues to work with pipes, e.g.
      - echo "give a cool tip" | q chat --no-interactive -> outputs a cool tip
      - echo "give a cool tip" | q chat --no-interactive "write hello world." -> outputs hello world code and a cool tip
      - q chat --no-interactive -> does nothing and immediately returns

    Does NOT print without any formatting/styling codes or labels. That will require a larger refactor in a separate PR.

    * fix arg name in test

    * format

commit 36f1ae1
Author: sai srinivas somarouthu <[email protected]>
Date:   Wed Mar 26 05:14:37 2025 -0700

    fix(build): Support aarch64 architecture in AppImage bundle name (#937) (#944)

    Replace hardcoded amd64 reference with dynamic architecture detection
    based on the target triple. This allows proper AppImage bundle naming
    for both amd64 and aarch64 architectures.

    Co-authored-by: Somar Sai <[email protected]>

commit 447c3ff
Author: kkashilk <[email protected]>
Date:   Tue Mar 25 21:33:00 2025 -0700

    feat(cli): Add file/folder name auto-completion in q chat (#930)

    * Add file/folder name auto-completion in q chat

    * feat(cli): Add PathCompleter for file path suggestions

    Implement PathCompleter struct to provide filesystem path completion
    functionality in the CLI, enhancing the user experience with
    intelligent path suggestions during input.

    🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)

    * use file-path completion as fallback

commit 84f8cca
Author: Felix Ding <[email protected]>
Date:   Tue Mar 25 10:31:31 2025 -0700

    Revert "Mcp enablement squashed (#925)" (#928)

    This reverts commit 752d524.

commit 2786f01
Author: Kyle Thomson <[email protected]>
Date:   Mon Mar 24 20:13:52 2025 -0700

    feat(cli) Bash pipe command safety (#927)

    * feat(cli): Add find and grep as commands to the safe list

    Rational: these are common commands used by the CLI to determine the current state of the users workspace when understanding context for a task.

    * feat(cli): Support safe piped commands in execute_bash

    Allow piped commands that only use safe read-only operations like 'find | grep' or 'ls | grep'. Each command in the pipe chain is validated against the READONLY_COMMANDS list.

    🤖 Assisted by [Amazon Q Developer](https://aws.amazon.com/q/developer)

commit 3545e45
Author: kkashilk <[email protected]>
Date:   Mon Mar 24 18:14:54 2025 -0700

    chore: Update README file to update commands and make it copy-paste friendly (#929)

commit 752d524
Author: Felix Ding <[email protected]>
Date:   Mon Mar 24 16:54:22 2025 -0700

    Mcp enablement squashed (#925)

    * Squashed mcp-enablement changes

    * moves shellexpand to workspace dep

    * reverts changes in lock file

    * fixes tests

    * fixes fmt

    * updates lock file

    * Revert "updates lock file"

    This reverts commit f847c6f.

    * uses lock file from main

    * updates lock file

    * regenerates lock file

    * updates ci workflow to do a full fetch

    * allows lock file to be generated offline in the ci

    * Revert "allows lock file to be generated offline in the ci"

    This reverts commit 40a3b1a.

    * allows all custom tool actions

    * disables cache to get through CI

    * Revert "disables cache to get through CI"

    This reverts commit 46277c8.

    * force regenerate lock file

    * force regenerate lock file for test

    * baselines lock file to main

    * reverts lock file regenerate step

    * merges in main

commit 151873d
Author: Felix Ding <[email protected]>
Date:   Mon Mar 24 14:02:55 2025 -0700

    Revert "Mcp enablement squashed (#883)" (#924)

    This reverts commit 853d86b.

commit 853d86b
Author: Felix Ding <[email protected]>
Date:   Fri Mar 21 13:58:39 2025 -0700

    Mcp enablement squashed (#883)

    * Squashed mcp-enablement changes

    * moves shellexpand to workspace dep

    * reverts changes in lock file

    * fixes tests

    * fixes fmt

    * updates lock file

    * Revert "updates lock file"

    This reverts commit f847c6f.

    * uses lock file from main

    * updates lock file

    * regenerates lock file

    * updates ci workflow to do a full fetch

    * allows lock file to be generated offline in the ci

    * Revert "allows lock file to be generated offline in the ci"

    This reverts commit 40a3b1a.

    * allows all custom tool actions

    * disables cache to get through CI

    * Revert "disables cache to get through CI"

    This reverts commit 46277c8.

    * force regenerate lock file

    * force regenerate lock file for test

commit 3328253
Author: Chay Nabors <[email protected]>
Date:   Thu Mar 20 23:15:28 2025 -0700

    feat: add rfc process (#881)

commit b6bf5f1
Author: Brandon Kiser <[email protected]>
Date:   Thu Mar 20 18:32:48 2025 -0700

    chore: bump version to 1.7.2 (#877)

commit 454e76f
Author: Brandon Kiser <[email protected]>
Date:   Thu Mar 20 17:43:37 2025 -0700

    chore: add beta notice to /profile and /context help text (#875)

* fixes error from merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants