diff --git a/cmd/add.go b/cmd/add.go index f6eb68e..f2a6d45 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -19,6 +19,11 @@ var addCmd = &cobra.Command{ Use: "add [profile]", Short: "Add a new profile to your configuration and keychain", Long: "", + Example: ` + Add a new profile (you will be prompted for credentials) + + $ cf-vault add example-profile +`, Args: func(cmd *cobra.Command, args []string) error { if len(args) < 1 { return errors.New("requires a profile argument") diff --git a/cmd/exec.go b/cmd/exec.go index d2c19b5..9a7c19b 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -20,6 +20,22 @@ var execCmd = &cobra.Command{ Use: "exec [profile]", Short: "Execute a command with Cloudflare credentials populated", Long: "", + Example: ` + Execute a single command with credentials populated + + $ cf-vault exec example-profile -- env | grep -i cloudflare + CLOUDFLARE_VAULT_SESSION=example-profile + CLOUDFLARE_EMAIL=jacob@example.com + CLOUDFLARE_API_KEY=s3cr3t + + Spawn a new shell with credentials populated + + $ cf-vault exec example-profile -- + $ env | grep -i cloudflare + CLOUDFLARE_VAULT_SESSION=example-profile + CLOUDFLARE_EMAIL=jacob@example.com + CLOUDFLARE_API_KEY=s3cr3t +`, Args: func(cmd *cobra.Command, args []string) error { if len(args) < 1 { return errors.New("requires a profile argument")