Skip to content
Prev Previous commit
Next Next commit
fix: address PR feedback for kiro-cli migration
  • Loading branch information
medhatgalal committed Mar 3, 2026
commit bbfd0d003233a272ea884ebfe36021d4f256cb11
29 changes: 27 additions & 2 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,33 @@ echo "✅ Done"

echo -e "\n🤖 Installing Kiro CLI..."
# https://kiro.dev/docs/cli/
run_command "curl -fsSL https://cli.kiro.dev/install | bash"
run_command "kiro-cli --help > /dev/null"
KIRO_INSTALLER_URL="https://cli.kiro.dev/install"
KIRO_INSTALLER_PATH="$(mktemp)"

cleanup_kiro_installer() {
rm -f "$KIRO_INSTALLER_PATH"
}
trap cleanup_kiro_installer EXIT

run_command "curl -fsSL \"$KIRO_INSTALLER_URL\" -o \"$KIRO_INSTALLER_PATH\""

if [ -n "${KIRO_INSTALLER_SHA256:-}" ]; then
run_command "echo \"$KIRO_INSTALLER_SHA256 $KIRO_INSTALLER_PATH\" | sha256sum -c -"
fi

Comment thread
mnriem marked this conversation as resolved.
Outdated
run_command "bash \"$KIRO_INSTALLER_PATH\""

Comment thread
medhatgalal marked this conversation as resolved.
kiro_binary=""
if command -v kiro-cli >/dev/null 2>&1; then
kiro_binary="kiro-cli"
elif command -v kiro >/dev/null 2>&1; then
kiro_binary="kiro"
else
echo -e "\033[0;31m[ERROR] Kiro CLI installation did not create 'kiro-cli' or 'kiro' in PATH.\033[0m" >&2
exit 1
fi

run_command "$kiro_binary --help > /dev/null"
echo "✅ Done"

echo -e "\n🤖 Installing CodeBuddy CLI..."
Expand Down
4 changes: 3 additions & 1 deletion tests/test_ai_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ def fake_download(project_path, *args, **kwargs):
patch("specify_cli.install_ai_skills", return_value=True), \
patch("specify_cli.is_git_repo", return_value=True), \
patch("specify_cli.shutil.which", return_value="/usr/bin/git"):
runner.invoke(app, ["init", "--here", "--ai", "claude", "--ai-skills", "--script", "sh", "--no-git"])
result = runner.invoke(app, ["init", "--here", "--ai", "claude", "--ai-skills", "--script", "sh", "--force", "--no-git"])

assert result.exit_code == 0
# Commands must remain for --here
assert cmds_dir.exists()
assert (cmds_dir / "speckit.specify.md").exists()
Expand Down
8 changes: 3 additions & 5 deletions tests/test_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,9 @@ class TestCommandRegistrar:

def test_kiro_cli_agent_config_present(self):
"""Kiro CLI should be mapped to .kiro/prompts and legacy q removed."""
registrar = CommandRegistrar()

assert "kiro-cli" in registrar.AGENT_CONFIGS
assert registrar.AGENT_CONFIGS["kiro-cli"]["dir"] == ".kiro/prompts"
assert "q" not in registrar.AGENT_CONFIGS
assert "kiro-cli" in CommandRegistrar.AGENT_CONFIGS
assert CommandRegistrar.AGENT_CONFIGS["kiro-cli"]["dir"] == ".kiro/prompts"
assert "q" not in CommandRegistrar.AGENT_CONFIGS

def test_parse_frontmatter_valid(self):
"""Test parsing valid YAML frontmatter."""
Expand Down