Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

  • Replace auto-update subprocess spawning (bun add) with direct config file modification
  • Add updateConfigVersion() that writes the new version to opencode.jsonc files (both global and local project configs)
  • Simpler, more reliable update flow that leverages opencode's native plugin management to handle installation on restart

Changes

The previous approach spawned bun add @tarquinen/[email protected] which was unreliable across environments. The new approach:

  1. Detects when an update is available
  2. Directly modifies the plugin entry in config files to pin the new version
  3. Prompts user to restart opencode
  4. Opencode handles the actual update on next start

Replace the auto-update approach that spawned 'bun add' with a simpler
config-based update that directly modifies opencode.jsonc to pin the
new version. This is more reliable and lets opencode's native plugin
management handle the actual installation on restart.

- Remove performUpdate() function with subprocess spawning
- Add updateConfigVersion() to update global/local config files
- Simplify checkForUpdates() to update configs and notify user
- Works with both versioned and unversioned plugin entries
@Tarquinen Tarquinen force-pushed the refactor/simplify-version-update branch from 47175d9 to e633a53 Compare December 9, 2025 06:49
@Tarquinen Tarquinen merged commit 1e0e738 into master Dec 9, 2025
1 check passed
@Tarquinen Tarquinen deleted the refactor/simplify-version-update branch December 9, 2025 06:50
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.

2 participants