@@ -86,6 +86,7 @@ type BrowserPoolsCreateInput struct {
8686 ProfileName string
8787 ProfileSaveChanges BoolFlag
8888 ProxyID string
89+ StartURL string
8990 Extensions []string
9091 Viewport string
9192 Output string
@@ -131,6 +132,9 @@ func (c BrowserPoolsCmd) Create(ctx context.Context, in BrowserPoolsCreateInput)
131132 if in .ProxyID != "" {
132133 params .ProxyID = kernel .String (in .ProxyID )
133134 }
135+ if in .StartURL != "" {
136+ params .StartURL = kernel .String (in .StartURL )
137+ }
134138
135139 params .Extensions = buildExtensionsParam (in .Extensions )
136140
@@ -196,6 +200,7 @@ func (c BrowserPoolsCmd) Get(ctx context.Context, in BrowserPoolsGetInput) error
196200 {"Kiosk Mode" , fmt .Sprintf ("%t" , cfg .KioskMode )},
197201 {"Profile" , formatProfile (cfg .Profile )},
198202 {"Proxy ID" , util .OrDash (cfg .ProxyID )},
203+ {"Start URL" , util .OrDash (cfg .StartURL )},
199204 {"Extensions" , formatExtensions (cfg .Extensions )},
200205 {"Viewport" , formatViewport (cfg .Viewport )},
201206 }
@@ -217,6 +222,7 @@ type BrowserPoolsUpdateInput struct {
217222 ProfileName string
218223 ProfileSaveChanges BoolFlag
219224 ProxyID string
225+ StartURL string
220226 Extensions []string
221227 Viewport string
222228 DiscardAllIdle BoolFlag
@@ -267,6 +273,9 @@ func (c BrowserPoolsCmd) Update(ctx context.Context, in BrowserPoolsUpdateInput)
267273 if in .ProxyID != "" {
268274 params .ProxyID = kernel .String (in .ProxyID )
269275 }
276+ if in .StartURL != "" {
277+ params .StartURL = kernel .String (in .StartURL )
278+ }
270279
271280 params .Extensions = buildExtensionsParam (in .Extensions )
272281
@@ -352,6 +361,9 @@ func (c BrowserPoolsCmd) Acquire(ctx context.Context, in BrowserPoolsAcquireInpu
352361 {"CDP WebSocket URL" , resp .CdpWsURL },
353362 {"Live View URL" , resp .BrowserLiveViewURL },
354363 }
364+ if resp .StartURL != "" {
365+ tableData = append (tableData , []string {"Start URL" , resp .StartURL })
366+ }
355367 PrintTableNoPad (tableData , true )
356368 return nil
357369}
@@ -472,6 +484,7 @@ func init() {
472484 browserPoolsCreateCmd .Flags ().String ("profile-name" , "" , "Profile name" )
473485 browserPoolsCreateCmd .Flags ().Bool ("save-changes" , false , "Save changes to profile" )
474486 browserPoolsCreateCmd .Flags ().String ("proxy-id" , "" , "Proxy ID" )
487+ browserPoolsCreateCmd .Flags ().String ("start-url" , "" , "Initial page to open for new browsers" )
475488 browserPoolsCreateCmd .Flags ().StringSlice ("extension" , []string {}, "Extension IDs or names" )
476489 browserPoolsCreateCmd .Flags ().String ("viewport" , "" , "Viewport size (e.g. 1280x800)" )
477490
@@ -488,6 +501,7 @@ func init() {
488501 browserPoolsUpdateCmd .Flags ().String ("profile-name" , "" , "Profile name" )
489502 browserPoolsUpdateCmd .Flags ().Bool ("save-changes" , false , "Save changes to profile" )
490503 browserPoolsUpdateCmd .Flags ().String ("proxy-id" , "" , "Proxy ID" )
504+ browserPoolsUpdateCmd .Flags ().String ("start-url" , "" , "Initial page to open for new browsers" )
491505 browserPoolsUpdateCmd .Flags ().StringSlice ("extension" , []string {}, "Extension IDs or names" )
492506 browserPoolsUpdateCmd .Flags ().String ("viewport" , "" , "Viewport size (e.g. 1280x800)" )
493507 browserPoolsUpdateCmd .Flags ().Bool ("discard-all-idle" , false , "Discard all idle browsers" )
@@ -539,6 +553,7 @@ func runBrowserPoolsCreate(cmd *cobra.Command, args []string) error {
539553 profileName , _ := cmd .Flags ().GetString ("profile-name" )
540554 saveChanges , _ := cmd .Flags ().GetBool ("save-changes" )
541555 proxyID , _ := cmd .Flags ().GetString ("proxy-id" )
556+ startURL , _ := cmd .Flags ().GetString ("start-url" )
542557 extensions , _ := cmd .Flags ().GetStringSlice ("extension" )
543558 viewport , _ := cmd .Flags ().GetString ("viewport" )
544559 output , _ := cmd .Flags ().GetString ("output" )
@@ -555,6 +570,7 @@ func runBrowserPoolsCreate(cmd *cobra.Command, args []string) error {
555570 ProfileName : profileName ,
556571 ProfileSaveChanges : BoolFlag {Set : cmd .Flags ().Changed ("save-changes" ), Value : saveChanges },
557572 ProxyID : proxyID ,
573+ StartURL : startURL ,
558574 Extensions : extensions ,
559575 Viewport : viewport ,
560576 Output : output ,
@@ -585,6 +601,7 @@ func runBrowserPoolsUpdate(cmd *cobra.Command, args []string) error {
585601 profileName , _ := cmd .Flags ().GetString ("profile-name" )
586602 saveChanges , _ := cmd .Flags ().GetBool ("save-changes" )
587603 proxyID , _ := cmd .Flags ().GetString ("proxy-id" )
604+ startURL , _ := cmd .Flags ().GetString ("start-url" )
588605 extensions , _ := cmd .Flags ().GetStringSlice ("extension" )
589606 viewport , _ := cmd .Flags ().GetString ("viewport" )
590607 discardIdle , _ := cmd .Flags ().GetBool ("discard-all-idle" )
@@ -603,6 +620,7 @@ func runBrowserPoolsUpdate(cmd *cobra.Command, args []string) error {
603620 ProfileName : profileName ,
604621 ProfileSaveChanges : BoolFlag {Set : cmd .Flags ().Changed ("save-changes" ), Value : saveChanges },
605622 ProxyID : proxyID ,
623+ StartURL : startURL ,
606624 Extensions : extensions ,
607625 Viewport : viewport ,
608626 DiscardAllIdle : BoolFlag {Set : cmd .Flags ().Changed ("discard-all-idle" ), Value : discardIdle },
0 commit comments