feat: add Qwen Code support to Spec Kit
Add comprehensive Qwen Code integration following existing patterns: - Add Qwen as fourth AI assistant option in CLI - Update all documentation to include Qwen CLI references - Extend GitHub Actions workflow for Qwen template generation - Add Qwen support to shell scripts and templates - Maintain backward compatibility with existing assistants
This commit is contained in:
@@ -51,7 +51,8 @@ import readchar
|
||||
AI_CHOICES = {
|
||||
"copilot": "GitHub Copilot",
|
||||
"claude": "Claude Code",
|
||||
"gemini": "Gemini CLI"
|
||||
"gemini": "Gemini CLI",
|
||||
"qwen": "Qwen Code"
|
||||
}
|
||||
|
||||
# ASCII Art Banner
|
||||
@@ -638,7 +639,7 @@ def download_and_extract_template(project_path: Path, ai_assistant: str, is_curr
|
||||
@app.command()
|
||||
def init(
|
||||
project_name: str = typer.Argument(None, help="Name for your new project directory (optional if using --here)"),
|
||||
ai_assistant: str = typer.Option(None, "--ai", help="AI assistant to use: claude, gemini, or copilot"),
|
||||
ai_assistant: str = typer.Option(None, "--ai", help="AI assistant to use: claude, gemini, copilot, or qwen"),
|
||||
ignore_agent_tools: bool = typer.Option(False, "--ignore-agent-tools", help="Skip checks for AI agent tools like Claude Code"),
|
||||
no_git: bool = typer.Option(False, "--no-git", help="Skip git repository initialization"),
|
||||
here: bool = typer.Option(False, "--here", help="Initialize project in the current directory instead of creating a new one"),
|
||||
@@ -648,7 +649,7 @@ def init(
|
||||
|
||||
This command will:
|
||||
1. Check that required tools are installed (git is optional)
|
||||
2. Let you choose your AI assistant (Claude Code, Gemini CLI, or GitHub Copilot)
|
||||
2. Let you choose your AI assistant (Claude Code, Gemini CLI, GitHub Copilot, or Qwen Code)
|
||||
3. Download the appropriate template from GitHub
|
||||
4. Extract the template to a new project directory or current directory
|
||||
5. Initialize a fresh git repository (if not --no-git and no existing repo)
|
||||
@@ -659,6 +660,7 @@ def init(
|
||||
specify init my-project --ai claude
|
||||
specify init my-project --ai gemini
|
||||
specify init my-project --ai copilot --no-git
|
||||
specify init my-project --ai qwen
|
||||
specify init --ignore-agent-tools my-project
|
||||
specify init --here --ai claude
|
||||
specify init --here
|
||||
@@ -737,6 +739,10 @@ def init(
|
||||
if not check_tool("gemini", "Install from: https://github.com/google-gemini/gemini-cli"):
|
||||
console.print("[red]Error:[/red] Gemini CLI is required for Gemini projects")
|
||||
agent_tool_missing = True
|
||||
elif selected_ai == "qwen":
|
||||
if not check_tool("qwen", "Install from: https://github.com/QwenLM/qwen-code"):
|
||||
console.print("[red]Error:[/red] Qwen CLI is required for Qwen Code projects")
|
||||
agent_tool_missing = True
|
||||
# GitHub Copilot check is not needed as it's typically available in supported IDEs
|
||||
|
||||
if agent_tool_missing:
|
||||
@@ -824,6 +830,12 @@ def init(
|
||||
steps_lines.append(" - See GEMINI.md for all available commands")
|
||||
elif selected_ai == "copilot":
|
||||
steps_lines.append(f"{step_num}. Open in Visual Studio Code and use [bold cyan]/specify[/], [bold cyan]/plan[/], [bold cyan]/tasks[/] commands with GitHub Copilot")
|
||||
elif selected_ai == "qwen":
|
||||
steps_lines.append(f"{step_num}. Use / commands with Qwen CLI")
|
||||
steps_lines.append(" - Run qwen /specify to create specifications")
|
||||
steps_lines.append(" - Run qwen /plan to create implementation plans")
|
||||
steps_lines.append(" - Run qwen /tasks to generate tasks")
|
||||
steps_lines.append(" - See QWEN.md for all available commands")
|
||||
|
||||
step_num += 1
|
||||
steps_lines.append(f"{step_num}. Update [bold magenta]CONSTITUTION.md[/bold magenta] with your project's non-negotiable principles")
|
||||
@@ -856,11 +868,12 @@ def check():
|
||||
console.print("\n[cyan]Optional AI tools:[/cyan]")
|
||||
claude_ok = check_tool("claude", "Install from: https://docs.anthropic.com/en/docs/claude-code/setup")
|
||||
gemini_ok = check_tool("gemini", "Install from: https://github.com/google-gemini/gemini-cli")
|
||||
qwen_ok = check_tool("qwen", "Install from: https://github.com/QwenLM/qwen-code")
|
||||
|
||||
console.print("\n[green]✓ Specify CLI is ready to use![/green]")
|
||||
if not git_ok:
|
||||
console.print("[yellow]Consider installing git for repository management[/yellow]")
|
||||
if not (claude_ok or gemini_ok):
|
||||
if not (claude_ok or gemini_ok or qwen_ok):
|
||||
console.print("[yellow]Consider installing an AI assistant for the best experience[/yellow]")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user