diff --git a/plugins/aws/plugin.go b/plugins/aws/plugin.go index a19eeca1a..eb10ed753 100644 --- a/plugins/aws/plugin.go +++ b/plugins/aws/plugin.go @@ -18,6 +18,7 @@ func New() schema.Plugin { Executables: []schema.Executable{ AWSCLI(), AWSCDKToolkit(), + ServerlessCLI(), }, } } diff --git a/plugins/aws/serverless.go b/plugins/aws/serverless.go new file mode 100644 index 000000000..fbbce7689 --- /dev/null +++ b/plugins/aws/serverless.go @@ -0,0 +1,25 @@ +package aws + +import ( + "github.com/1Password/shell-plugins/sdk" + "github.com/1Password/shell-plugins/sdk/needsauth" + "github.com/1Password/shell-plugins/sdk/schema" + "github.com/1Password/shell-plugins/sdk/schema/credname" +) + +func ServerlessCLI() schema.Executable { + return schema.Executable{ + Name: "Serverless CLI", + Runs: []string{"serverless"}, + DocsURL: sdk.URL("https://www.serverless.com/framework/docs/getting-started"), + NeedsAuth: needsauth.IfAll( + needsauth.NotForHelpOrVersion(), + needsauth.NotWithoutArgs(), + ), + Uses: []schema.CredentialUsage{ + { + Name: credname.AccessKey, + }, + }, + } +}