naas-abi-cli 1.3.0__py3-none-any.whl → 1.4.0__py3-none-any.whl

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.
@@ -0,0 +1,240 @@
1
+ Metadata-Version: 2.4
2
+ Name: naas-abi-cli
3
+ Version: 1.4.0
4
+ Summary: Abi cli allowing you to build your AI system.
5
+ Author-email: Maxime Jublou <maxime@naas.ai>, Florent Ravenel <florent@naas.ai>, Jeremy Ravenel <jeremy@naas.ai>
6
+ Requires-Python: <4,>=3.10
7
+ Requires-Dist: naas-abi-core[qdrant]>=1.1.2
8
+ Requires-Dist: naas-abi-marketplace[ai-chatgpt]>=1.1.0
9
+ Requires-Dist: naas-abi>=1.0.6
10
+ Description-Content-Type: text/markdown
11
+
12
+ # naas-abi-cli
13
+
14
+ Command Line Interface (CLI) tool for building and managing ABI (Agentic Brain Infrastructure) projects.
15
+
16
+ ## Overview
17
+
18
+ `naas-abi-cli` provides a comprehensive set of commands to create, configure, deploy, and interact with ABI projects. It serves as the primary entry point for developers working with the ABI framework, enabling quick project setup, agent interaction, and cloud deployment.
19
+
20
+ ## Installation
21
+
22
+ Install the CLI tool using pip:
23
+
24
+ ```bash
25
+ pip install naas-abi-cli
26
+ ```
27
+
28
+ ## Available Commands
29
+
30
+ ### Project Management
31
+
32
+ #### `abi new project <project-name> [project-path]`
33
+ Creates a new ABI project with all necessary starter files and dependencies.
34
+
35
+ **What it does:**
36
+ - Creates a new project directory (must be empty or non-existent)
37
+ - Generates project structure with configuration files, Docker setup, and Python package structure
38
+ - Automatically installs required dependencies (`naas-abi-core`, `naas-abi-marketplace`, `naas-abi`, and `naas-abi-cli`)
39
+ - Customizes project files with your project name
40
+
41
+ **Example:**
42
+ ```bash
43
+ abi new project my-abi-project
44
+ ```
45
+
46
+ #### `abi init <path>`
47
+ Initializes a new ABI project in the specified directory.
48
+
49
+ **Example:**
50
+ ```bash
51
+ abi init .
52
+ ```
53
+
54
+ ### Agent Interaction
55
+
56
+ #### `abi chat [module-name] [agent-name]`
57
+ Starts an interactive chat session with an AI agent.
58
+
59
+ **Parameters:**
60
+ - `module-name`: The module containing the agent (default: `naas_abi`)
61
+ - `agent-name`: The specific agent class to use (default: `AbiAgent`)
62
+
63
+ **What it does:**
64
+ - Loads the ABI engine and specified module
65
+ - Launches an interactive terminal chat interface
66
+ - Saves conversations to `storage/datastore/interfaces/terminal_agent/`
67
+
68
+ **Example:**
69
+ ```bash
70
+ abi chat naas_abi AbiAgent
71
+ ```
72
+
73
+ #### `abi agent list`
74
+ Lists all available agents across all loaded modules.
75
+
76
+ **What it does:**
77
+ - Loads the ABI engine with all configured modules
78
+ - Displays a formatted table showing module names and agent class names
79
+
80
+ **Example:**
81
+ ```bash
82
+ abi agent list
83
+ ```
84
+
85
+ ### Configuration Management
86
+
87
+ #### `abi config validate [--configuration-file <path>]`
88
+ Validates the ABI configuration file for correctness.
89
+
90
+ **Options:**
91
+ - `--configuration-file`: Path to configuration file (default: uses `config.yaml` from current directory)
92
+
93
+ **Example:**
94
+ ```bash
95
+ abi config validate
96
+ abi config validate --configuration-file config.prod.yaml
97
+ ```
98
+
99
+ #### `abi config render [--configuration-file <path>]`
100
+ Renders the loaded configuration as YAML output, useful for debugging and verification.
101
+
102
+ **Options:**
103
+ - `--configuration-file`: Path to configuration file (default: uses `config.yaml` from current directory)
104
+
105
+ **Example:**
106
+ ```bash
107
+ abi config render
108
+ ```
109
+
110
+ #### `abi module list`
111
+ Lists all available modules and their enabled/disabled status.
112
+
113
+ **What it does:**
114
+ - Loads the engine configuration
115
+ - Displays a formatted table showing module names and their enabled status
116
+
117
+ **Example:**
118
+ ```bash
119
+ abi module list
120
+ ```
121
+
122
+ ### Deployment
123
+
124
+ #### `abi deploy naas [-e/--env <environment>]`
125
+ Deploys your ABI project to Naas cloud infrastructure.
126
+
127
+ **Options:**
128
+ - `-e, --env`: Environment to use (default: `prod`). Determines which configuration file to load (e.g., `config.prod.yaml`, `config.yaml`)
129
+
130
+ **What it does:**
131
+ - Builds a Docker image of your ABI project
132
+ - Pushes the image to your Naas container registry
133
+ - Creates or updates a space on Naas infrastructure
134
+ - Exposes your ABI REST API at `https://{space-name}.default.space.naas.ai`
135
+
136
+ **Requirements:**
137
+ - Naas API key configured in your configuration file
138
+ - Docker installed and running
139
+ - Deploy section in your `config.yaml` file
140
+
141
+ **Example:**
142
+ ```bash
143
+ abi deploy naas
144
+ abi deploy naas --env prod
145
+ ```
146
+
147
+ ### Secret Management
148
+
149
+ #### `abi secrets naas list`
150
+ Lists all secrets stored in your Naas workspace.
151
+
152
+ **Options:**
153
+ - `--naas-api-key`: Naas API key (default: `NAAS_API_KEY` environment variable)
154
+ - `--naas-api-url`: Naas API URL (default: `https://api.naas.ai`)
155
+
156
+ **Example:**
157
+ ```bash
158
+ abi secrets naas list
159
+ ```
160
+
161
+ #### `abi secrets naas push-env-as-base64`
162
+ Pushes a local `.env` file to Naas as a base64-encoded secret.
163
+
164
+ **Options:**
165
+ - `--naas-api-key`: Naas API key (default: `NAAS_API_KEY` environment variable)
166
+ - `--naas-api-url`: Naas API URL (default: `https://api.naas.ai`)
167
+ - `--naas-secret-name`: Name for the secret in Naas (default: `abi_secrets`)
168
+ - `--env-file`: Path to the environment file (default: `.env.prod`)
169
+
170
+ **Example:**
171
+ ```bash
172
+ abi secrets naas push-env-as-base64 --env-file .env.prod
173
+ ```
174
+
175
+ #### `abi secrets naas get-base64-env`
176
+ Retrieves a base64-encoded secret from Naas and displays it as environment variables.
177
+
178
+ **Options:**
179
+ - `--naas-api-key`: Naas API key (default: `NAAS_API_KEY` environment variable)
180
+ - `--naas-api-url`: Naas API URL (default: `https://api.naas.ai`)
181
+ - `--naas-secret-name`: Name of the secret to retrieve (default: `abi_secrets`)
182
+
183
+ **Example:**
184
+ ```bash
185
+ abi secrets naas get-base64-env
186
+ ```
187
+
188
+ ### Script Execution
189
+
190
+ #### `abi run script <path>`
191
+ Runs a Python script in the context of a loaded ABI engine.
192
+
193
+ **What it does:**
194
+ - Loads the ABI engine with all configured modules
195
+ - Executes the specified Python script with access to the engine and all loaded modules
196
+
197
+ **Example:**
198
+ ```bash
199
+ abi run script scripts/my_script.py
200
+ ```
201
+
202
+ ## Architecture
203
+
204
+ The CLI is built using:
205
+ - **Click**: For command-line interface framework
206
+ - **naas-abi-core**: Core ABI engine and configuration management
207
+ - **naas-abi-marketplace**: Marketplace modules and agents
208
+ - **naas-abi**: Main ABI package
209
+
210
+ The CLI automatically detects if it's being run from within an ABI project (by checking for `pyproject.toml` with `naas-abi-cli` dependency) and uses `uv run` to ensure proper environment isolation.
211
+
212
+ ## Project Structure
213
+
214
+ When you create a new project with `abi new project`, the CLI:
215
+ 1. Uses template files from `cli/new/templates/project/`
216
+ 2. Customizes templates with your project name
217
+ 3. Sets up proper Python package structure
218
+ 4. Installs all required dependencies via `uv`
219
+
220
+ ## Integration with ABI Framework
221
+
222
+ The CLI integrates seamlessly with the ABI ecosystem:
223
+ - **Engine Loading**: Automatically loads modules and agents from your configuration
224
+ - **Configuration Management**: Validates and renders YAML configuration files
225
+ - **Cloud Deployment**: Handles Docker builds and Naas API interactions
226
+ - **Secret Management**: Integrates with Naas secret storage for secure credential management
227
+
228
+ ## Dependencies
229
+
230
+ - Python 3.10+
231
+ - `naas-abi>=1.0.6`
232
+ - `naas-abi-core[qdrant]>=1.1.2`
233
+ - `naas-abi-marketplace[ai-chatgpt]>=1.1.0`
234
+ - `uv` package manager (for dependency management)
235
+
236
+ ## See Also
237
+
238
+ - [ABI Main README](../../../README.md) - Complete ABI framework documentation
239
+ - [naas-abi-core](../naas-abi-core/) - Core engine documentation
240
+ - [naas-abi-marketplace](../naas-abi-marketplace/) - Marketplace modules documentation
@@ -21,7 +21,7 @@ naas_abi_cli/cli/new/templates/project/.github/workflows/release.yaml,sha256=7uV
21
21
  naas_abi_cli/cli/new/templates/project/{{project_name_snake}}/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  naas_abi_cli/cli/utils/Copier.py,sha256=YDYY9rxbL0TFB8IHKZc1ZR0w9tMUlX29jhVw4To8OQs,2640
