diff --git a/libs/cli/langgraph_cli/cli.py b/libs/cli/langgraph_cli/cli.py index 07c894fac..c304252b3 100644 --- a/libs/cli/langgraph_cli/cli.py +++ b/libs/cli/langgraph_cli/cli.py @@ -1,3 +1,4 @@ +import os import pathlib import shutil import sys @@ -598,6 +599,13 @@ def dev( ) from None config_json = langgraph_cli.config.validate_config_file(config) + cwd = os.getcwd() + sys.path.append(cwd) + dependencies = config_json.get("dependencies", []) + for dep in dependencies: + dep_path = pathlib.Path(cwd) / dep + if dep_path.is_dir() and dep_path.exists(): + sys.path.append(str(dep_path)) graphs = config_json.get("graphs", {}) run_server( diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index a271a073b..163bb4a31 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.1.58" +version = "0.1.59" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT"