💻

Amazon Q Developer CLI にコミットさせてみよう

2025/03/13に公開

概要

Amazon Q Developer CLI が Agent 対応しました。

https://aws.amazon.com/jp/blogs/devops/introducing-the-enhanced-command-line-interface-in-amazon-q-developer/

Earlier today, Amazon Q Developer announced an enhanced CLI agent within the Amazon Q command line interface (CLI). With this announcement, Q Developer brings the latest agentic experience to the CLI that provide a more dynamic, interactive coding experience that works with you, and iteratively makes changes based on your feedback. Amazon Q Developer can now use the information in your CLI environment to help you read and write files locally, query AWS resources write code, or automatically debug issues.

この新機能に伴い、Q Developer CLI がいい感じに CLI コマンドを実行してくれるようになり、いい感じに作業をしてくれるようになります。
これを使用して、Q Developer にコミットルールに従って自律的にコミットの作成を実施させてみたいと思います。

同等のことは他の LLM ツールでも実現可能かと思います。
あくまで他のツールとの比較はせず Amazon Q Developer CLI でやってみる記事です。

やってみること

  • ユーザーの提示するルールに従って Q Developer にコミットさせてみます。

本記事でやらないこと

  • Amazon Q Developer CLI のインストール方法
    • 本検証は Amazon Q Developer Pro を使用していますが、無料版でも実行可能だと思います。
    • インストール方法については AWS デベロッパーアドボケイトの Yamaguchi さんの記事が参考になりました。

https://zenn.dev/ymotongpoo/articles/20250310-q-for-cli

  • コミットルールの詳細説明
    • ここら辺はいい感じに自分の要件に合わせてカスタマイズしてみてください。
  • Agent に関する詳細説明
    • 調べればたくさん記事がヒットするかと思いますのでそちらを参考にしてください。

How to

前提として本記事は以下の環境で実施しています。

  • Apple M3 Pro
  • OS: Sequoia Version 15.3.1
  • Terminal : WezTerm

コミットルールの設定

Prompt として Q Developer CLI に読み込ませるためにコミットルールを考えました。
概ね以下のようなルールです。

  • 一行目は <prefix>:<変更のサマリー> とする
  • 一行改行を開けた上で、以降に詳細を箇条書きで書く
  • 日本語でコミットメッセージを書く

あくまで検証なのでここら辺はチームでいい感じに合意を取るのが良いかと思います。

Prompt への落とし込み

Q Developer CLI に上述のコミットルールと合わせて、Agent の役割を記載した Prompt を作成します。
Q Developer CLI に課したいルールは以下の通りです。

  • 返答は日本語で行う
  • 必要に応じて git コマンドやファイルの読み込みを行う
  • 現在のディレクトリが git repository ではない場合、プロセスを修了する
  • 1 つのコミットには 1 つのスコープとし、複数の変更がある場合はコミットを分ける
  • コミットは上述のコミットルールに従う
  • 悩んだ際にはユーザーに判断を委ねる

上述のコミットルールと合わせて、上記のルールをまとめたものが以下になります。
日本語でも問題なく動作しましたが、性能が上がりそうな気がした(定性的)ので英語にしておきました。

prompt.md
# prompt for Amazon Q Developer CLI

## Rule

* You function as a tool that executes git commands and generates commit messages.
* You should response by Japanese.
* If the current directory is not Git repository, stop the process.
* Execute the following commands as needed:
    * git status
    * git diff 
    * git add
    * git commit
    * Read files directly as needed
* Commits should be made per unit of change. If multiple changes with different scopes are observed, you may split them into multiple commits.
* Commit messages should follow the ### Commit Format Rule
* If unsure about prefix selection, please present a list of possible prefixes and ask the user for their judgment.
* Commit messages should be written in Japanese(日本語).

### Commit Format Rule

* Use any of the following <prefix> as a base:
    * fix: Used when fixing issues in existing functionality.
    * hotfix: Used when adding emergency changes.
    * add: Used when adding new files.
    * feat: Used when adding new features.
    * update: Used when making modifications without changing functionality.
    * rename: Used when renaming files.
    * docs: Used when modifying documentation.
* First line should be formatted as <prefix>:<summary of changes>
* Insert one blank line after the first line.
* From the third line onwards, list the details of changes associated with the commit in bullet points.
* Consider human readability when writing commit messages, paying attention to encoding. For example, line breaks should be properly encoded.

サンプルリポジトリの作成

Q Developer CLI に与えるルールは作成できたので、実際に Git リポジトリを作り、うまく動作するのか確かめていきます。

以下のような構成のフォルダを作成します。

.
├── .qchat
│   └── prompt.md
├── .gitignore
├── README.md
└── hello.py
  • prompt.md には先ほどのルールが記載されています。
  • .gitignore では .qchat ディレクトリ以下を追跡対象外として設定しています。
  • README.md hello.py は現時点では何も記載しない空のファイルです。

ファイル作成後、initial commit をしておきます。

git add .
git commit -m "initial commit"

変更の実施

今回は以下のような変更を加えます。

  • README.md ファイルの記載 : 適当に書きます。
  • hello.py の実装 : hello world を print します
  • 新規ファイル の追加 : calc.py を作成し、1 + 1 の結果を return します。
