Skip to content

Add OpenCode support to Specify CLI and release workflow#189

Closed
brandon-braner wants to merge 1 commit intogithub:mainfrom
brandon-braner:add_opencode_support
Closed

Add OpenCode support to Specify CLI and release workflow#189
brandon-braner wants to merge 1 commit intogithub:mainfrom
brandon-braner:add_opencode_support

Conversation

@brandon-braner
Copy link

  • 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.
Copilot AI review requested due to automatic review settings September 11, 2025 23:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Sep 11, 2025

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.

Suggested change
# opencode check is not needed as it's typically available in supported IDEs

Copilot uses AI. Check for mistakes.
# 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")
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'.

Suggested change
console.print("[red]Error:[/red] opencode is required for opencode projects")
console.print("[red]Error:[/red] OpenCode is required for OpenCode projects")

Copilot uses AI. Check for mistakes.
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:"
Copy link

Copilot AI Sep 11, 2025

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:'.

Suggested change
echo "opencode package contents:"
echo "OpenCode package contents:"

Copilot uses AI. Check for mistakes.
@brandon-braner
Copy link
Author

ah this is a duplicate of #64 should have checked before I did it

@aemr3
Copy link
Contributor

aemr3 commented Sep 12, 2025

ah this is a duplicate of #64 should have checked before I did it

I was fast 😎

@m-da-costa
Copy link

ah this is a duplicate of #64 should have checked before I did it

I was fast 😎

Yeap you were. I too almost create a PR. But @aemr3 beat me to it by 1 day. 2fast4me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants