LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
LangGraph SDK
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraph-cli

@langchain/langgraph-cli

Description

LangGraph.js CLI

The official command-line interface for LangGraph.js, providing tools to create, develop, and deploy LangGraph.js applications.

Installation

The @langchain/langgraph-cli is a CLI binary that can be run via npx or installed via your package manager of choice:

npx @langchain/langgraph-cli

Commands

langgraphjs dev

Run LangGraph.js API server in development mode with hot reloading.

npx @langchain/langgraph-cli dev

langgraphjs build

Build a Docker image for your LangGraph.js application.

npx @langchain/langgraph-cli build

langgraphjs up

Run LangGraph.js API server in Docker.

npx @langchain/langgraph-cli up

langgraphjs dockerfile

Generate a Dockerfile for custom deployments

npx @langchain/langgraph-cli dockerfile <save path>

Configuration

The CLI uses a langgraph.json configuration file with these key settings:

{
  // Required: Graph definitions
  graphs: {
    graph: "./src/graph.ts:graph",
  },

  // Optional: Node version (20 only at the moment)
  node_version: "20",

  // Optional: Environment variables
  env: ".env",

  // Optional: Additional Dockerfile commands
  dockerfile_lines: [],
}

See the full documentation for detailed configuration options.

Interfaces

Interface

ProcessEnv

Types

Type

AnyString