OPT_CONFIG = click.option(
'--config',
'-c',
help='Path to configuration file declaring dependencies,
graphs and environment variables.\n\n \x08\n Config file must be a JSON file that has the following keys:\n - "dependencies": array of dependencies for langgraph API server. Dependencies can be one of the following:\n - ".",
which would look for local python packages,
as well as pyproject.toml,
setup.py or requirements.txt in the app directory\n - "./local_package"\n - "<package_name>\n - "graphs": mapping from graph ID to path where the compiled graph is defined,
i.e. ./your_package/your_file.py:variable,
where\n "variable" is an instance of langgraph.graph.graph.CompiledGraph\n - "env": (optional) path to .env file or a mapping from environment variable to its value\n - "python_version": (optional) 3.11,
3.12,
or 3.13. Defaults to 3.11\n - "pip_config_file": (optional) path to pip config file\n - "dockerfile_lines": (optional) array of additional lines to add to Dockerfile following the import from parent image\n\n \x08\n Example:\n langgraph up -c langgraph.json\n\n \x08\n Example:\n {\n "dependencies": [\n "langchain_openai",\n "./your_package"\n ],\n "graphs": {\n "my_graph_id": "./your_package/your_file.py:variable"\n },\n "env": "./.env"\n }\n\n \x08\n Example:\n {\n "python_version": "3.11",\n "dependencies": [\n "langchain_openai",\n "."\n ],\n "graphs": {\n "my_graph_id": "./your_package/your_file.py:variable"\n },\n "env": {\n "OPENAI_API_KEY": "secret-key"\n }\n }\n\n Defaults to looking for langgraph.json in the current directory.',
default=DEFAULT_CONFIG,
type=(click.Path(exists=True, file_okay=True, dir_okay=False, resolve_path=True, path_type=(pathlib.Path)))
)