Add OpenCode support to Specify CLI and release workflow#189
Add OpenCode support to Specify CLI and release workflow#189brandon-braner wants to merge 1 commit intogithub:mainfrom
Conversation
brandon-braner
commented
Sep 11, 2025
- Updated AI_CHOICES to include OpenCode.
- Modified init command to allow selection of OpenCode as an AI assistant.
- Enhanced release workflow to create and package OpenCode templates.
- Updated AI_CHOICES to include OpenCode. - Modified init command to allow selection of OpenCode as an AI assistant. - Enhanced release workflow to create and package OpenCode templates.
There was a problem hiding this comment.
Pull Request Overview
This PR adds OpenCode support to the Specify CLI tool as a new AI assistant option alongside existing choices like GitHub Copilot, Claude Code, and Gemini CLI.
- Added OpenCode to the available AI assistant choices
- Updated CLI help text and documentation to include OpenCode
- Enhanced the release workflow to generate and package OpenCode templates
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/specify_cli/init.py | Added OpenCode as an AI choice, updated help text, added tool checking, and included OpenCode-specific setup instructions |
| .github/workflows/release.yml | Extended release workflow to create, package, and distribute OpenCode templates alongside existing AI assistant templates |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| 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") | ||
| opencode_ok = check_tool("opencode", "Install from: https://github.com/sst/opencode") | ||
| # opencode check is not needed as it's typically available in supported IDEs |
There was a problem hiding this comment.
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 |
| # 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") |
There was a problem hiding this comment.
The error message uses lowercase 'opencode' in two places while other AI assistants use proper capitalization in their error messages (e.g., 'Gemini CLI is required for Gemini projects'). For consistency, this should be '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") |
| unzip -l spec-kit-template-gemini-${{ steps.get_tag.outputs.new_version }}.zip | head -10 | ||
| echo "Copilot package contents:" | ||
| unzip -l spec-kit-template-copilot-${{ steps.get_tag.outputs.new_version }}.zip | head -10 | ||
| echo "opencode package contents:" |
There was a problem hiding this comment.
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:'.
| echo "opencode package contents:" | |
| echo "OpenCode package contents:" |
|
ah this is a duplicate of #64 should have checked before I did it |
I was fast 😎 |