Kiro CLI インストールしたが、kiro-cli not found

Kiro Cli がリリースされたので、早速Mac Book Air M4 にインストール。元々、Amazon Q Developer を利用して、q コマンドは実行できていた。

curl -fsSL https://cli.kiro.dev/install | bash

kiro-cli は無事にインストールされたことは確認できている。常駐しているし、Application にもちゃんと存在している。しかし、今まで実行できていた q コマンドも、kiro-cli コマンドも command not found となってしまった。

結論から言うと、~/.local/bin への書き込み権限が何故か無かったという落ち。

そういえば、Amazon Q Developer CLI をインストールした時もハマっていた。世界中どこを検索しても同様のエラーはなかった。

対応方法は以下。

mkdir -p ~/.local/bin
chown -R $USER:staff ~/.local/bin

そして改めて、

curl -fsSL https://cli.kiro.dev/install | bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile
% ls .local/bin 
bash (kiro-cli-term)	kiro-cli		kiro-cli-term		q			zsh (kiro-cli-term)
fish (kiro-cli-term)	kiro-cli-chat		nu (kiro-cli-term)	qchat

すると、無事インストールできたようだ。
Kiro-cli 自体はインストールされていたのだが、~/.local/bin へのエイリアスが、権限の問題で設定できていなかったということ。


Since Kiro CLI was released, I immediately installed it on my MacBook Air M4. I had already been using Amazon Q Developer, so I was able to run the q command before.

curl -fsSL https://cli.kiro.dev/install | bash

I confirmed that kiro-cli was successfully installed. It was running in the background and it also appeared correctly in the Applications folder.
However, both the previously working q command and the new kiro-cli command ended up throwing command not found.

In conclusion, the root cause was simply that I somehow didn’t have write permission to ~/.local/bin.

Come to think of it, I ran into the exact same issue when I installed the Amazon Q Developer CLI. I couldn’t find anyone else in the world reporting the same error.

Here’s the solution:

mkdir -p ~/.local/bin
chown -R $USER:staff ~/.local/bin

Then run the installation again:

curl -fsSL https://cli.kiro.dev/install | bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile

Checking the directory:

% ls .local/bin 
bash (kiro-cli-term)    kiro-cli        kiro-cli-term      q           zsh (kiro-cli-term)
fish (kiro-cli-term)    kiro-cli-chat   nu (kiro-cli-term) qchat

This time, everything worked.

Although Kiro CLI itself had been installed, the alias in ~/.local/bin couldn’t be created due to the permission issue—that was the whole story.

No responses yet

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です