mirror of
https://github.com/github/spec-kit.git
synced 2026-03-17 02:43:08 +00:00
* feat: add Kimi Code (kimi) CLI agent support - Register kimi in AGENT_CONFIG with folder `.kimi/`, markdown format, requires_cli=True - Register kimi in CommandRegistrar.AGENT_CONFIGS - Add kimi to supported agents table in AGENTS.md and README.md - Add kimi to release packaging scripts (bash and PowerShell) - Add kimi CLI installation to devcontainer post-create script - Add kimi support to update-agent-context scripts (bash and PowerShell) - Add 4 consistency tests covering all kimi integration surfaces - Bump version to 0.1.14 and update CHANGELOG * fix: include .specify/templates/ and real command files in release ZIPs - Copy real command files from templates/commands/ (with speckit. prefix) instead of generating stubs, so slash commands have actual content - Add .specify/templates/ to every ZIP so ensure_constitution_from_template can find constitution-template.md on init - Add .vscode/settings.json to every ZIP - Having 3 top-level dirs prevents the extraction flatten heuristic from incorrectly stripping the agent config folder (.kimi/, .claude/, etc.) - Bump version to 0.1.14.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(kimi): use .kimi/skills/<name>/SKILL.md structure for Kimi Code CLI Kimi Code CLI uses a skills system, not flat command files: - Skills live in .kimi/skills/<name>/SKILL.md (project-level) - Invoked with /skill:<name> (e.g. /skill:speckit.specify) - Each skill is a directory containing SKILL.md with YAML frontmatter Changes: - AGENT_CONFIG["kimi"]["commands_subdir"] = "skills" (was "commands") - create-release-packages.sh: new create_kimi_skills() function creates skill directories with SKILL.md from real template content - Bump version to 0.1.14.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(test): align kimi commands_subdir assertion with skills structure * fix: use forward slashes for tabnine path in create-release-packages.ps1 * fix: align kimi to .kimi/skills convention and fix ARGUMENTS unbound variable * fix: address PR review comments for kimi agent support - Fix VERSION_NO_V undefined variable in create-github-release.sh - Restore version $1 argument handling in create-release-packages.sh - Fix tabnine/vibe/generic cases calling undefined generate_commands - Align roo path .roo/rules -> .roo/commands with AGENT_CONFIG - Fix kimi extension to use per-skill SKILL.md directory structure - Add parent mkdir before dest_file.write_text for nested paths - Restore devcontainer tools removed by regression + add Kimi CLI - Strengthen test_kimi_in_powershell_validate_set assertion * fix: restore release scripts and address all PR review comments - Restore create-release-packages.sh to original with full generate_commands/ rewrite_paths logic; add kimi case using create_kimi_skills function - Restore create-release-packages.ps1 to original with full Generate-Commands/ Rewrite-Paths logic; add kimi case using New-KimiSkills function - Restore create-github-release.sh to original with proper $1 argument handling and VERSION_NO_V; add kimi zip entries - Add test_ai_help_includes_kimi for consistency with other agents - Strengthen test_kimi_in_powershell_validate_set to check ValidateSet * fix: address second round of PR review comments - Add __AGENT__ and {AGENT_SCRIPT} substitutions in create_kimi_skills (bash) - Add __AGENT__ and {AGENT_SCRIPT} substitutions in New-KimiSkills (PowerShell) - Replace curl|bash Kimi installer with pipx install kimi-cli in post-create.sh * fix: align kimi skill naming and add extension registrar test - Fix install_ai_skills() to use speckit.<cmd> naming for kimi (dot separator) instead of speckit-<cmd>, matching /skill:speckit.<cmd> invocation convention and packaging scripts - Add test_kimi_in_extension_registrar to verify CommandRegistrar.AGENT_CONFIGS includes kimi with correct dir and SKILL.md extension * fix(test): align kimi skill name assertion with dot-separator convention test_skills_install_for_all_agents now expects speckit.specify (dot) for kimi and speckit-specify (hyphen) for all other agents, matching the install_ai_skills() implementation added in the previous commit. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
107 lines
3.0 KiB
Bash
Executable File
107 lines
3.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Exit immediately on error, treat unset variables as an error, and fail if any command in a pipeline fails.
|
|
set -euo pipefail
|
|
|
|
# Function to run a command and show logs only on error
|
|
run_command() {
|
|
local command_to_run="$*"
|
|
local output
|
|
local exit_code
|
|
|
|
# Capture all output (stdout and stderr)
|
|
output=$(eval "$command_to_run" 2>&1) || exit_code=$?
|
|
exit_code=${exit_code:-0}
|
|
|
|
if [ $exit_code -ne 0 ]; then
|
|
echo -e "\033[0;31m[ERROR] Command failed (Exit Code $exit_code): $command_to_run\033[0m" >&2
|
|
echo -e "\033[0;31m$output\033[0m" >&2
|
|
|
|
exit $exit_code
|
|
fi
|
|
}
|
|
|
|
# Installing CLI-based AI Agents
|
|
|
|
echo -e "\n🤖 Installing Copilot CLI..."
|
|
run_command "npm install -g @github/copilot@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing Claude CLI..."
|
|
run_command "npm install -g @anthropic-ai/claude-code@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing Codex CLI..."
|
|
run_command "npm install -g @openai/codex@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing Gemini CLI..."
|
|
run_command "npm install -g @google/gemini-cli@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing Augie CLI..."
|
|
run_command "npm install -g @augmentcode/auggie@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing Qwen Code CLI..."
|
|
run_command "npm install -g @qwen-code/qwen-code@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing OpenCode CLI..."
|
|
run_command "npm install -g opencode-ai@latest"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing Kiro CLI..."
|
|
# https://kiro.dev/docs/cli/
|
|
KIRO_INSTALLER_URL="https://kiro.dev/install.sh"
|
|
KIRO_INSTALLER_SHA256="7487a65cf310b7fb59b357c4b5e6e3f3259d383f4394ecedb39acf70f307cffb"
|
|
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\""
|
|
run_command "echo \"$KIRO_INSTALLER_SHA256 $KIRO_INSTALLER_PATH\" | sha256sum -c -"
|
|
|
|
run_command "bash \"$KIRO_INSTALLER_PATH\""
|
|
|
|
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 Kimi CLI..."
|
|
# https://code.kimi.com
|
|
run_command "pipx install kimi-cli"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🤖 Installing CodeBuddy CLI..."
|
|
run_command "npm install -g @tencent-ai/codebuddy-code@latest"
|
|
echo "✅ Done"
|
|
|
|
# Installing UV (Python package manager)
|
|
echo -e "\n🐍 Installing UV - Python Package Manager..."
|
|
run_command "pipx install uv"
|
|
echo "✅ Done"
|
|
|
|
# Installing DocFx (for documentation site)
|
|
echo -e "\n📚 Installing DocFx..."
|
|
run_command "dotnet tool update -g docfx"
|
|
echo "✅ Done"
|
|
|
|
echo -e "\n🧹 Cleaning cache..."
|
|
run_command "sudo apt-get autoclean"
|
|
run_command "sudo apt-get clean"
|
|
|
|
echo "✅ Setup completed. Happy coding! 🚀"
|