diff --git a/internal/cmd/decode/decode.go b/internal/cmd/decode/decode.go index 3c9f490..b19238a 100644 --- a/internal/cmd/decode/decode.go +++ b/internal/cmd/decode/decode.go @@ -14,10 +14,11 @@ import ( func Decode() *cobra.Command { command := &cobra.Command{ - Use: "decode", - Short: "decode jwt token", - Long: "decode jwt token", - Run: decode, + Use: "decode", + Short: "decode jwt token", + Long: "decode jwt token", + Example: "jwt decode ", + Run: decode, } return command diff --git a/internal/cmd/encode/encode.go b/internal/cmd/encode/encode.go index a3edc4a..f5c4922 100644 --- a/internal/cmd/encode/encode.go +++ b/internal/cmd/encode/encode.go @@ -14,10 +14,10 @@ import ( func Encode() *cobra.Command { root := &cobra.Command{ //nolint:exhaustivestruct - Use: "encode", - Short: "Create JWT Token", - Long: "Create JWT Token", - Run: main, + Use: "encode", + Short: "Create JWT Token", + Example: `jwt encode -e 2h -s finance -i "jwt-cli" -a people -A RS512`, + Run: main, } root.Flags().StringP("expiration", "e", "1h", "token expires after how long") root.Flags().StringP("subject", "s", "", "token subject")