shell-plugins icon indicating copy to clipboard operation
shell-plugins copied to clipboard

New plugin: SpinupWP CLI

Open alexclst opened this issue 1 year ago • 0 comments

Platform or tool

SpinupWP

Relevant links

  • https://spinupwp.com/
  • https://spinupwp.com/doc/cli/

Goal or desired behavior

Authenticate the CLI using the token set up in your account.

Contribution

  • [X] I'd be up for building the plugin myself.

Additional information

I've built a shell plugin before (the Linode plugin). What is different about the SpinupWP CLI is that it seems to have no support for environment variables to get the token from (I have asked for this), so instead the CLI expects a file at ~/.spinupwp/config.json with contents like the following for authentication and configuration:

{
    "default": {
        "api_token": "<token>",
        "format": "table",
        "command_options": []
    }
}

Is this something that a shell plugin can handle? I've only ever written plugins that use environment variables, and though I know some of how secret references work do not know if something similar can be done as a shell plugin to enable shell plugins for CLIs that do not have environment variable options.

alexclst avatar Dec 02 '23 03:12 alexclst