@@ -22,6 +22,7 @@ import (
22
22
23
23
"github.com/auth0/auth0-cli/internal/ansi"
24
24
"github.com/auth0/auth0-cli/internal/auth0"
25
+ "github.com/auth0/auth0-cli/internal/iostream"
25
26
"github.com/auth0/auth0-cli/internal/prompt"
26
27
)
27
28
@@ -136,7 +137,9 @@ func updateBrandingTemplateCmd(cli *cli) *cobra.Command {
136
137
Short : "Update the custom template for Universal Login" ,
137
138
Long : "Update the custom template for the New Universal Login Experience." ,
138
139
Example : ` auth0 universal-login templates update
139
- auth0 ul templates update` ,
140
+ auth0 ul templates update
141
+ cat login.liquid | auth0 ul templates update
142
+ echo "<html>{%- auth0:head -%}{%- auth0:widget -%}</html>" | auth0 ul templates update` ,
140
143
RunE : func (cmd * cobra.Command , args []string ) error {
141
144
ctx := cmd .Context ()
142
145
@@ -161,6 +164,11 @@ func updateBrandingTemplateCmd(cli *cli) *cobra.Command {
161
164
templateData .Body = templateOptions .getValue (templateData .Body )
162
165
}
163
166
167
+ pipedTemplateHTML := iostream .PipedInput ()
168
+ if len (pipedTemplateHTML ) > 0 {
169
+ templateData .Body = string (pipedTemplateHTML )
170
+ }
171
+
164
172
if err := cli .editTemplateAndPreviewChanges (ctx , cmd , templateData ); err != nil {
165
173
return fmt .Errorf ("failed to edit the template and preview the changes: %w" , err )
166
174
}
0 commit comments