README.md
# README

こんにちは
hello.py
def hello():
    print("hello world")
    return

if __name__ == "__main__":
    hello()
calc.py
def calc():
    ans = 1 + 1
    return ans

変更後の git status はこんな感じです。

% git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   README.md
        modified:   hello.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        calc.py

Q Developer CLI によるコミットの実施

今回は README.mdhello.py を変更・calc.py を作成しており、それぞれスコープが異なるコミットとなることが記載したルール上は理想的です。
prompt.md を実際に Q Developer CLI に読み込ませて作業をさせてみます。
Q Developer CLI には入力を受け取る際に直接ファイルを読み込む引数はないので、パイプで渡してみます。
コマンド実行の承認が面倒なので -a オプションを入れていますが、安全面を考えると都度 accept する方が良い気もします。

cat .qchat/prompt.md | q chat -a

実行したところ、以下のコミットを作成してくれました。
ルールに従ってコミットを分けた上でコミットしてくれていそうです。

add: 計算機能の追加

* 簡単な足し算を行う関数を実装
feat: hello関数の実装

* 「hello world」を出力する関数を追加
* メイン処理の追加
docs: READMEの初期化

* タイトルと挨拶文を追加

以下が実行結果の詳細になります。

こんにちは!Gitコミットメッセージの生成をお手伝いします。まず、現在のディレクトリがGitリポジトリかどうか確認しましょう。

Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command: git status

Executing `git status`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   README.md
        modified:   hello.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        calc.py

no changes added to commit (use "git add" and/or "git commit -a")

🟢 Completed in 0.20s


Gitリポジトリが確認できました。変更内容を詳しく見てみましょう。

Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command: git diff README.md

Executing `git diff README.md`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
diff --git a/README.md b/README.md
index e69de29..b057aad 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,3 @@
+# README
+
+* こんにちは

🟢 Completed in 0.16s


Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command: git diff hello.py

Executing `git diff hello.py`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
diff --git a/hello.py b/hello.py
index e69de29..e2bb73c 100644
--- a/hello.py
+++ b/hello.py
@@ -0,0 +1,7 @@
+def hello():
+    print("hello world")
+    return
+
+if __name__ == "__main__":
+    hello()
+

🟢 Completed in 0.18s


Read from filesystem
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Reading file: /Users/myName/Documents/q_test/calc.py, all lines

Reading from filesystem...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Reading: calc.py

🟢 Completed in 0.0s


変更内容を確認しました。以下の変更があります:

1. README.md - 内容の追加(タイトルと挨拶)
2. hello.py - hello関数の実装
3. calc.py - 新しいファイル(計算機能)

これらの変更は異なる機能に関するものなので、複数のコミットに分けることをお勧めします。

以下のようにコミットを分けましょう:

Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command: git add README.md

Executing `git add README.md`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

🟢 Completed in 0.28s


Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command:
git commit -m "docs: READMEの初期化

* タイトルと挨拶文を追加"

Executing `git commit -m "docs: READMEの初期化

* タイトルと挨拶文を追加"`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
[master 4fa3a94] docs: READMEの初期化
 1 file changed, 3 insertions(+)

🟢 Completed in 0.33s


Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command: git add hello.py

Executing `git add hello.py`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

🟢 Completed in 0.23s


Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command:
git commit -m "feat: hello関数の実装

* 「hello world」を出力する関数を追加
* メイン処理の追加"

Executing `git commit -m "feat: hello関数の実装

* 「hello world」を出力する関数を追加
* メイン処理の追加"`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
[master 11ed10e] feat: hello関数の実装
 1 file changed, 7 insertions(+)

🟢 Completed in 0.32s


Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command: git add calc.py

Executing `git add calc.py`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

🟢 Completed in 0.19s


Execute shell command
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I will run the following shell command:
git commit -m "add: 計算機能の追加

* 簡単な足し算を行う関数を実装"

Executing `git commit -m "add: 計算機能の追加

* 簡単な足し算を行う関数を実装"`...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
[master 2a71821] add: 計算機能の追加
 1 file changed, 3 insertions(+)
 create mode 100644 calc.py

🟢 Completed in 0.29s


コミットが完了しました!以下の3つのコミットを作成しました:

1. docs: READMEの初期化
   • タイトルと挨拶文を追加

2. feat: hello関数の実装
   • 「hello world」を出力する関数を追加
   • メイン処理の追加

3. add: 計算機能の追加
   • 簡単な足し算を行う関数を実装

各変更の内容に合わせて適切なプレフィックスを選択し、変更内容を日本語で簡潔に記述しました。これで変更内容が整理され、履歴が分かりやすくなりました。

他に何かお手伝いできることはありますか?

いい感じに作業を実施してくれました。
結構便利ですね、今後使っていきたいと思います。

例えばですが、.qchat/ フォルダを home に配置し、こんなスクリプトを作っておけば便利に使えそうですね。

sample_script.sh
#!/bin/bash
cat ~/.qchat/\$1.md | q chat -a

まとめ

  • Amazon Q Developer CLI 便利

Discussion