or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

cli-commands.mdconfiguration.mddocker-integration.mdindex.mdtemplates.md

index.mddocs/

0

# LangGraph CLI

1

2

A comprehensive command-line interface for LangGraph, providing tools to create, develop, and deploy LangGraph applications. The CLI enables complete development workflows from project scaffolding through Docker-based deployment, with configuration-driven development server capabilities and hot reloading support.

3

4

## Package Information

5

6

- **Package Name**: langgraph-cli

7

- **Package Type**: CLI tool

8

- **Language**: Python

9

- **Installation**: `pip install langgraph-cli`

10

- **Development Mode**: `pip install "langgraph-cli[inmem]"`

11

12

## Core Imports

13

14

```python

15

# The CLI is accessed via command line, not Python imports

16

# Main entry point is the 'langgraph' command

17

```

18

19

For programmatic access to configuration handling (requires `pip install langgraph-cli`):

20

21

```python

22

from langgraph_cli.config import Config, validate_config, validate_config_file

23

```

24

25

## Basic Usage

26

27

```bash

28

# Create a new project

29

langgraph new my-project --template react-agent-python

30

31

# Run development server with hot reloading

32

langgraph dev --port 2024 --config langgraph.json

33

34

# Launch production server with Docker

35

langgraph up --port 8123 --config langgraph.json

36

37

# Build Docker image for deployment

38

langgraph build --tag my-app:latest --config langgraph.json

39

40

# Generate deployment files

41

langgraph dockerfile ./Dockerfile --config langgraph.json

42

```

43

44

## Architecture

45

46

LangGraph CLI follows a configuration-driven architecture:

47

48

- **Configuration Schema**: Comprehensive TypedDict classes define all configuration options

49

- **Command System**: Click-based CLI with modular command organization

50

- **Docker Integration**: Automatic Dockerfile and Docker Compose generation

51

- **Template System**: Extensible project scaffolding with multiple pre-built templates

52

- **Development Server**: Hot reloading development environment with debugging support

53

54

The CLI bridges development and production workflows by providing unified configuration through `langgraph.json` files that drive both local development and production deployment.

55

56

## Capabilities

57

58

### CLI Commands

59

60

Core command-line interface for all LangGraph development and deployment workflows. Includes project creation, development server, production deployment, and Docker image building.

61

62

```bash { .api }

63

langgraph new [PATH] --template TEMPLATE_NAME

64

langgraph dev --host HOST --port PORT --config CONFIG

65

langgraph up --port PORT --config CONFIG --docker-compose COMPOSE_FILE

66

langgraph build --tag TAG --config CONFIG

67

langgraph dockerfile SAVE_PATH --config CONFIG

68

```

69

70

[CLI Commands](./cli-commands.md)

71

72

### Configuration Management

73

74

Comprehensive configuration system for defining project dependencies, graph definitions, environment variables, and deployment settings through typed configuration schemas.

75

76

```python { .api }

77

def validate_config(config: Config) -> Config: ...

78

def validate_config_file(config_path: pathlib.Path) -> Config: ...

79

def config_to_docker(...) -> tuple[str, dict[str, str]]: ...

80

def config_to_compose(...) -> str: ...

81

```

82

83

[Configuration](./configuration.md)

84

85

### Docker Integration

86

87

Automated Docker and Docker Compose file generation from configuration, supporting multi-platform builds, custom base images, and development/production workflows.

88

89

```python { .api }

90

def check_capabilities(runner) -> DockerCapabilities: ...

91

def compose(capabilities, ...) -> str: ...

92

def dict_to_yaml(d: dict, *, indent: int = 0) -> str: ...

93

```

94

95

[Docker Integration](./docker-integration.md)

96

97

### Template System

98

99

Project scaffolding system with multiple pre-built templates for common LangGraph patterns, enabling rapid project initialization with best practices.

100

101

```python { .api }

102

def create_new(path: Optional[str], template: Optional[str]) -> None: ...

103

```

104

105

Available templates:

106

- New LangGraph Project (minimal chatbot)

107

- ReAct Agent (extensible agent with tools)

108

- Memory Agent (cross-conversation memory)

109

- Retrieval Agent (RAG capabilities)

110

- Data-enrichment Agent (web search)

111

112

[Templates](./templates.md)

113

114

## Types

115

116

### Core Configuration Types

117

118

```python { .api }

119

class Config(TypedDict, total=False):

120

python_version: str

121

node_version: str

122

api_version: str

123

base_image: str

124

image_distro: Distros

125

dependencies: list[str]

126

graphs: dict[str, str]

127

env: Union[str, dict[str, str]]

128

dockerfile_lines: list[str]

129

pip_config_file: str

130

pip_installer: str

131

store: StoreConfig

132

auth: AuthConfig

133

http: HttpConfig

134

checkpointer: CheckpointerConfig

135

ui: dict[str, Any]

136

keep_pkg_tools: bool

137

```

138

139

### Store Configuration Types

140

141

```python { .api }

142

class StoreConfig(TypedDict, total=False):

143

index: IndexConfig

144

ttl: TTLConfig

145

146

class IndexConfig(TypedDict, total=False):

147

dims: int # Required

148

embed: str # Required

149

fields: Optional[list[str]]

150

151

class TTLConfig(TypedDict, total=False):

152

refresh_on_read: bool

153

default_ttl: Optional[float]

154

sweep_interval_minutes: Optional[int]

155

```

156

157

### Authentication and HTTP Types

158

159

```python { .api }

160

class AuthConfig(TypedDict, total=False):

161

path: str # Required

162

disable_studio_auth: bool

163

openapi: SecurityConfig

164

165

class HttpConfig(TypedDict, total=False):

166

app: str

167

disable_assistants: bool

168

disable_threads: bool

169

disable_runs: bool

170

disable_store: bool

171

disable_mcp: bool

172

disable_meta: bool

173

cors: CorsConfig

174

configurable_headers: ConfigurableHeaderConfig

175

logging_headers: ConfigurableHeaderConfig

176

177

class CheckpointerConfig(TypedDict, total=False):

178

ttl: ThreadTTLConfig

179

```

180

181

### Docker Integration Types

182

183

```python { .api }

184

class DockerCapabilities(NamedTuple):

185

docker: bool

186

compose: bool

187

buildx: bool

188

version: str

189

190

# Type aliases

191

Distros = Literal["debian", "wolfi", "bullseye", "bookworm"]

192

```

193

194

## Constants

195

196

```python { .api }

197

# Configuration defaults

198

DEFAULT_CONFIG = "langgraph.json"

199

DEFAULT_PORT = 8123

200

201

# Version constraints

202

MIN_PYTHON_VERSION = "3.11"

203

DEFAULT_PYTHON_VERSION = "3.11"

204

MIN_NODE_VERSION = "20"

205

DEFAULT_NODE_VERSION = "20"

206

DEFAULT_IMAGE_DISTRO = "debian"

207

208

# Package version (managed via version.py)

209

__version__ = "0.4.2"

210

```