Add OpenCode app - #3023
Conversation
|
This app submission has numerous issues. Please point your AI agent to our "creating an app" documentation: https://pi-apps.io/wiki/development/Creating-an-app/ |
- Rename install to install-64 since OpenCode is ARM64-only - Remove runtime arch check (unnecessary with install-64) - Replace dynamic version fetch with static version line for CI updater - Add .github/workflows/updates/OpenCode.sh updater script Signed-off-by: amonkarsidhant <amonkarsidhant@gmail.com>
|
I've addressed the issues you raised by following the creating-an-app documentation:
The app now follows all the conventions documented at https://pi-apps.io/wiki/development/Creating-an-app/ |
|
I've addressed the issues you raised by following the creating-an-app documentation:
However, I'm also wondering if OpenCode meets the app eligibility criteria, since it's a CLI-based AI coding agent rather than a traditional GUI desktop app. There are other CLI-based apps in pi-apps (like PowerShell, SpeedTest-CLI), and OpenCode has a desktop entry with |
| if [ "$1" == update ]; then | ||
| sudo tar xf /tmp/opencode.tar.gz -C /opt/opencode/bin/ || error "Failed to extract OpenCode!" | ||
| rm -f /tmp/opencode.tar.gz | ||
| sudo chmod +x /opt/opencode/bin/opencode | ||
| status_green "OpenCode updated to v${version}" | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
This is incorrect. The "update" flag is provided mainly for the uninstall script to avoid deleting or uninstalling stuff if the app is about to be reinstalled.
During an app update, pi-apps will run the old uninstall script with update argument, then run the new version of the app's install script with update argument. The code now is misusing the update argument and weirdly duplicates the normal installation code into a separate pathway for updates.
No issue with me for eligibility. It makes sense that this is a CLI based GUI application. It is still an electron app at the end of the day. |
| status "Downloading OpenCode v${version}..." | ||
| wget "https://github.com/anomalyco/opencode/releases/download/v${version}/opencode-linux-arm64.tar.gz" -O /tmp/opencode.tar.gz || error "Failed to download OpenCode!" |
There was a problem hiding this comment.
a .deb exists for arm64 linux. why are we doing a manual tar.gz installation at all?
OpenCode is an AI coding agent that runs in the terminal. It supports 50+ providers (Claude, GPT, Gemini, etc.) for code generation, debugging, and refactoring.
./manage install OpenCode update