graphsmith 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graphsmith-0.1.0/LICENSE +21 -0
- graphsmith-0.1.0/MANIFEST.in +3 -0
- graphsmith-0.1.0/PKG-INFO +122 -0
- graphsmith-0.1.0/README.md +69 -0
- graphsmith-0.1.0/graphsmith/__init__.py +5 -0
- graphsmith-0.1.0/graphsmith/cli/__init__.py +1 -0
- graphsmith-0.1.0/graphsmith/cli/main.py +89 -0
- graphsmith-0.1.0/graphsmith/core/__init__.py +1 -0
- graphsmith-0.1.0/graphsmith/core/generator.py +141 -0
- graphsmith-0.1.0/graphsmith/core/prompts.py +34 -0
- graphsmith-0.1.0/graphsmith/core/template_engine.py +28 -0
- graphsmith-0.1.0/graphsmith/templates/basic/.env +1 -0
- graphsmith-0.1.0/graphsmith/templates/basic/README.md +16 -0
- graphsmith-0.1.0/graphsmith/templates/basic/__pycache__/config.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/basic/__pycache__/graph.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/basic/__pycache__/main.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/basic/__pycache__/nodes.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/basic/__pycache__/state.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/basic/config.py +1 -0
- graphsmith-0.1.0/graphsmith/templates/basic/graph.py +19 -0
- graphsmith-0.1.0/graphsmith/templates/basic/main.py +17 -0
- graphsmith-0.1.0/graphsmith/templates/basic/nodes.py +13 -0
- graphsmith-0.1.0/graphsmith/templates/basic/requirements.txt +5 -0
- graphsmith-0.1.0/graphsmith/templates/basic/state.py +9 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/.env +1 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/README.md +16 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/__pycache__/config.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/__pycache__/graph.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/__pycache__/main.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/__pycache__/state.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/agents/__pycache__/agent_placeholder.cpython-312.pyc +0 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/agents/agent_placeholder.py +1 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/config.py +1 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/graph.py +1 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/main.py +17 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/requirements.txt +5 -0
- graphsmith-0.1.0/graphsmith/templates/multi_agent/state.py +9 -0
- graphsmith-0.1.0/graphsmith/utils/__init__.py +1 -0
- graphsmith-0.1.0/graphsmith/utils/file_utils.py +21 -0
- graphsmith-0.1.0/graphsmith.egg-info/PKG-INFO +122 -0
- graphsmith-0.1.0/graphsmith.egg-info/SOURCES.txt +45 -0
- graphsmith-0.1.0/graphsmith.egg-info/dependency_links.txt +1 -0
- graphsmith-0.1.0/graphsmith.egg-info/entry_points.txt +2 -0
- graphsmith-0.1.0/graphsmith.egg-info/requires.txt +7 -0
- graphsmith-0.1.0/graphsmith.egg-info/top_level.txt +1 -0
- graphsmith-0.1.0/pyproject.toml +56 -0
- graphsmith-0.1.0/setup.cfg +4 -0
graphsmith-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: graphsmith
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI tool for scaffolding LangGraph applications.
|
|
5
|
+
Author: OpenAI
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://pypi.org/project/graphsmith/
|
|
29
|
+
Project-URL: Repository, https://github.com/your-username/graphsmith
|
|
30
|
+
Project-URL: Issues, https://github.com/your-username/graphsmith/issues
|
|
31
|
+
Keywords: langgraph,langchain,cli,scaffold,templates
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
42
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
43
|
+
Requires-Python: >=3.9
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
License-File: LICENSE
|
|
46
|
+
Requires-Dist: langgraph
|
|
47
|
+
Requires-Dist: langchain
|
|
48
|
+
Requires-Dist: python-dotenv
|
|
49
|
+
Provides-Extra: dev
|
|
50
|
+
Requires-Dist: build>=1.2.1; extra == "dev"
|
|
51
|
+
Requires-Dist: twine>=5.1.1; extra == "dev"
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
# graphsmith
|
|
55
|
+
|
|
56
|
+
`graphsmith` is a Python command-line tool that scaffolds LangGraph applications.
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Install from PyPI:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install graphsmith
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
Create a basic project:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
graphsmith create my_app --template basic --llm openai
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Create a multi-agent project with three sequential agents:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
graphsmith create my_app --template multi_agent --agents 3 --llm openai
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use Ollama instead of OpenAI:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
graphsmith create my_app --template basic --llm ollama
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Generated project customization
|
|
91
|
+
|
|
92
|
+
- Edit `config.py` to change the model name or provider configuration.
|
|
93
|
+
- Update `.env` with your API key or Ollama model settings.
|
|
94
|
+
- Modify `nodes.py` or files in `agents/` to add your application logic.
|
|
95
|
+
- Extend `graph.py` to add routing, tools, or more complex workflows.
|
|
96
|
+
|
|
97
|
+
## Build and upload to PyPI
|
|
98
|
+
|
|
99
|
+
Build the distribution files:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
python -m pip install --upgrade build twine
|
|
103
|
+
python -m build
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Validate the package metadata:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
python -m twine check dist/*
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Upload to TestPyPI:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
python -m twine upload --repository testpypi dist/*
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Upload to PyPI:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
python -m twine upload dist/*
|
|
122
|
+
```
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# graphsmith
|
|
2
|
+
|
|
3
|
+
`graphsmith` is a Python command-line tool that scaffolds LangGraph applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install .
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Install from PyPI:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install graphsmith
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Create a basic project:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
graphsmith create my_app --template basic --llm openai
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Create a multi-agent project with three sequential agents:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
graphsmith create my_app --template multi_agent --agents 3 --llm openai
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use Ollama instead of OpenAI:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
graphsmith create my_app --template basic --llm ollama
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Generated project customization
|
|
38
|
+
|
|
39
|
+
- Edit `config.py` to change the model name or provider configuration.
|
|
40
|
+
- Update `.env` with your API key or Ollama model settings.
|
|
41
|
+
- Modify `nodes.py` or files in `agents/` to add your application logic.
|
|
42
|
+
- Extend `graph.py` to add routing, tools, or more complex workflows.
|
|
43
|
+
|
|
44
|
+
## Build and upload to PyPI
|
|
45
|
+
|
|
46
|
+
Build the distribution files:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python -m pip install --upgrade build twine
|
|
50
|
+
python -m build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Validate the package metadata:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -m twine check dist/*
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Upload to TestPyPI:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
python -m twine upload --repository testpypi dist/*
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Upload to PyPI:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python -m twine upload dist/*
|
|
69
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""CLI package for graphsmith."""
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""Command-line entry point for graphsmith."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
|
|
7
|
+
from graphsmith.core.generator import create_project
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
11
|
+
parser = argparse.ArgumentParser(
|
|
12
|
+
prog="graphsmith",
|
|
13
|
+
description="Scaffold LangGraph applications.",
|
|
14
|
+
)
|
|
15
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
16
|
+
|
|
17
|
+
create_parser = subparsers.add_parser(
|
|
18
|
+
"create",
|
|
19
|
+
help="Create a new LangGraph project.",
|
|
20
|
+
)
|
|
21
|
+
create_parser.add_argument("project_name", help="Name of the project directory.")
|
|
22
|
+
create_parser.add_argument(
|
|
23
|
+
"template_alias",
|
|
24
|
+
nargs="?",
|
|
25
|
+
choices=("basic", "agent", "multi_agent"),
|
|
26
|
+
help="Optional shorthand template selector. Use 'agent' as an alias for 'multi_agent'.",
|
|
27
|
+
)
|
|
28
|
+
create_parser.add_argument(
|
|
29
|
+
"agent_count_alias",
|
|
30
|
+
nargs="?",
|
|
31
|
+
type=int,
|
|
32
|
+
help="Optional shorthand agent count when using the positional 'agent' template alias.",
|
|
33
|
+
)
|
|
34
|
+
create_parser.add_argument(
|
|
35
|
+
"--template",
|
|
36
|
+
choices=("basic", "multi_agent"),
|
|
37
|
+
default="basic",
|
|
38
|
+
help="Template to use for scaffolding.",
|
|
39
|
+
)
|
|
40
|
+
create_parser.add_argument(
|
|
41
|
+
"--agents",
|
|
42
|
+
type=int,
|
|
43
|
+
default=2,
|
|
44
|
+
help="Number of agents for the multi_agent template.",
|
|
45
|
+
)
|
|
46
|
+
create_parser.add_argument(
|
|
47
|
+
"--llm",
|
|
48
|
+
choices=("openai", "ollama"),
|
|
49
|
+
default="openai",
|
|
50
|
+
help="LLM provider for the generated project.",
|
|
51
|
+
)
|
|
52
|
+
return parser
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _normalize_create_args(args: argparse.Namespace, parser: argparse.ArgumentParser) -> None:
|
|
56
|
+
if not args.template_alias:
|
|
57
|
+
return
|
|
58
|
+
|
|
59
|
+
alias_template = "multi_agent" if args.template_alias == "agent" else args.template_alias
|
|
60
|
+
|
|
61
|
+
if args.template != "basic" and args.template != alias_template:
|
|
62
|
+
parser.error("Do not mix positional template shorthand with a different --template value.")
|
|
63
|
+
|
|
64
|
+
args.template = alias_template
|
|
65
|
+
|
|
66
|
+
if args.agent_count_alias is not None:
|
|
67
|
+
if alias_template != "multi_agent":
|
|
68
|
+
parser.error("A positional agent count is only valid with the 'agent' or 'multi_agent' template.")
|
|
69
|
+
if args.agents != 2 and args.agents != args.agent_count_alias:
|
|
70
|
+
parser.error("Do not mix positional agent count with a different --agents value.")
|
|
71
|
+
args.agents = args.agent_count_alias
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def main() -> None:
|
|
75
|
+
parser = build_parser()
|
|
76
|
+
args = parser.parse_args()
|
|
77
|
+
|
|
78
|
+
if args.command == "create":
|
|
79
|
+
_normalize_create_args(args, parser)
|
|
80
|
+
create_project(
|
|
81
|
+
project_name=args.project_name,
|
|
82
|
+
template_name=args.template,
|
|
83
|
+
llm_provider=args.llm,
|
|
84
|
+
agent_count=args.agents,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
if __name__ == "__main__":
|
|
89
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Core functionality for graphsmith."""
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"""Project generation logic for graphsmith."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from importlib import resources
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from graphsmith.core.prompts import LLM_CONFIG
|
|
9
|
+
from graphsmith.core.template_engine import render_text, should_render
|
|
10
|
+
from graphsmith.utils.file_utils import copy_directory, remove_path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def create_project(
|
|
14
|
+
project_name: str,
|
|
15
|
+
template_name: str = "basic",
|
|
16
|
+
llm_provider: str = "openai",
|
|
17
|
+
agent_count: int = 2,
|
|
18
|
+
) -> None:
|
|
19
|
+
if template_name == "multi_agent" and agent_count < 1:
|
|
20
|
+
raise ValueError("--agents must be at least 1 for the multi_agent template.")
|
|
21
|
+
|
|
22
|
+
if llm_provider not in LLM_CONFIG:
|
|
23
|
+
raise ValueError(f"Unsupported llm provider: {llm_provider}")
|
|
24
|
+
|
|
25
|
+
destination = Path(project_name).resolve()
|
|
26
|
+
if destination.exists():
|
|
27
|
+
raise FileExistsError(f"Destination already exists: {destination}")
|
|
28
|
+
|
|
29
|
+
template_ref = resources.files("graphsmith").joinpath("templates", template_name)
|
|
30
|
+
with resources.as_file(template_ref) as template_root:
|
|
31
|
+
copy_directory(Path(template_root), destination)
|
|
32
|
+
|
|
33
|
+
replacements = _build_replacements(
|
|
34
|
+
project_name=project_name,
|
|
35
|
+
template_name=template_name,
|
|
36
|
+
llm_provider=llm_provider,
|
|
37
|
+
agent_count=agent_count,
|
|
38
|
+
)
|
|
39
|
+
_render_project_files(destination, replacements)
|
|
40
|
+
_write_provider_files(destination, llm_provider)
|
|
41
|
+
|
|
42
|
+
if template_name == "multi_agent":
|
|
43
|
+
_generate_multi_agent_files(destination, llm_provider, agent_count)
|
|
44
|
+
|
|
45
|
+
print(
|
|
46
|
+
f"Project '{project_name}' created successfully using the "
|
|
47
|
+
f"'{template_name}' template with '{llm_provider}'."
|
|
48
|
+
)
|
|
49
|
+
def _build_replacements(
|
|
50
|
+
project_name: str,
|
|
51
|
+
template_name: str,
|
|
52
|
+
llm_provider: str,
|
|
53
|
+
agent_count: int,
|
|
54
|
+
) -> dict[str, str]:
|
|
55
|
+
llm_settings = LLM_CONFIG[llm_provider]
|
|
56
|
+
return {
|
|
57
|
+
"PROJECT_NAME": project_name,
|
|
58
|
+
"TEMPLATE_NAME": template_name,
|
|
59
|
+
"LLM_PROVIDER": llm_provider,
|
|
60
|
+
"LLM_IMPORT": llm_settings["import_line"],
|
|
61
|
+
"MODEL_CLASS": llm_settings["model_class"],
|
|
62
|
+
"DEFAULT_MODEL": llm_settings["default_model"],
|
|
63
|
+
"ENV_CONTENT": "\n".join(llm_settings["env_lines"]),
|
|
64
|
+
"AGENT_COUNT": str(agent_count),
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _render_project_files(project_dir: Path, replacements: dict[str, str]) -> None:
|
|
69
|
+
for path in project_dir.rglob("*"):
|
|
70
|
+
if path.is_file() and should_render(path):
|
|
71
|
+
content = path.read_text(encoding="utf-8")
|
|
72
|
+
path.write_text(render_text(content, replacements), encoding="utf-8")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _generate_multi_agent_files(
|
|
76
|
+
project_dir: Path,
|
|
77
|
+
llm_provider: str,
|
|
78
|
+
agent_count: int,
|
|
79
|
+
) -> None:
|
|
80
|
+
agents_dir = project_dir / "agents"
|
|
81
|
+
placeholder = agents_dir / "agent_placeholder.py"
|
|
82
|
+
remove_path(placeholder)
|
|
83
|
+
|
|
84
|
+
init_file = agents_dir / "__init__.py"
|
|
85
|
+
init_file.write_text('"""Generated agent modules."""\n', encoding="utf-8")
|
|
86
|
+
|
|
87
|
+
for index in range(1, agent_count + 1):
|
|
88
|
+
agent_file = agents_dir / f"agent_{index}.py"
|
|
89
|
+
agent_file.write_text(_agent_module_content(index), encoding="utf-8")
|
|
90
|
+
|
|
91
|
+
graph_file = project_dir / "graph.py"
|
|
92
|
+
graph_file.write_text(_multi_agent_graph_content(agent_count), encoding="utf-8")
|
|
93
|
+
|
|
94
|
+
readme_file = project_dir / "README.md"
|
|
95
|
+
readme_file.write_text(_multi_agent_readme_content(agent_count), encoding="utf-8")
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def _write_provider_files(project_dir: Path, llm_provider: str) -> None:
|
|
99
|
+
config_file = project_dir / "config.py"
|
|
100
|
+
config_file.write_text(_config_content(llm_provider), encoding="utf-8")
|
|
101
|
+
|
|
102
|
+
env_file = project_dir / ".env"
|
|
103
|
+
env_file.write_text(_env_content(llm_provider), encoding="utf-8")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _agent_module_content(index: int) -> str:
|
|
107
|
+
return f'''"""Agent {index} implementation."""\n\nfrom __future__ import annotations\n\nfrom config import get_model\nfrom state import GraphState\n\n\ndef agent_{index}(state: GraphState) -> GraphState:\n model = get_model()\n message = state["message"]\n response = model.invoke(\n f"Agent {index} received this message: {{message}}\\nImprove it and return the updated text."\n )\n content = getattr(response, "content", response)\n return {{"message": str(content)}}\n'''
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _multi_agent_graph_content(agent_count: int) -> str:
|
|
111
|
+
import_lines = "\n".join(
|
|
112
|
+
f"from agents.agent_{index} import agent_{index}" for index in range(1, agent_count + 1)
|
|
113
|
+
)
|
|
114
|
+
node_lines = "\n".join(
|
|
115
|
+
f' workflow.add_node("agent_{index}", agent_{index})' for index in range(1, agent_count + 1)
|
|
116
|
+
)
|
|
117
|
+
edge_block = ' workflow.add_edge(START, "agent_1")'
|
|
118
|
+
|
|
119
|
+
for index in range(1, agent_count):
|
|
120
|
+
edge_block += f'\n workflow.add_edge("agent_{index}", "agent_{index + 1}")'
|
|
121
|
+
edge_block += f'\n workflow.add_edge("agent_{agent_count}", END)'
|
|
122
|
+
|
|
123
|
+
return f'''"""Sequential multi-agent graph definition."""\n\nfrom __future__ import annotations\n\nfrom langgraph.graph import END, START, StateGraph\n\nfrom state import GraphState\n{import_lines}\n\n\ndef build_graph():\n workflow = StateGraph(GraphState)\n{node_lines}\n{edge_block}\n return workflow.compile()\n\n\ngraph = build_graph()\n'''
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _config_content(llm_provider: str) -> str:
|
|
127
|
+
llm_settings = LLM_CONFIG[llm_provider]
|
|
128
|
+
if llm_provider == "openai":
|
|
129
|
+
model_args = 'api_key=os.getenv("OPENAI_API_KEY"), model=os.getenv("OPENAI_MODEL", "gpt-4o-mini")'
|
|
130
|
+
else:
|
|
131
|
+
model_args = 'base_url=os.getenv("OLLAMA_BASE_URL", "http://localhost:11434"), model=os.getenv("OLLAMA_MODEL", "llama3.1")'
|
|
132
|
+
|
|
133
|
+
return f'''"""LLM configuration for the generated project."""\n\nfrom __future__ import annotations\n\nimport os\n\nfrom dotenv import load_dotenv\n\n{llm_settings["import_line"]}\n\nload_dotenv()\n\n\ndef get_model():\n return {llm_settings["model_class"]}({model_args})\n'''
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def _env_content(llm_provider: str) -> str:
|
|
137
|
+
return "\n".join(LLM_CONFIG[llm_provider]["env_lines"]) + "\n"
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def _multi_agent_readme_content(agent_count: int) -> str:
|
|
141
|
+
return f"""# Multi-Agent LangGraph App\n\nThis project was generated with `graphsmith`.\n\n## Run\n\n```bash\npip install -r requirements.txt\npython main.py\n```\n\n## Customize\n\n- Edit `agents/agent_*.py` to change each agent's behavior.\n- Update `config.py` and `.env` to change the model configuration.\n- Extend `graph.py` if you want to add routing or branching.\n\nThis scaffold currently includes {agent_count} sequential agents.\n"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Prompt and provider configuration data for generated projects."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
LLM_CONFIG = {
|
|
6
|
+
"openai": {
|
|
7
|
+
"import_line": "from langchain_openai import ChatOpenAI",
|
|
8
|
+
"model_class": "ChatOpenAI",
|
|
9
|
+
"env_lines": [
|
|
10
|
+
"OPENAI_API_KEY=your_openai_api_key_here",
|
|
11
|
+
"OPENAI_MODEL=gpt-4o-mini",
|
|
12
|
+
],
|
|
13
|
+
"default_model": "gpt-4o-mini",
|
|
14
|
+
},
|
|
15
|
+
"ollama": {
|
|
16
|
+
"import_line": "from langchain_ollama import OllamaLLM",
|
|
17
|
+
"model_class": "OllamaLLM",
|
|
18
|
+
"env_lines": [
|
|
19
|
+
"OLLAMA_BASE_URL=http://localhost:11434",
|
|
20
|
+
"OLLAMA_MODEL=llama3.1",
|
|
21
|
+
],
|
|
22
|
+
"default_model": "llama3.1",
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
BASIC_SYSTEM_PROMPT = (
|
|
27
|
+
"You are a helpful AI assistant built with LangGraph. "
|
|
28
|
+
"Answer clearly and concisely."
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
MULTI_AGENT_SYSTEM_PROMPT = (
|
|
32
|
+
"You are one step in a sequential multi-agent LangGraph workflow. "
|
|
33
|
+
"Improve the shared message before passing it along."
|
|
34
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Small templating helper for bundled project files."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
TEXT_FILE_NAMES = {
|
|
9
|
+
".env",
|
|
10
|
+
"README.md",
|
|
11
|
+
"requirements.txt",
|
|
12
|
+
"config.py",
|
|
13
|
+
"graph.py",
|
|
14
|
+
"main.py",
|
|
15
|
+
"nodes.py",
|
|
16
|
+
"state.py",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def should_render(path: Path) -> bool:
|
|
21
|
+
return path.name in TEXT_FILE_NAMES or path.suffix in {".py", ".md", ".txt"}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def render_text(content: str, replacements: dict[str, str]) -> str:
|
|
25
|
+
rendered = content
|
|
26
|
+
for key, value in replacements.items():
|
|
27
|
+
rendered = rendered.replace(f"{{{{{key}}}}}", value)
|
|
28
|
+
return rendered
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ENV_CONTENT}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
This project was generated with the `{{TEMPLATE_NAME}}` template.
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install -r requirements.txt
|
|
9
|
+
python main.py
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Customize
|
|
13
|
+
|
|
14
|
+
- Update `nodes.py` to change the graph behavior.
|
|
15
|
+
- Edit `config.py` and `.env` to switch models or providers.
|
|
16
|
+
- Expand `graph.py` with more nodes and edges as needed.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""This file will be replaced with the chosen LLM configuration."""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Graph definition for the generated basic template."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from langgraph.graph import END, START, StateGraph
|
|
6
|
+
|
|
7
|
+
from nodes import call_model
|
|
8
|
+
from state import GraphState
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def build_graph():
|
|
12
|
+
workflow = StateGraph(GraphState)
|
|
13
|
+
workflow.add_node("call_model", call_model)
|
|
14
|
+
workflow.add_edge(START, "call_model")
|
|
15
|
+
workflow.add_edge("call_model", END)
|
|
16
|
+
return workflow.compile()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
graph = build_graph()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Entry point for the generated basic LangGraph app."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dotenv import load_dotenv
|
|
6
|
+
|
|
7
|
+
from graph import graph
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main() -> None:
|
|
11
|
+
load_dotenv()
|
|
12
|
+
result = graph.invoke({"message": "Write a short hello from {{PROJECT_NAME}}."})
|
|
13
|
+
print(result["message"])
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
if __name__ == "__main__":
|
|
17
|
+
main()
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Node implementations for the generated basic template."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from config import get_model
|
|
6
|
+
from state import GraphState
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def call_model(state: GraphState) -> GraphState:
|
|
10
|
+
model = get_model()
|
|
11
|
+
response = model.invoke(state["message"])
|
|
12
|
+
content = getattr(response, "content", response)
|
|
13
|
+
return {"message": str(content)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ENV_CONTENT}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
This project was generated with the `{{TEMPLATE_NAME}}` template.
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install -r requirements.txt
|
|
9
|
+
python main.py
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Customize
|
|
13
|
+
|
|
14
|
+
- Edit files in `agents/` to define each agent's behavior.
|
|
15
|
+
- Update `config.py` and `.env` to change the model configuration.
|
|
16
|
+
- Adjust `graph.py` if you want a different agent flow.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Placeholder file removed during project generation."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""This file will be replaced with the chosen LLM configuration."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""This file will be replaced with generated agent wiring."""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Entry point for the generated multi-agent LangGraph app."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dotenv import load_dotenv
|
|
6
|
+
|
|
7
|
+
from graph import graph
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main() -> None:
|
|
11
|
+
load_dotenv()
|
|
12
|
+
result = graph.invoke({"message": "Start a multi-agent workflow for {{PROJECT_NAME}}."})
|
|
13
|
+
print(result["message"])
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
if __name__ == "__main__":
|
|
17
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Utility helpers for graphsmith."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Filesystem helpers for project generation."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import shutil
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def ensure_directory(path: Path) -> None:
|
|
10
|
+
path.mkdir(parents=True, exist_ok=False)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def copy_directory(source: Path, destination: Path) -> None:
|
|
14
|
+
shutil.copytree(source, destination)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def remove_path(path: Path) -> None:
|
|
18
|
+
if path.is_dir():
|
|
19
|
+
shutil.rmtree(path)
|
|
20
|
+
elif path.exists():
|
|
21
|
+
path.unlink()
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: graphsmith
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI tool for scaffolding LangGraph applications.
|
|
5
|
+
Author: OpenAI
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://pypi.org/project/graphsmith/
|
|
29
|
+
Project-URL: Repository, https://github.com/your-username/graphsmith
|
|
30
|
+
Project-URL: Issues, https://github.com/your-username/graphsmith/issues
|
|
31
|
+
Keywords: langgraph,langchain,cli,scaffold,templates
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
42
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
43
|
+
Requires-Python: >=3.9
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
License-File: LICENSE
|
|
46
|
+
Requires-Dist: langgraph
|
|
47
|
+
Requires-Dist: langchain
|
|
48
|
+
Requires-Dist: python-dotenv
|
|
49
|
+
Provides-Extra: dev
|
|
50
|
+
Requires-Dist: build>=1.2.1; extra == "dev"
|
|
51
|
+
Requires-Dist: twine>=5.1.1; extra == "dev"
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
# graphsmith
|
|
55
|
+
|
|
56
|
+
`graphsmith` is a Python command-line tool that scaffolds LangGraph applications.
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Install from PyPI:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install graphsmith
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
Create a basic project:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
graphsmith create my_app --template basic --llm openai
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Create a multi-agent project with three sequential agents:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
graphsmith create my_app --template multi_agent --agents 3 --llm openai
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use Ollama instead of OpenAI:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
graphsmith create my_app --template basic --llm ollama
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Generated project customization
|
|
91
|
+
|
|
92
|
+
- Edit `config.py` to change the model name or provider configuration.
|
|
93
|
+
- Update `.env` with your API key or Ollama model settings.
|
|
94
|
+
- Modify `nodes.py` or files in `agents/` to add your application logic.
|
|
95
|
+
- Extend `graph.py` to add routing, tools, or more complex workflows.
|
|
96
|
+
|
|
97
|
+
## Build and upload to PyPI
|
|
98
|
+
|
|
99
|
+
Build the distribution files:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
python -m pip install --upgrade build twine
|
|
103
|
+
python -m build
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Validate the package metadata:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
python -m twine check dist/*
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Upload to TestPyPI:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
python -m twine upload --repository testpypi dist/*
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Upload to PyPI:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
python -m twine upload dist/*
|
|
122
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
graphsmith/__init__.py
|
|
6
|
+
graphsmith.egg-info/PKG-INFO
|
|
7
|
+
graphsmith.egg-info/SOURCES.txt
|
|
8
|
+
graphsmith.egg-info/dependency_links.txt
|
|
9
|
+
graphsmith.egg-info/entry_points.txt
|
|
10
|
+
graphsmith.egg-info/requires.txt
|
|
11
|
+
graphsmith.egg-info/top_level.txt
|
|
12
|
+
graphsmith/cli/__init__.py
|
|
13
|
+
graphsmith/cli/main.py
|
|
14
|
+
graphsmith/core/__init__.py
|
|
15
|
+
graphsmith/core/generator.py
|
|
16
|
+
graphsmith/core/prompts.py
|
|
17
|
+
graphsmith/core/template_engine.py
|
|
18
|
+
graphsmith/templates/basic/.env
|
|
19
|
+
graphsmith/templates/basic/README.md
|
|
20
|
+
graphsmith/templates/basic/config.py
|
|
21
|
+
graphsmith/templates/basic/graph.py
|
|
22
|
+
graphsmith/templates/basic/main.py
|
|
23
|
+
graphsmith/templates/basic/nodes.py
|
|
24
|
+
graphsmith/templates/basic/requirements.txt
|
|
25
|
+
graphsmith/templates/basic/state.py
|
|
26
|
+
graphsmith/templates/basic/__pycache__/config.cpython-312.pyc
|
|
27
|
+
graphsmith/templates/basic/__pycache__/graph.cpython-312.pyc
|
|
28
|
+
graphsmith/templates/basic/__pycache__/main.cpython-312.pyc
|
|
29
|
+
graphsmith/templates/basic/__pycache__/nodes.cpython-312.pyc
|
|
30
|
+
graphsmith/templates/basic/__pycache__/state.cpython-312.pyc
|
|
31
|
+
graphsmith/templates/multi_agent/.env
|
|
32
|
+
graphsmith/templates/multi_agent/README.md
|
|
33
|
+
graphsmith/templates/multi_agent/config.py
|
|
34
|
+
graphsmith/templates/multi_agent/graph.py
|
|
35
|
+
graphsmith/templates/multi_agent/main.py
|
|
36
|
+
graphsmith/templates/multi_agent/requirements.txt
|
|
37
|
+
graphsmith/templates/multi_agent/state.py
|
|
38
|
+
graphsmith/templates/multi_agent/__pycache__/config.cpython-312.pyc
|
|
39
|
+
graphsmith/templates/multi_agent/__pycache__/graph.cpython-312.pyc
|
|
40
|
+
graphsmith/templates/multi_agent/__pycache__/main.cpython-312.pyc
|
|
41
|
+
graphsmith/templates/multi_agent/__pycache__/state.cpython-312.pyc
|
|
42
|
+
graphsmith/templates/multi_agent/agents/agent_placeholder.py
|
|
43
|
+
graphsmith/templates/multi_agent/agents/__pycache__/agent_placeholder.cpython-312.pyc
|
|
44
|
+
graphsmith/utils/__init__.py
|
|
45
|
+
graphsmith/utils/file_utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
graphsmith
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "graphsmith"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "CLI tool for scaffolding LangGraph applications."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "OpenAI" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["langgraph", "langchain", "cli", "scaffold", "templates"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Software Development :: Code Generators",
|
|
27
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"langgraph",
|
|
31
|
+
"langchain",
|
|
32
|
+
"python-dotenv",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://pypi.org/project/graphsmith/"
|
|
37
|
+
Repository = "https://github.com/your-username/graphsmith"
|
|
38
|
+
Issues = "https://github.com/your-username/graphsmith/issues"
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
graphsmith = "graphsmith.cli.main:main"
|
|
42
|
+
|
|
43
|
+
[project.optional-dependencies]
|
|
44
|
+
dev = [
|
|
45
|
+
"build>=1.2.1",
|
|
46
|
+
"twine>=5.1.1",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[tool.setuptools]
|
|
50
|
+
include-package-data = true
|
|
51
|
+
|
|
52
|
+
[tool.setuptools.packages.find]
|
|
53
|
+
include = ["graphsmith*"]
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.package-data]
|
|
56
|
+
graphsmith = ["templates/**", "templates/**/*"]
|