@@ -91,6 +91,7 @@ async def start_local(
9191 dev_server_download_version : str = "default" ,
9292 dev_server_extra_args : Sequence [str ] = [],
9393 dev_server_download_ttl : timedelta | None = None ,
94+ ui_port : int | None = None ,
9495 ) -> WorkflowEnvironment :
9596 """Start a full Temporal server locally, downloading if necessary.
9697
@@ -149,6 +150,7 @@ async def start_local(
149150 dev_server_extra_args: Extra arguments for the CLI binary.
150151 dev_server_download_ttl: TTL for the downloaded CLI binary. If unset, it will be
151152 cached indefinitely.
153+ ui_port: UI port to use if UI is enabled.
152154
153155 Returns:
154156 The started CLI dev server workflow environment.
@@ -173,6 +175,7 @@ async def start_local(
173175 new_args .append (f"{ attr .name } ={ attr ._metadata_type } " )
174176 new_args += dev_server_extra_args
175177 dev_server_extra_args = new_args
178+
176179 # Start CLI dev server
177180 runtime = runtime or temporalio .runtime .Runtime .default ()
178181 download_ttl_ms = None
@@ -191,12 +194,14 @@ async def start_local(
191194 port = port ,
192195 database_filename = dev_server_database_filename ,
193196 ui = ui ,
197+ ui_port = ui_port ,
194198 log_format = dev_server_log_format ,
195199 log_level = dev_server_log_level ,
196200 extra_args = dev_server_extra_args ,
197201 download_ttl_ms = download_ttl_ms ,
198202 ),
199203 )
204+
200205 # If we can't connect to the server, we should shut it down
201206 try :
202207 return _EphemeralServerWorkflowEnvironment (
0 commit comments