-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add OpenCode support to Specify CLI and release workflow #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -56,7 +56,8 @@ | |||||
| AI_CHOICES = { | ||||||
| "copilot": "GitHub Copilot", | ||||||
| "claude": "Claude Code", | ||||||
| "gemini": "Gemini CLI" | ||||||
| "gemini": "Gemini CLI", | ||||||
| "opencode": "OpenCode" | ||||||
| } | ||||||
|
|
||||||
| # 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 opencode"), | ||||||
| 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"), | ||||||
|
|
@@ -649,7 +650,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 OpenCode) | ||||||
| 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) | ||||||
|
|
@@ -660,6 +661,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 opencode | ||||||
| specify init --ignore-agent-tools my-project | ||||||
| specify init --here --ai claude | ||||||
| specify init --here | ||||||
|
|
@@ -738,7 +740,11 @@ 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 | ||||||
| # GitHub Copilot check is not needed as it's typically available in supported IDEs | ||||||
| elif selected_ai == "opencode": | ||||||
| if not check_tool("opencode", "Install from: https://github.com/sst/opencode"): | ||||||
| console.print("[red]Error:[/red] opencode is required for opencode projects") | ||||||
|
||||||
| console.print("[red]Error:[/red] opencode is required for opencode projects") | |
| console.print("[red]Error:[/red] OpenCode is required for OpenCode projects") |
Copilot
AI
Sep 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 880 appears to be copied from the GitHub Copilot comment and is incorrect for OpenCode. OpenCode is a CLI tool that needs to be installed separately, unlike GitHub Copilot which is available in IDEs. This comment should be removed or updated to reflect OpenCode's actual installation requirements.
| # opencode check is not needed as it's typically available in supported IDEs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package name verification uses lowercase 'opencode' while other AI assistants use proper capitalization (e.g., 'Claude package contents:', 'Gemini package contents:'). For consistency with the established pattern, this should be 'OpenCode package contents:'.