langgraph-cli
INVOKE THIS SKILL when using the langgraph CLI to scaffold, develop, build, or deploy LangGraph applications. Covers langgraph new, dev, build, up, deploy, and langgraph.json configuration.
Security Assessment
Detected risks:
About langgraph-cli
Reference and operational guidance for the `langgraph` CLI, which manages the full lifecycle of LangGraph applications from scaffolding a new project to deploying it to LangGraph Platform (LangSmith Deployments). It is meant to be invoked when scaffolding, developing, building, or deploying LangGraph applications, or when understanding and editing the `langgraph.json` configuration that every command except `new` reads from the project root.
The CLI exposes a focused command set. `langgraph new` scaffolds a project from a template such as `agent-python` or `new-langgraph-project-js`. `langgraph dev` runs a local development server with hot reloading and no Docker, defaulting to localhost:2024, with flags for custom port, explicit config, disabling reload or the browser, binding to all interfaces, exposing a Cloudflare tunnel, and remote debugging. `langgraph build` builds a Docker image (the `-t` tag is required), `langgraph up` launches via Docker Compose including Postgres on default port 8123, and `langgraph deploy` builds and ships to LangGraph Platform, requiring Docker and, on Apple Silicon, Docker Buildx for cross-compiling to linux/amd64. Deploy subcommands cover list, delete, and logs, the latter supporting build versus runtime logs, follow streaming, level filtering, search, limits, and time ranges. `langgraph dockerfile` generates a Dockerfile and optionally Compose files without building.
Installation differs by ecosystem: Python uses `pip install 'langgraph-cli[inmem]'` (the inmem extra includes dev server support) or plain `langgraph-cli` for build, up, and deploy only, with equivalent `uv add` commands; JavaScript uses `npx @langchain/langgraph-cli` or a global npm install exposed as `langgraphjs`. The `langgraph.json` file is shared by dev, build, up, and deploy and requires `dependencies` (where `.` resolves local packages via pyproject.toml, setup.py, requirements.txt, or package.json) and `graphs` (a mapping of graph ID to a `file:variable` path that must be a CompiledGraph or a function returning one), plus optional keys such as `env`, `python_version`, `pip_config_file`, and `dockerfile_lines`. Deploying requires a LANGSMITH_API_KEY in the environment or `.env`.
FAQ
Which install option includes the local dev server?
The `[inmem]` extra. Use `pip install 'langgraph-cli[inmem]'` or `uv add "langgraph-cli[inmem]"`; installing plain `langgraph-cli` supports only build, up, and deploy.
Does langgraph dev require Docker?
No. `langgraph dev` runs a local development server with hot reloading and no Docker, defaulting to localhost:2024. Docker is needed for `build`, `up`, and `deploy`.
What keys are required in langgraph.json?
`dependencies` and `graphs` are required. `dependencies` lists packages (where `.` finds local packages via pyproject.toml, setup.py, requirements.txt, or package.json), and `graphs` maps a graph ID to a `file:variable` path that must be a CompiledGraph or a function returning one.
What is required to deploy to LangGraph Platform?
Docker is required, plus a LANGSMITH_API_KEY in the environment or `.env`. On Apple Silicon (M1/M2/M3), Docker Buildx is also required to cross-compile to linux/amd64.
How do I view build logs versus runtime logs for a deployment?
Use `langgraph deploy logs` for runtime logs (last 100 by default) and add `--type build` for build logs. The command also supports `-f` to follow, `--level` to filter, `-q` to search, `--limit`, and `--start-time`.
Install langgraph-cli
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
langchain-ai/langchain-skills