Skip to content

feat(plugin): add update command for third-party plugins#659

Open
saulob wants to merge 8 commits intofatihak:mainfrom
saulob:feat/plugin-update-command
Open

feat(plugin): add update command for third-party plugins#659
saulob wants to merge 8 commits intofatihak:mainfrom
saulob:feat/plugin-update-command

Conversation

@saulob
Copy link
Copy Markdown

@saulob saulob commented Apr 1, 2026

This PR introduces a new CLI command to update installed third-party plugins

New command
inkypi plugin update <plugin_id>

Behavior

  • Reads the repository URL from plugin-info.json of the installed plugin
  • Downloads the latest version of the plugin
  • Replaces the installed plugin files
  • Installs requirements if requirements.txt is present
  • Restarts the service after update

Why

Currently, the CLI only provides install, uninstall and list commands for third-party plugins. Updating a plugin requires re-running the install command manually. This PR adds a dedicated update command, making the workflow clearer and safer

Notes

  • The update process validates the new version before replacing the existing plugin, avoiding accidental deletion on failed downloads
  • The implementation follows the same approach as install, reusing the repository source stored in plugin metadata

Manual testing

  • Install a plugin using inkypi plugin install
  • Modify the plugin repository (e.g. change a label or text)
  • Run inkypi plugin update <plugin_id>
  • Confirm that changes are applied
  • Confirm that dependencies are installed if requirements.txt exists
  • Confirm that service restarts correctly

Copilot AI review requested due to automatic review settings April 1, 2026 03:11
Copy link
Copy Markdown

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

Adds a dedicated inkypi plugin update <plugin_id> command to the existing plugin CLI to update an installed third-party plugin from its recorded repository, reinstall dependencies when needed, and restart the service.

Changes:

  • Extended CLI help output to include plugin update.
  • Implemented update_plugin() to clone the plugin repo into a temp directory, stage validated files, replace the installed plugin, optionally install requirements.txt, and restart the service.
  • Wired the new update subcommand into the command router.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread install/cli/inkypi-plugin
Comment thread install/cli/inkypi-plugin
Comment thread install/cli/inkypi-plugin
Comment thread install/cli/inkypi-plugin
Comment thread install/cli/inkypi-plugin
Comment thread install/cli/inkypi-plugin Outdated
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