Skip to content

Add OpenCode app - #3023

Open
amonkarsidhant wants to merge 2 commits into
Botspot:masterfrom
amonkarsidhant:add-opencode
Open

Add OpenCode app#3023
amonkarsidhant wants to merge 2 commits into
Botspot:masterfrom
amonkarsidhant:add-opencode

Conversation

@amonkarsidhant

Copy link
Copy Markdown
Contributor

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.

  • Downloads prebuilt ARM64 binary from GitHub releases
  • ARM64 only (no 32-bit support upstream)
  • Update mode supported via ./manage install OpenCode update
@Botspot

Botspot commented Jul 30, 2026

Copy link
Copy Markdown
Owner

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>
@amonkarsidhant

Copy link
Copy Markdown
Contributor Author

I've addressed the issues you raised by following the creating-an-app documentation:

  1. Renamed install to install-64 — OpenCode is ARM64-only, so using install-64 is the correct approach (the app won't show on 32-bit systems automatically)
  2. Removed the runtime arch check — No longer needed with install-64
  3. Added static version line — Changed from dynamic curl-based version fetch to a static version=1.18.10 line that the CI updater can substitute
  4. Added updater script — Created .github/workflows/updates/OpenCode.sh with the proper format (webVer + arm64_url with ${version})

The app now follows all the conventions documented at https://pi-apps.io/wiki/development/Creating-an-app/

@amonkarsidhant

Copy link
Copy Markdown
Contributor Author

I've addressed the issues you raised by following the creating-an-app documentation:

  1. Renamed install to install-64 — OpenCode is ARM64-only, so using install-64 is the correct approach
  2. Removed the runtime arch check — No longer needed with install-64
  3. Added static version line — Changed from dynamic curl-based version fetch to a static version=1.18.10 line that the CI updater can substitute
  4. Added updater script — Created .github/workflows/updates/OpenCode.sh

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 Terminal=true, but I wanted to check if this fits the project's vision. Please let me know if this app is appropriate or if I should close the PR.

Comment thread apps/OpenCode/install-64
Comment on lines +12 to +18
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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

@theofficialgman

Copy link
Copy Markdown
Collaborator

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 Terminal=true, but I wanted to check if this fits the project's vision. Please let me know if this app is appropriate or if I should close the PR.

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.

Comment thread apps/OpenCode/install-64
Comment on lines +7 to +8
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!"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

a .deb exists for arm64 linux. why are we doing a manual tar.gz installation at all?

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

Labels

None yet

3 participants