Skip to content

CLI Should Allow Environment Variable for API Key #56

@alexclst

Description

@alexclst

Current Outcome

As far as I can tell the only place the API key comes from is the file generated by the configure command. Is this true? If there is an environment variable we can use already I cannot find it documented anywhere.

Desired Outcome

Ideally the SpinupWP CLI would also support looking for the API key from an environment variable, not just the config.json file. This would enable us to not need to store the API key on our filesystems at all. This has numerous potential security benefits to it.

For example, 1Password shell plugins generally function by dynamically filling environment variables from vault items. I would rather make a 1Password shell plugin for SpinupWP than have my API key just sitting in a plaintext file on my filesystem. But in order to do this, as far as I understand it, the CLI needs to have an environment variable option for providing the API key.

Related

  • 1Password Shell Plugins (once there is an environment variable I can test it, then write the plugin myself and submit it to 1Password)

Acceptance Criteria

  • API key would be checked for not only in the config.json file, but also from an environment variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: New FeatureAdds new functionality that makes something possible to achieve where it wasn't before

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions