Skip to content

Commit 0646cf6

Browse files
authored
Merge pull request Homebrew#195885 from hinthornw/wfh/add_langgraphcli
langgraph-cli 0.1.52 (new formula)
2 parents 8e40fc3 + 36ab4f2 commit 0646cf6

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

Formula/l/langgraph-cli.rb

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
class LanggraphCli < Formula
2+
include Language::Python::Virtualenv
3+
4+
desc "Command-line interface for deploying apps to the LangGraph platform"
5+
homepage "https://www.github.com/langchain-ai/langgraph"
6+
url "https://files.pythonhosted.org/packages/13/f4/e60c465ddc4d6fbfd6a9c002bbd491a747b4cbfa92db0e5c76245bfd5c97/langgraph_cli-0.1.52.tar.gz"
7+
sha256 "210eea115772df982408366b0aad06d226e6ea3752e8784c3ce99f388b2d07c9"
8+
license "MIT"
9+
10+
bottle do
11+
sha256 cellar: :any_skip_relocation, all: "0f1a7595670629ddfb8841df53da419f788c2423f81d72119a2e366f52a8fa7c"
12+
end
13+
14+
depends_on "[email protected]"
15+
16+
resource "click" do
17+
url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz"
18+
sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"
19+
end
20+
21+
def install
22+
virtualenv_install_with_resources
23+
end
24+
25+
test do
26+
(testpath/"graph.py").write <<~PYTHON
27+
from langgraph.graph import StateGraph
28+
builder = StateGraph(list)
29+
builder.add_node("anode", lambda x: ["foo"])
30+
builder.add_edge("__start__", "anode")
31+
graph = builder.compile()
32+
PYTHON
33+
34+
(testpath/"langgraph.json").write <<~JSON
35+
{
36+
"graphs": {
37+
"agent": "graph.py:graph"
38+
},
39+
"env": {},
40+
"dependencies": ["."]
41+
}
42+
JSON
43+
44+
system bin/"langgraph", "dockerfile", "DOCKERFILE"
45+
assert_path_exists "DOCKERFILE"
46+
dockerfile_content = File.read("DOCKERFILE")
47+
assert_match "FROM", dockerfile_content, "DOCKERFILE should contain 'FROM'"
48+
end
49+
end

0 commit comments

Comments
 (0)