Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Online Plugin Manager #2

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

sean-e-dietrich
Copy link

Created modification that plugins could be added over on http://live-terminus-plugins.pantheonsite.io and from there they would be searchable.

terminus plugin search [plugin-name]

Using the following example. Partial plugin name is searched so whether you type term or terminus they will search to see if the package name contains the word. Similar to the linux package manager apt-get.

terminus plugin search term

This would be output

[2016-04-30 07:36:13] [notice] The following plugin were found:
+-----------------------------+-----------------------------+---------------------------------------------------------------------------------+-----------------------------------+
| Package                     | Title                       | Description                                                                     | Author                            |
+-----------------------------+-----------------------------+---------------------------------------------------------------------------------+-----------------------------------+
| terminus_filer              | Terminus Filer              | Filer - A Terminus plugin for SFTP Connections                                  | Sean Dietrich <[email protected]> |
| terminus_pancakes           | Terminus Pancakes           | Terminus Plugin to open Pantheon Site Databases in your Favorite SQL GUI Client | derimagia                         |
| terminus_plugin_example     | Terminus Plugin Example     | A simple plugin for Terminus to demonstrate how to add new commands             | Pantheon                          |
| terminus_quicksilver_plugin | Terminus Quicksilver Plugin | A Terminus plugin to help you get started quickly with Quicksilver              | Pantheon                          |
| terminus_secrets_plugin     | Terminus Secrets Plugin     | A simple secrets management plugin for Terminus                                 | Pantheon                          |
+-----------------------------+-----------------------------+---------------------------------------------------------------------------------+-----------------------------------+

Once I know the package name I can use the install option to install the remote package.

terminus plugin install terminus_filer

I can also use the remote git repository if the repo instead using the following

terminus plugin install https://github.com/sean-e-dietrich/terminus-filer.git

Most of the other functionality works as previously intended. I also knixed saving everything to a repo file.

@uberhacker
Copy link
Owner

Hey @sean-e-dietrich: Thank you for the effort to improve the search functionality. I like how you organized the search results in table format. I also really like the idea of an 'official' Terminus plugin registry. There are a few problems with this approach, however:

  1. There has been some discussion at Pantheon internally about removing search and discovery from TPM and incorporating the other functionality into Terminus core for the 1.0 release. This has led me to explore the possibility of making search a companion plugin to TPM so folks will still have the ability to search after the 1.0 release with a contributed plugin.
  2. Pantheon may standardize on using Composer to install plugins instead of cloning Git repos. This would require plugins to be added on Packagist instead of GitHub or some other Git repo. They're leaning this way because Composer can handle package dependencies and conflict resolution. You get all this for free by using Composer.
  3. How do you plan on populating plugins.json? This functionality is absolutely necessary so developers know where they should register new plugins.
  4. What is wrong with allowing more than one search argument? You can get more potential search results this way which is always a good thing.
  5. I'd like to keep the add argument in the Usage line since it's an alias for terminus plugin install

I'm going to strip out the search functionality from here into a separate companion plugin so Pantheon can eventually drop PluginCommand.php into Terminus core. You are welcome to add another search plugin that "competes" with mine but I imagine both of our methods will need a complete rewrite once Pantheon standardizes on using Composer to install plugins.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants