1Password / shell-plugins

Seamless authentication for every tool in your terminal.
https://developer.1password.com/docs/cli/shell-plugins/
MIT License
507 stars 163 forks source link

New plugin: SpinupWP CLI #409

Open alexclst opened 7 months ago

alexclst commented 7 months ago

Platform or tool

SpinupWP

Relevant links

Goal or desired behavior

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

Contribution

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.