bindai-cli 0.1.7__tar.gz → 0.1.8__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.
Files changed (70) hide show
  1. bindai_cli-0.1.8/PKG-INFO +193 -0
  2. bindai_cli-0.1.8/README.md +182 -0
  3. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/pyproject.toml +2 -1
  4. bindai_cli-0.1.8/src/bindai_cli/__init__.py +1 -0
  5. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/__main__.py +3 -0
  6. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/new.py +2 -6
  7. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/version.py +1 -1
  8. bindai_cli-0.1.8/src/bindai_cli/scaffolds/basic/__pycache__/main.cpython-314.pyc +0 -0
  9. bindai_cli-0.1.8/src/bindai_cli/scaffolds/basic/agents/__pycache__/assistant.cpython-314.pyc +0 -0
  10. bindai_cli-0.1.8/src/bindai_cli/scaffolds/basic/agents/assistant.py +3 -0
  11. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/main.py +2 -2
  12. bindai_cli-0.1.8/src/bindai_cli/scaffolds/basic/tools/__pycache__/echo.cpython-314.pyc +0 -0
  13. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/templates/registry.py +23 -6
  14. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/templates/validator.py +0 -1
  15. bindai_cli-0.1.8/src/bindai_cli/templates/workflow-basic/template.json +15 -0
  16. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/utils/scaffold.py +2 -2
  17. bindai_cli-0.1.8/src/bindai_cli.egg-info/PKG-INFO +193 -0
  18. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli.egg-info/SOURCES.txt +9 -1
  19. bindai_cli-0.1.8/tests/test_app.py +17 -0
  20. bindai_cli-0.1.8/tests/test_doctor.py +60 -0
  21. bindai_cli-0.1.8/tests/test_new.py +64 -0
  22. bindai_cli-0.1.8/tests/test_run.py +114 -0
  23. bindai_cli-0.1.8/tests/test_templates.py +64 -0
  24. bindai_cli-0.1.7/PKG-INFO +0 -9
  25. bindai_cli-0.1.7/README.md +0 -3
  26. bindai_cli-0.1.7/src/bindai_cli/__init__.py +0 -1
  27. bindai_cli-0.1.7/src/bindai_cli/scaffolds/basic/agents/assistant.py +0 -7
  28. bindai_cli-0.1.7/src/bindai_cli/templates/workflow-basic/template.json +0 -14
  29. bindai_cli-0.1.7/src/bindai_cli.egg-info/PKG-INFO +0 -9
  30. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/setup.cfg +0 -0
  31. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/app.py +0 -0
  32. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/__init__.py +0 -0
  33. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/add.py +0 -0
  34. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/doctor.py +0 -0
  35. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/inspect.py +0 -0
  36. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/run.py +0 -0
  37. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/template.py +0 -0
  38. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/commands/workflow.py +0 -0
  39. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/__init__.py +0 -0
  40. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/agent.py +0 -0
  41. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/directories.py +0 -0
  42. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/knowledge.py +0 -0
  43. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/memory.py +0 -0
  44. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/pyproject.py +0 -0
  45. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/tool.py +0 -0
  46. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/generators/workflow.py +0 -0
  47. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/inspectors/project.py +0 -0
  48. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/.env.example +0 -0
  49. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/.gitignore +0 -0
  50. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/LICENSE +0 -0
  51. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/README.md +0 -0
  52. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/bindai.toml +0 -0
  53. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/knowledge/.gitkeep +0 -0
  54. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/memory/.gitkeep +0 -0
  55. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/requirements.txt +0 -0
  56. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/templates/.gitkeep +0 -0
  57. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/tests/.gitkeep +0 -0
  58. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/tools/.gitkeep +0 -0
  59. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/tools/echo.py +0 -0
  60. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/scaffolds/basic/workflows/.gitkeep +0 -0
  61. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/templates/installer.py +0 -0
  62. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/templates/models.py +0 -0
  63. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/utils/config.py +0 -0
  64. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/utils/providers.py +0 -0
  65. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/workflows/graph.py +0 -0
  66. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli/workflows/validator.py +0 -0
  67. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli.egg-info/dependency_links.txt +0 -0
  68. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli.egg-info/entry_points.txt +0 -0
  69. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli.egg-info/requires.txt +0 -0
  70. {bindai_cli-0.1.7 → bindai_cli-0.1.8}/src/bindai_cli.egg-info/top_level.txt +0 -0