23
23
  naas_abi_cli/cli/new/templates/project/config.yaml,sha256=XbH96_X2EFowSsM5yl3NjE9NzcwkLgsznx29bNlx0io,1362
24
- naas_abi_cli-1.3.0.dist-info/METADATA,sha256=5uCijesnAhnpIhqAvv0Jdr_Yq9DfPYUkXt5Y4vRvD9E,381
25
- naas_abi_cli-1.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
26
- naas_abi_cli-1.3.0.dist-info/entry_points.txt,sha256=ufNXhYVU3uo5dcZ8e1kdEJv1oh2Vons7LHJPg35cP4w,46
27
- naas_abi_cli-1.3.0.dist-info/RECORD,,
24
+ naas_abi_cli-1.4.0.dist-info/METADATA,sha256=UblkRiMIYF26TOpkqTphEI2sovcz_uhG_AHzUa8iBco,7201
25
+ naas_abi_cli-1.4.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
26
+ naas_abi_cli-1.4.0.dist-info/entry_points.txt,sha256=ufNXhYVU3uo5dcZ8e1kdEJv1oh2Vons7LHJPg35cP4w,46
27
+ naas_abi_cli-1.4.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: naas-abi-cli
3
- Version: 1.3.0
4
- Summary: Abi cli allowing you to build your AI system.
5
- Author-email: Maxime Jublou <maxime@naas.ai>, Florent Ravenel <florent@naas.ai>, Jeremy Ravenel <jeremy@naas.ai>
6
- Requires-Python: <4,>=3.10
7
- Requires-Dist: naas-abi-core[qdrant]>=1.1.2
8
- Requires-Dist: naas-abi-marketplace[ai-chatgpt]>=1.1.0
9
- Requires-Dist: naas-abi>=1.0.6