From 7eb8f34e7aa54beea87bdfe1449c5d6aa04b6412 Mon Sep 17 00:00:00 2001 From: hari-dhanushkodi Date: Thu, 5 Mar 2026 18:57:28 -0500 Subject: [PATCH] use click for deployment name --- libs/cli/langgraph_cli/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/cli/langgraph_cli/cli.py b/libs/cli/langgraph_cli/cli.py index a04e418e4..4eeb01221 100644 --- a/libs/cli/langgraph_cli/cli.py +++ b/libs/cli/langgraph_cli/cli.py @@ -579,6 +579,7 @@ def build( ) @click.option( "--name", + envvar="LANGSMITH_DEPLOYMENT_NAME", help=( "Deployment name. Can also be set via LANGSMITH_DEPLOYMENT_NAME " "environment variable or .env file. Defaults to current directory name " @@ -678,7 +679,7 @@ def deploy( api_key = click.prompt("Host API key", hide_input=True) if not deployment_id and not name: - name = env_vars.get(_DEPLOYMENT_NAME_ENV) or os.environ.get(_DEPLOYMENT_NAME_ENV) + name = env_vars.get(_DEPLOYMENT_NAME_ENV) if not deployment_id and not name: default_name = _normalize_image_name(pathlib.Path.cwd().name) name = click.prompt("Deployment name", default=default_name)