From efa51fe22cb80d9e33aa9b4d0703ce066b57be18 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Fri, 17 Jan 2025 20:23:37 +0100 Subject: [PATCH] Update README.md --- docs/docs/cloud/reference/cli.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/docs/cloud/reference/cli.md b/docs/docs/cloud/reference/cli.md index 78495d8e7..00396620e 100644 --- a/docs/docs/cloud/reference/cli.md +++ b/docs/docs/cloud/reference/cli.md @@ -18,9 +18,12 @@ The LangGraph command line interface includes commands to build and run a LangGr === "JS" ```bash npx @langchain/langgraph-cli + + # Install globally + npm install -g @langchain/langgraph-cli ``` -3. Run the command `langgraph --help` to confirm that the CLI is installed. +3. Run the command `langgraph --help` or `npx @langchain/langgraph-cli --help` to confirm that the CLI is working correctly. [](){#langgraph.json} @@ -55,7 +58,7 @@ The LangGraph CLI requires a JSON configuration file with the following keys: | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `graphs` | **Required**. Mapping from graph ID to path where the compiled graph or a function that makes a graph is defined. Example: | | `env` | Path to `.env` file or a mapping from environment variable to its value. | - | `store` | Configuration for adding semantic search to the BaseStore. Contains the following fields: | + | `store` | Configuration for adding semantic search to the BaseStore. Contains the following fields: | | `node_version` | Specify `node_version: 20` to use LangGraph.js. | | `dockerfile_lines` | Array of additional lines to add to Dockerfile following the import from parent image. | @@ -183,23 +186,23 @@ The LangGraph CLI requires a JSON configuration file with the following keys: ## Commands -The base command for the LangGraph CLI is `langgraph`. - **Usage** === "Python" + The base command for the LangGraph CLI is `langgraph`. + ``` langgraph [OPTIONS] COMMAND [ARGS] ``` === "JS" + The base command for the LangGraph.js CLI is `langgraphjs`. We recommend using `npx` to always use the latest version of the CLI. + ``` npx @langchain/langgraph-cli [OPTIONS] COMMAND [ARGS] ``` - We will be referring to `npx @langchain/langgraph-cli` as `langgraph` in the following commands. - ### `dev` === "Python" @@ -244,7 +247,7 @@ The base command for the LangGraph CLI is `langgraph`. **Usage** ``` - langgraph dev [OPTIONS] + npx @langchain/langgraph-cli dev [OPTIONS] ``` **Options** @@ -288,7 +291,7 @@ The base command for the LangGraph CLI is `langgraph`. **Usage** ``` - langgraph build [OPTIONS] + npx @langchain/langgraph-cli build [OPTIONS] ``` **Options** @@ -338,7 +341,7 @@ The base command for the LangGraph CLI is `langgraph`. **Usage** ``` - langgraph up [OPTIONS] + npx @langchain/langgraph-cli up [OPTIONS] ``` **Options** @@ -411,7 +414,7 @@ The base command for the LangGraph CLI is `langgraph`. **Usage** ``` - langgraph dockerfile [OPTIONS] SAVE_PATH + npx @langchain/langgraph-cli dockerfile [OPTIONS] SAVE_PATH ``` **Options**