@@ -0,0 +1,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: bindai-cli
3
+ Version: 0.1.8
4
+ Summary: BindAI Command Line Interface
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: typer>=0.16
8
+ Requires-Dist: rich>=14.0
9
+ Requires-Dist: python-dotenv>=1.0
10
+ Requires-Dist: bindai-config>=0.1.2
11
+
12
+ # BindAI CLI
13
+
14
+ `bindai-cli` provides the command-line interface for creating, inspecting, developing, and managing BindAI projects.
15
+
16
+ The CLI is designed to provide a convenient developer workflow around the BindAI framework and its project structure.
17
+
18
+ ## Features
19
+
20
+ The BindAI CLI provides commands for common development tasks, including:
21
+
22
+ * Project initialization
23
+ * Project scaffolding
24
+ * BindAI environment inspection
25
+ * Framework diagnostics
26
+ * Project creation
27
+ * Development utilities
28
+ * CLI-based project management
29
+
30
+ ## Installation
31
+
32
+ The CLI is included as the `bindai-cli` package in the BindAI workspace.
33
+
34
+ For development from the BindAI repository:
35
+
36
+ ```bash
37
+ uv sync
38
+ ```
39
+
40
+ The CLI can then be executed with:
41
+
42
+ ```bash
43
+ uv run bindai
44
+ ```
45
+
46
+ ## Common Commands
47
+
48
+ ### Doctor
49
+
50
+ Run BindAI diagnostics:
51
+
52
+ ```bash
53
+ bindai doctor
54
+ ```
55
+
56
+ This command is intended to help identify configuration or environment issues.
57
+
58
+ ### Inspect
59
+
60
+ Inspect the current BindAI environment or project:
61
+
62
+ ```bash
63
+ bindai inspect
64
+ ```
65
+
66
+ ### Initialize
67
+
68
+ Initialize a BindAI project:
69
+
70
+ ```bash
71
+ bindai init
72
+ ```
73
+
74
+ ### Create a Project
75
+
76
+ Create a new BindAI project:
77
+
78
+ ```bash
79
+ bindai new my-project
80
+ ```
81
+
82
+ The generated project can then be developed independently while using the BindAI framework.
83
+
84
+ ## Project Scaffolding
85
+
86
+ The CLI includes templates and scaffolding resources for creating BindAI projects.
87
+
88
+ A typical workflow is:
89
+
90
+ ```text
91
+ bindai new my-project
92
+
93
+
94
+ Project files
95
+
96
+
97
+ Configure project
98
+
99
+
100
+ Add agents / workflows
101
+
102
+
103
+ Develop
104
+ ```
105
+
106
+ The package includes its CLI templates and scaffolding resources as package data so they can be distributed with the CLI.
107
+
108
+ ## Development
109
+
110
+ `bindai-cli` is part of the BindAI workspace.
111
+
112
+ From the repository root:
113
+
114
+ ```bash
115
+ uv sync
116
+ ```
117
+
118
+ Run the CLI:
119
+
120
+ ```bash
121
+ uv run bindai
122
+ ```
123
+
124
+ Run the complete test suite:
125
+
126
+ ```bash
127
+ uv run pytest
128
+ ```
129
+
130
+ Run static type checking:
131
+
132
+ ```bash
133
+ uv run mypy packages/bindai-cli
134
+ ```
135
+
136
+ Build the package:
137
+
138
+ ```bash
139
+ uv build --package bindai-cli
140
+ ```
141
+
142
+ ## Package API
143
+
144
+ The package currently exposes its version through:
145
+
146
+ ```python
147
+ from bindai_cli import __version__
148
+
149
+ print(__version__)
150
+ ```
151
+
152
+ Current version:
153
+
154
+ ```text
155
+ 0.1.8
156
+ ```
157
+
158
+ The primary public interface of this package is the command-line application rather than a large Python API.
159
+
160
+ ## Architecture
161
+
162
+ The CLI sits at the developer-facing edge of the BindAI platform:
163
+
164
+ ```text
165
+ Developer
166
+
167
+
168
+ BindAI CLI
169
+
170
+ ├── Diagnostics
171
+ ├── Inspection
172
+ ├── Initialization
173
+ └── Project Scaffolding
174
+
175
+
176
+ BindAI Project
177
+
178
+ ┌─────┼─────┐
179
+ ▼ ▼ ▼
180
+ Agents Workflows Tools
181
+ ```
182
+
183
+ This keeps command-line concerns separate from the core BindAI runtime and framework packages.
184
+
185
+ ## Documentation
186
+
187
+ Full BindAI documentation is available at:
188
+
189
+ https://docs.bindai.dev
190
+
191
+ ## License
192
+
193
+ BindAI is released under the MIT License.
@@ -0,0 +1,182 @@
1
+ # BindAI CLI
2
+
3
+ `bindai-cli` provides the command-line interface for creating, inspecting, developing, and managing BindAI projects.
4
+
5
+ The CLI is designed to provide a convenient developer workflow around the BindAI framework and its project structure.
6
+
7
+ ## Features
8
+
9
+ The BindAI CLI provides commands for common development tasks, including:
10
+
11
+ * Project initialization
12
+ * Project scaffolding
13
+ * BindAI environment inspection
14
+ * Framework diagnostics
15
+ * Project creation
16
+ * Development utilities
17
+ * CLI-based project management
18
+
19
+ ## Installation
20
+
21
+ The CLI is included as the `bindai-cli` package in the BindAI workspace.
22
+
23
+ For development from the BindAI repository:
24
+
25
+ ```bash
26
+ uv sync
27
+ ```
28
+
29
+ The CLI can then be executed with:
30
+
31
+ ```bash
32
+ uv run bindai
33
+ ```
34
+
35
+ ## Common Commands
36
+
37
+ ### Doctor
38
+
39
+ Run BindAI diagnostics:
40
+
41
+ ```bash
42
+ bindai doctor
43
+ ```
44
+
45
+ This command is intended to help identify configuration or environment issues.
46
+
47
+ ### Inspect
48
+
49
+ Inspect the current BindAI environment or project:
50
+
51
+ ```bash
52
+ bindai inspect
53
+ ```
54
+
55
+ ### Initialize
56
+
57
+ Initialize a BindAI project:
58
+
59
+ ```bash
60
+ bindai init
61
+ ```
62
+
63
+ ### Create a Project
64
+
65
+ Create a new BindAI project:
66
+
67
+ ```bash
68
+ bindai new my-project
69
+ ```
70
+
71
+ The generated project can then be developed independently while using the BindAI framework.
72
+
73
+ ## Project Scaffolding
74
+
75
+ The CLI includes templates and scaffolding resources for creating BindAI projects.
76
+
77
+ A typical workflow is:
78
+
79
+ ```text
80
+ bindai new my-project
81
+
82
+
83
+ Project files
84
+
85
+
86
+ Configure project
87
+
88
+
89
+ Add agents / workflows
90
+
91
+
92
+ Develop
93
+ ```
94
+
95
+ The package includes its CLI templates and scaffolding resources as package data so they can be distributed with the CLI.
96
+
97
+ ## Development
98
+
99
+ `bindai-cli` is part of the BindAI workspace.
100
+
101
+ From the repository root:
102
+
103
+ ```bash
104
+ uv sync
105
+ ```
106
+
107
+ Run the CLI:
108
+
109
+ ```bash
110
+ uv run bindai
111
+ ```
112
+
113
+ Run the complete test suite:
114
+
115
+ ```bash
116
+ uv run pytest
117
+ ```
118
+
119
+ Run static type checking:
120
+
121
+ ```bash
122
+ uv run mypy packages/bindai-cli
123
+ ```
124
+
125
+ Build the package:
126
+
127
+ ```bash
128
+ uv build --package bindai-cli
129
+ ```
130
+
131
+ ## Package API
132
+
133
+ The package currently exposes its version through:
134
+
135
+ ```python
136
+ from bindai_cli import __version__
137
+
138
+ print(__version__)
139
+ ```
140
+
141
+ Current version:
142
+
143
+ ```text
144
+ 0.1.8
145
+ ```
146
+
147
+ The primary public interface of this package is the command-line application rather than a large Python API.
148
+
149
+ ## Architecture
150
+
151
+ The CLI sits at the developer-facing edge of the BindAI platform:
152
+
153
+ ```text
154
+ Developer
155
+
156
+
157
+ BindAI CLI
158
+
159
+ ├── Diagnostics
160
+ ├── Inspection
161
+ ├── Initialization
162
+ └── Project Scaffolding
163
+
164
+
165
+ BindAI Project
166
+
167
+ ┌─────┼─────┐
168
+ ▼ ▼ ▼
169
+ Agents Workflows Tools
170
+ ```
171
+
172
+ This keeps command-line concerns separate from the core BindAI runtime and framework packages.
173
+
174
+ ## Documentation
175
+
176
+ Full BindAI documentation is available at:
177
+
178
+ https://docs.bindai.dev
179
+
180
+ ## License
181
+
182
+ BindAI is released under the MIT License.
@@ -1,7 +1,8 @@
1
1
  [project]
