mirror of
https://github.com/langchain-ai/langgraphjs-api.git
synced 2026-07-21 00:35:21 -04:00
e324c4e1ce0bea55a907c565b97ebc3dd97aa74b
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
langgraph dev
Run LangGraph.js API server in development mode with hot reloading.
langgraph dev
langgraph build
Build a Docker image for your LangGraph.js application.
langgraph build
langgraph up
Run LangGraph.js API server in Docker.
langgraph up
langgraph dockerfile
Generate a Dockerfile for custom deployments
langgraph dockerfile <save path>
Configuration
The CLI uses a langgraph.json configuration file with these key settings:
{
"graphs": {
"graph": "./src/graph.ts:graph" // Required: Graph definitions
},
"node_version": "20", // Optional: Node version (20 only at the moment)
"env": ".env", // Optional: Environment variables
"dockerfile_lines": [] // Optional: Additional Dockerfile commands
}
See the full documentation for detailed configuration options.
Description
Languages
TypeScript
98.1%
JavaScript
1.1%
Python
0.8%