2
2
  name = "bindai-cli"
3
- version = "0.1.7"
3
+ version = "0.1.8"
4
4
  description = "BindAI Command Line Interface"
5
+ readme = "README.md"
5
6
  requires-python = ">=3.11"
6
7
 
7
8
  dependencies = [
@@ -0,0 +1 @@
1
+ __version__ = "0.1.8"
@@ -1,7 +1,10 @@
1
+ from bindai_providers import bootstrap
2
+
1
3
  from bindai_cli.app import app
2
4
 
3
5
 
4
6
  def main():
7
+ bootstrap()
5
8
  app()
6
9
 
7
10
 
@@ -30,9 +30,7 @@ def new(
30
30
  root = Path(name)
31
31
 
32
32
  if root.exists():
33
- console.print(
34
- f"[red]Project '{name}' already exists.[/red]"
35
- )
33
+ console.print(f"[red]Project '{name}' already exists.[/red]")
36
34
  raise typer.Exit(1)
37
35
 
38
36
  scaffold = Path(__file__).parent.parent / "scaffolds" / "basic"
@@ -56,9 +54,7 @@ def new(
56
54
 
57
55
  print()
58
56
 
59
- console.print(
60
- f"[green]✓ Project '{name}' created successfully.[/green]"
61
- )
57
+ console.print(f"[green]✓ Project '{name}' created successfully.[/green]")
62
58
 
63
59
  console.print()
64
60
 
@@ -12,4 +12,4 @@ def version():
12
12
  """
13
13
  Show installed BindAI version.
14
14
  """
15
- typer.echo(f"BindAI CLI {__version__}")
15
+ typer.echo(f"BindAI CLI {__version__}")
@@ -0,0 +1,3 @@
1
+ from bindai import AgentBuilder
2
+
3
+ agent = AgentBuilder().from_project(".").build()
@@ -2,7 +2,7 @@ from dotenv import load_dotenv
2
2
 
3
3
  load_dotenv()
4
4
 
5
- from agents.assistant import agent
5
+ from agents.assistant import agent # noqa: E402
6
6
 
7
7
 
8
8
  def main():
@@ -20,4 +20,4 @@ def main():
20
20
 
21
21
 
22
22
  if __name__ == "__main__":
23
- main()
23
+ main()
@@ -9,9 +9,10 @@ from .models import Template
9
9
  class TemplateRegistry:
10
10
  def __init__(self):
11
11
  self.root = Path(__file__).resolve().parent
12
+ self.scaffolds_root = self.root.parent / "scaffolds"
12
13
 
13
14
  def list(self) -> list[Template]:
14
- templates = []
15
+ templates: list[Template] = []
15
16
 
16
17
  if not self.root.exists():
17
18
  return templates
@@ -26,13 +27,20 @@ class TemplateRegistry:
26
27
  continue
27
28
 
28
29
  data = json.loads(
29
- metadata.read_text(encoding="utf-8")
30
+ metadata.read_text(
31
+ encoding="utf-8",
32
+ )
30
33
  )
31
34
 
35
+ scaffold_name = self._scaffold_name(data["name"])
36
+ scaffold_path = self.scaffolds_root / scaffold_name
37
+
38
+ template_data = {key: value for key, value in data.items() if key != "scaffold"}
39
+
32
40
  templates.append(
33
41
  Template(
34
- **data,
35
- path=str(folder),
42
+ **template_data,
43
+ path=str(scaffold_path),
36
44
  )
37
45
  )
38
46
 
@@ -42,9 +50,18 @@ class TemplateRegistry:
42
50
  self,
43
51
  name: str,
44
52
  ) -> Template | None:
45
-
46
53
  for template in self.list():
47
54
  if template.name == name:
48
55
  return template
49
56
 
50
- return None
57
+ return None
58
+
59
+ def _scaffold_name(self, template_name: str) -> str:
60
+ mapping = {
61
+ "workflow-basic": "basic",
62
+ }
63
+
64
+ return mapping.get(
65
+ template_name,
66
+ template_name,
67
+ )
@@ -6,7 +6,6 @@ from pathlib import Path
6
6
  REQUIRED_FILES = {
7
7
  "README.md",
8
8
  "main.py",
9
- "template.json",
10
9
  }
11
10
 
12
11
 
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "workflow-basic",
3
+ "title": "Workflow Basic",
4
+ "description": "Starter workflow project.",
5
+ "category": "workflow",
6
+ "author": "BindBrain",
7
+ "version": "1.0.0",
8
+ "status": "stable",
9
+ "tags": [
10
+ "workflow",
11
+ "automation",
12
+ "beginner"
13
+ ],
14
+ "scaffold": "basic"
15
+ }
@@ -1,4 +1,4 @@
1
- from __future__ import annotations
1
+ from __future__ import annotations
2
2
 
3
3
  import shutil
4
4
  from pathlib import Path
@@ -62,4 +62,4 @@ def replace_placeholders(
62
62
  file.write_text(
63
63
  text,
64
64
  encoding="utf-8",
65
- )
65
+ )
@@ -0,0 +1,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: bindai-cli
3
+ Version: 0.1.8
4
+ Summary: BindAI Command Line Interface
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: typer>=0.16
8
+ Requires-Dist: rich>=14.0
9
+ Requires-Dist: python-dotenv>=1.0
10
+ Requires-Dist: bindai-config>=0.1.2
11
+
12
+ # BindAI CLI
13
+
14
+ `bindai-cli` provides the command-line interface for creating, inspecting, developing, and managing BindAI projects.
15
+
16
+ The CLI is designed to provide a convenient developer workflow around the BindAI framework and its project structure.
17
+
18
+ ## Features
19
+
20
+ The BindAI CLI provides commands for common development tasks, including:
21
+
22
+ * Project initialization
23
+ * Project scaffolding
24
+ * BindAI environment inspection
25
+ * Framework diagnostics
26
+ * Project creation
27
+ * Development utilities
28
+ * CLI-based project management
29
+
30
+ ## Installation
31
+
32
+ The CLI is included as the `bindai-cli` package in the BindAI workspace.
33
+
34
+ For development from the BindAI repository:
35
+
36
+ ```bash
37
+ uv sync
38
+ ```
39
+
40
+ The CLI can then be executed with:
41
+
42
+ ```bash
43
+ uv run bindai
44
+ ```
45
+
46
+ ## Common Commands
47
+
48
+ ### Doctor
49
+
50
+ Run BindAI diagnostics:
51
+
52
+ ```bash
53
+ bindai doctor
54
+ ```
55
+
56
+ This command is intended to help identify configuration or environment issues.
57
+
58
+ ### Inspect
59
+
60
+ Inspect the current BindAI environment or project:
61
+
62
+ ```bash
63
+ bindai inspect
64
+ ```
65
+
66
+ ### Initialize
67
+
68
+ Initialize a BindAI project:
69
+
70
+ ```bash
71
+ bindai init
72
+ ```
73
+
74
+ ### Create a Project
75
+
76
+ Create a new BindAI project:
77
+
78
+ ```bash
79
+ bindai new my-project
80
+ ```
81
+
82
+ The generated project can then be developed independently while using the BindAI framework.
83
+
84
+ ## Project Scaffolding
85
+
86
+ The CLI includes templates and scaffolding resources for creating BindAI projects.
87
+
88
+ A typical workflow is:
89
+
90
+ ```text
91
+ bindai new my-project
92
+
93
+
94
+ Project files
95
+
96
+
97
+ Configure project
98
+
99
+
100
+ Add agents / workflows
101
+
102
+
103
+ Develop
104
+ ```
105
+
106
+ The package includes its CLI templates and scaffolding resources as package data so they can be distributed with the CLI.
107
+
108
+ ## Development
109
+
110
+ `bindai-cli` is part of the BindAI workspace.
111
+
112
+ From the repository root:
113
+
114
+ ```bash
115
+ uv sync
116
+ ```
117
+
118
+ Run the CLI:
119
+
120
+ ```bash
121
+ uv run bindai
122
+ ```
123
+
124
+ Run the complete test suite:
125
+
126
+ ```bash
127
+ uv run pytest
128
+ ```
129
+
130
+ Run static type checking:
131
+
132
+ ```bash
133
+ uv run mypy packages/bindai-cli
134
+ ```
135
+
136
+ Build the package:
137
+
138
+ ```bash
139
+ uv build --package bindai-cli
140
+ ```
141
+
142
+ ## Package API
143
+
144
+ The package currently exposes its version through:
145
+
146
+ ```python
147
+ from bindai_cli import __version__
148
+
149
+ print(__version__)
150
+ ```
151
+
152
+ Current version:
153
+
154
+ ```text
155
+ 0.1.8
156
+ ```
157
+
158
+ The primary public interface of this package is the command-line application rather than a large Python API.
159
+
160
+ ## Architecture
161
+
162
+ The CLI sits at the developer-facing edge of the BindAI platform:
163
+
164
+ ```text
165
+ Developer
166
+
167
+
168
+ BindAI CLI
169
+
170
+ ├── Diagnostics
171
+ ├── Inspection
172
+ ├── Initialization
173
+ └── Project Scaffolding
174
+
175
+
176
+ BindAI Project
177
+
178
+ ┌─────┼─────┐
179
+ ▼ ▼ ▼
180
+ Agents Workflows Tools
181
+ ```
182
+
183
+ This keeps command-line concerns separate from the core BindAI runtime and framework packages.
184
+
185
+ ## Documentation
186
+
187
+ Full BindAI documentation is available at:
188
+
189
+ https://docs.bindai.dev
190
+
191
+ ## License
192
+
193
+ BindAI is released under the MIT License.
@@ -34,13 +34,16 @@ src/bindai_cli/scaffolds/basic/README.md
34
34
  src/bindai_cli/scaffolds/basic/bindai.toml
35
35
  src/bindai_cli/scaffolds/basic/main.py
36
36
  src/bindai_cli/scaffolds/basic/requirements.txt
37
+ src/bindai_cli/scaffolds/basic/__pycache__/main.cpython-314.pyc
37
38
  src/bindai_cli/scaffolds/basic/agents/assistant.py
39
+ src/bindai_cli/scaffolds/basic/agents/__pycache__/assistant.cpython-314.pyc
38
40
  src/bindai_cli/scaffolds/basic/knowledge/.gitkeep
39
41
  src/bindai_cli/scaffolds/basic/memory/.gitkeep
40
42
  src/bindai_cli/scaffolds/basic/templates/.gitkeep
41
43
  src/bindai_cli/scaffolds/basic/tests/.gitkeep
42
44
  src/bindai_cli/scaffolds/basic/tools/.gitkeep
43
45
  src/bindai_cli/scaffolds/basic/tools/echo.py
46
+ src/bindai_cli/scaffolds/basic/tools/__pycache__/echo.cpython-314.pyc
44
47
  src/bindai_cli/scaffolds/basic/workflows/.gitkeep
45
48
  src/bindai_cli/templates/installer.py
46
49
  src/bindai_cli/templates/models.py
@@ -51,4 +54,9 @@ src/bindai_cli/utils/config.py
51
54
  src/bindai_cli/utils/providers.py
52
55
  src/bindai_cli/utils/scaffold.py
53
56
  src/bindai_cli/workflows/graph.py
54
- src/bindai_cli/workflows/validator.py
57
+ src/bindai_cli/workflows/validator.py
58
+ tests/test_app.py
59
+ tests/test_doctor.py
60
+ tests/test_new.py
61
+ tests/test_run.py
62
+ tests/test_templates.py
@@ -0,0 +1,17 @@
1
+ from bindai_cli.app import app
2
+ from typer.testing import CliRunner
3
+
4
+ runner = CliRunner()
5
+
6
+
7
+ def test_help_lists_commands():
8
+ result = runner.invoke(app, ["--help"])
9
+
10
+ assert result.exit_code == 0
11
+ assert "doctor" in result.stdout
12
+ assert "new" in result.stdout
13
+ assert "run" in result.stdout
14
+ assert "template" in result.stdout
15
+ assert "workflow" in result.stdout
16
+ assert "inspect" in result.stdout
17
+ assert "version" in result.stdout
@@ -0,0 +1,60 @@
1
+ from bindai_cli.commands.doctor import app
2
+ from typer.testing import CliRunner
3
+
4
+ runner = CliRunner()
5
+
6
+
7
+ def test_doctor_without_project_config(tmp_path, monkeypatch):
8
+ monkeypatch.chdir(tmp_path)
9
+
10
+ monkeypatch.delenv("OPENAI_API_KEY", raising=False)
11
+ monkeypatch.delenv("ANTHROPIC_API_KEY", raising=False)
12
+ monkeypatch.delenv("OLLAMA_HOST", raising=False)
13
+
14
+ result = runner.invoke(app)
15
+
16
+ assert result.exit_code == 0
17
+ assert "BindAI Doctor" in result.stdout
18
+ assert "Python" in result.stdout
19
+ assert "Virtual Environment" in result.stdout
20
+ assert "Templates" in result.stdout
21
+ assert "Providers" in result.stdout
22
+ assert "OPENAI_API_KEY" in result.stdout
23
+ assert "ANTHROPIC_API_KEY" in result.stdout
24
+ assert "OLLAMA_HOST" in result.stdout
25
+
26
+
27
+ def test_doctor_reports_environment_variables(tmp_path, monkeypatch):
28
+ monkeypatch.chdir(tmp_path)
29
+
30
+ monkeypatch.setenv("OPENAI_API_KEY", "test-key")
31
+ monkeypatch.setenv("ANTHROPIC_API_KEY", "test-key")
32
+ monkeypatch.setenv("OLLAMA_HOST", "http://localhost:11434")
33
+
34
+ result = runner.invoke(app)
35
+
36
+ assert result.exit_code == 0
37
+ assert "OPENAI_API_KEY" in result.stdout
38
+ assert "ANTHROPIC_API_KEY" in result.stdout
39
+ assert "OLLAMA_HOST" in result.stdout
40
+ assert "http://localhost:11434" in result.stdout
41
+
42
+
43
+ def test_doctor_reports_project_configuration(tmp_path, monkeypatch):
44
+ monkeypatch.chdir(tmp_path)
45
+
46
+ (tmp_path / "bindai.toml").write_text(
47
+ """
48
+ name = "test-project"
49
+ provider = "openai"
50
+ model = "gpt-4o-mini"
51
+ """.strip(),
52
+ encoding="utf-8",
53
+ )
54
+
55
+ result = runner.invoke(app)
56
+
57
+ assert result.exit_code == 0
58
+ assert "test-project" in result.stdout
59
+ assert "openai" in result.stdout
60
+ assert "gpt-4o-mini" in result.stdout
@@ -0,0 +1,64 @@
1
+ from bindai_cli.commands.new import app
2
+ from typer.testing import CliRunner
3
+
4
+ runner = CliRunner()
5
+
6
+
7
+ def test_new_creates_project(tmp_path, monkeypatch):
8
+ monkeypatch.chdir(tmp_path)
9
+
10
+ def fake_run(*args, **kwargs):
11
+ return None
12
+
13
+ monkeypatch.setattr(
14
+ "bindai_cli.commands.new.subprocess.run",
15
+ fake_run,
16
+ )
17
+
18
+ result = runner.invoke(app, ["demo"])
19
+
20
+ assert result.exit_code == 0
21
+ assert "created successfully" in result.stdout
22
+
23
+ project = tmp_path / "demo"
24
+
25
+ assert project.exists()
26
+ assert (project / "main.py").exists()
27
+ assert (project / "README.md").exists()
28
+ assert (project / "bindai.toml").exists()
29
+ assert (project / ".env").exists()
30
+
31
+
32
+ def test_new_rejects_existing_project(tmp_path, monkeypatch):
33
+ monkeypatch.chdir(tmp_path)
34
+
35
+ project = tmp_path / "existing"
36
+ project.mkdir()
37
+
38
+ result = runner.invoke(app, ["existing"])
39
+
40
+ assert result.exit_code == 1
41
+ assert "already exists" in result.stdout
42
+
43
+
44
+ def test_new_replaces_project_name_placeholder(tmp_path, monkeypatch):
45
+ monkeypatch.chdir(tmp_path)
46
+
47
+ monkeypatch.setattr(
48
+ "bindai_cli.commands.new.subprocess.run",
49
+ lambda *args, **kwargs: None,
50
+ )
51
+
52
+ result = runner.invoke(app, ["my-agent"])
53
+
54
+ assert result.exit_code == 0
55
+
56
+ project = tmp_path / "my-agent"
57
+
58
+ bindai_toml = (project / "bindai.toml").read_text(
59
+ encoding="utf-8",
60
+ )
61
+
62
+ assert "my-agent" in bindai_toml
63
+ assert "{{ project_name }}" not in bindai_toml
64
+ assert "{{PROJECT_NAME}}" not in bindai_toml
@@ -0,0 +1,114 @@
1
+ from bindai_cli.commands.run import app
2
+ from typer.testing import CliRunner
3
+
4
+ runner = CliRunner()
5
+
6
+
7
+ def test_run_uses_main_py_for_bindai_project(tmp_path, monkeypatch):
8
+ monkeypatch.chdir(tmp_path)
9
+
10
+ (tmp_path / "bindai.toml").write_text(
11
+ 'name = "test-project"\n',
12
+ encoding="utf-8",
13
+ )
14
+ (tmp_path / "main.py").write_text(
15
+ "print('hello')\n",
16
+ encoding="utf-8",
17
+ )
18
+
19
+ calls = []
20
+
21
+ def fake_run(*args, **kwargs):
22
+ calls.append((args, kwargs))
23
+
24
+ monkeypatch.setattr(
25
+ "bindai_cli.commands.run.subprocess.run",
26
+ fake_run,
27
+ )
28
+
29
+ result = runner.invoke(app)
30
+
31
+ assert result.exit_code == 0
32
+ assert len(calls) == 1
33
+
34
+ command = calls[0][0][0]
35
+
36
+ assert command[0]
37
+ assert command[1] == str(tmp_path / "main.py")
38
+ assert calls[0][1]["check"] is True
39
+
40
+
41
+ def test_run_uses_main_py_when_no_config_exists(tmp_path, monkeypatch):
42
+ monkeypatch.chdir(tmp_path)
43
+
44
+ (tmp_path / "main.py").write_text(
45
+ "print('hello')\n",
46
+ encoding="utf-8",
47
+ )
48
+
49
+ calls = []
50
+
51
+ def fake_run(*args, **kwargs):
52
+ calls.append((args, kwargs))
53
+
54
+ monkeypatch.setattr(
55
+ "bindai_cli.commands.run.subprocess.run",
56
+ fake_run,
57
+ )
58
+
59
+ result = runner.invoke(app)
60
+
61
+ assert result.exit_code == 0
62
+ assert len(calls) == 1
63
+ assert calls[0][0][0][1] == str(tmp_path / "main.py")
64
+
65
+
66
+ def test_run_uses_workflow_py_as_fallback(tmp_path, monkeypatch):
67
+ monkeypatch.chdir(tmp_path)
68
+
69
+ (tmp_path / "workflow.py").write_text(
70
+ "print('workflow')\n",
71
+ encoding="utf-8",
72
+ )
73
+
74
+ calls = []
75
+
76
+ def fake_run(*args, **kwargs):
77
+ calls.append((args, kwargs))
78
+
79
+ monkeypatch.setattr(
80
+ "bindai_cli.commands.run.subprocess.run",
81
+ fake_run,
82
+ )
83
+
84
+ result = runner.invoke(app)
85
+
86
+ assert result.exit_code == 0
87
+ assert len(calls) == 1
88
+ assert calls[0][0][0][1] == str(tmp_path / "workflow.py")
89
+
90
+
91
+ def test_run_fails_when_bindai_project_has_no_main(tmp_path, monkeypatch):
92
+ monkeypatch.chdir(tmp_path)
93
+
94
+ (tmp_path / "bindai.toml").write_text(
95
+ 'name = "test-project"\n',
96
+ encoding="utf-8",
97
+ )
98
+
99
+ result = runner.invoke(app)
100
+
101
+ assert result.exit_code == 1
102
+ assert "main.py not found" in result.stdout
103
+
104
+
105
+ def test_run_fails_when_nothing_can_be_run(tmp_path, monkeypatch):
106
+ monkeypatch.chdir(tmp_path)
107
+
108
+ result = runner.invoke(app)
109
+
110
+ assert result.exit_code == 1
111
+ assert "Nothing to run" in result.stdout
112
+ assert "bindai.toml" in result.stdout
113
+ assert "main.py" in result.stdout
114
+ assert "workflow.py" in result.stdout
@@ -0,0 +1,64 @@
1
+ import json
2
+
3
+ from bindai_cli.templates.validator import TemplateValidator
4
+
5
+
6
+ def test_validator_accepts_valid_template(tmp_path):
7
+ (tmp_path / "README.md").write_text("# Test\n", encoding="utf-8")
8
+ (tmp_path / "main.py").write_text("print('hello')\n", encoding="utf-8")
9
+
10
+ metadata = {
11
+ "name": "test-template",
12
+ "version": "0.1.0",
13
+ "category": "agent",
14
+ "description": "A test template.",
15
+ }
16
+
17
+ (tmp_path / "template.json").write_text(
18
+ json.dumps(metadata),
19
+ encoding="utf-8",
20
+ )
21
+
22
+ errors = TemplateValidator.validate(tmp_path)
23
+
24
+ assert errors == []
25
+
26
+
27
+ def test_validator_reports_missing_required_files(tmp_path):
28
+ errors = TemplateValidator.validate(tmp_path)
29
+
30
+ assert "Missing required file: README.md" in errors
31
+ assert "Missing required file: main.py" in errors
32
+
33
+
34
+ def test_validator_reports_missing_metadata_fields(tmp_path):
35
+ (tmp_path / "README.md").write_text("# Test\n", encoding="utf-8")
36
+ (tmp_path / "main.py").write_text("print('hello')\n", encoding="utf-8")
37
+
38
+ metadata = {
39
+ "name": "test-template",
40
+ }
41
+
42
+ (tmp_path / "template.json").write_text(
43
+ json.dumps(metadata),
44
+ encoding="utf-8",
45
+ )
46
+
47
+ errors = TemplateValidator.validate(tmp_path)
48
+
49
+ assert "template.json missing 'version'." in errors
50
+ assert "template.json missing 'category'." in errors
51
+ assert "template.json missing 'description'." in errors
52
+
53
+
54
+ def test_validator_reports_invalid_metadata(tmp_path):
55
+ (tmp_path / "README.md").write_text("# Test\n", encoding="utf-8")
56
+ (tmp_path / "main.py").write_text("print('hello')\n", encoding="utf-8")
57
+ (tmp_path / "template.json").write_text(
58
+ "{ invalid json",
59
+ encoding="utf-8",
60
+ )
61
+
62
+ errors = TemplateValidator.validate(tmp_path)
63
+
64
+ assert errors == ["Invalid template.json"]
bindai_cli-0.1.7/PKG-INFO DELETED
@@ -1,9 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: bindai-cli
3
- Version: 0.1.7
4
- Summary: BindAI Command Line Interface
5
- Requires-Python: >=3.11
6
- Requires-Dist: typer>=0.16
7
- Requires-Dist: rich>=14.0
8
- Requires-Dist: python-dotenv>=1.0
9
- Requires-Dist: bindai-config>=0.1.2
@@ -1,3 +0,0 @@
1
- # BindAI CLI
2
-
3
- Coming soon.
@@ -1 +0,0 @@
1
- __version__ = "0.1.7"
@@ -1,7 +0,0 @@
1
- from bindai import Agent
2
-
3
- agent = Agent(
4
- name="assistant",
5
- provider="openai",
6
- instructions="You are a helpful assistant built with BindAI.",
7
- )
@@ -1,14 +0,0 @@
1
- {
2
- "name": "workflow-basic",
3
- "title": "Workflow Basic",
4
- "description": "Starter workflow project.",
5
- "category": "workflow",
6
- "author": "BindBrain",
7
- "version": "1.0.0",
8
- "status": "stable",
9
- "tags": [
10
- "workflow",
11
- "automation",
12
- "beginner"
13
- ]
14
- }
@@ -1,9 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: bindai-cli
3
- Version: 0.1.7
4
- Summary: BindAI Command Line Interface
5
- Requires-Python: >=3.11
6
- Requires-Dist: typer>=0.16
7
- Requires-Dist: rich>=14.0
8
- Requires-Dist: python-dotenv>=1.0
9
- Requires-Dist: bindai-config>=0.1.2
File without changes