aiandme-cli 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.
- aiandme_cli-0.1.0/LICENSE +21 -0
- aiandme_cli-0.1.0/PKG-INFO +326 -0
- aiandme_cli-0.1.0/README.md +299 -0
- aiandme_cli-0.1.0/aiandme_cli/__init__.py +3 -0
- aiandme_cli-0.1.0/aiandme_cli/client.py +878 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/__init__.py +17 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/auth.py +74 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/docs.py +104 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/experiments.py +376 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/guardrails.py +130 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/init.py +417 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/logs.py +232 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/orgs.py +80 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/posture.py +224 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/projects.py +188 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/providers.py +337 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/scan.py +1 -0
- aiandme_cli-0.1.0/aiandme_cli/commands/test.py +440 -0
- aiandme_cli-0.1.0/aiandme_cli/config.py +40 -0
- aiandme_cli-0.1.0/aiandme_cli/exceptions.py +58 -0
- aiandme_cli-0.1.0/aiandme_cli/extractors/__init__.py +6 -0
- aiandme_cli-0.1.0/aiandme_cli/extractors/openapi.py +203 -0
- aiandme_cli-0.1.0/aiandme_cli/extractors/repo.py +305 -0
- aiandme_cli-0.1.0/aiandme_cli/main.py +156 -0
- aiandme_cli-0.1.0/aiandme_cli/pytest_plugin/__init__.py +209 -0
- aiandme_cli-0.1.0/aiandme_cli/pytest_plugin/fixtures.py +372 -0
- aiandme_cli-0.1.0/aiandme_cli/pytest_plugin/report.py +129 -0
- aiandme_cli-0.1.0/aiandme_cli.egg-info/PKG-INFO +326 -0
- aiandme_cli-0.1.0/aiandme_cli.egg-info/SOURCES.txt +37 -0
- aiandme_cli-0.1.0/aiandme_cli.egg-info/dependency_links.txt +1 -0
- aiandme_cli-0.1.0/aiandme_cli.egg-info/entry_points.txt +5 -0
- aiandme_cli-0.1.0/aiandme_cli.egg-info/requires.txt +11 -0
- aiandme_cli-0.1.0/aiandme_cli.egg-info/top_level.txt +3 -0
- aiandme_cli-0.1.0/pyproject.toml +58 -0
- aiandme_cli-0.1.0/setup.cfg +4 -0
- aiandme_cli-0.1.0/tests/__init__.py +1 -0
- aiandme_cli-0.1.0/tests/cli_integration_test.py +1593 -0
- aiandme_cli-0.1.0/tests/conftest.py +210 -0
- aiandme_cli-0.1.0/tests/test_cli_commands.py +188 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 AIandMe
|
|
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,326 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aiandme-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AIandMe CLI - command line interface for AI agent security testing.
|
|
5
|
+
Author-email: Kostas Siabanis <hello@aiandme.io>, Demetris Gerogiannis <hello@aiandme.io>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/aiandme-io/aiandme-cli
|
|
8
|
+
Project-URL: Documentation, https://docs.aiandme.io/cli
|
|
9
|
+
Project-URL: Issues, https://github.com/aiandme-io/aiandme-cli/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Framework :: Pytest
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: click>=8.1.0
|
|
19
|
+
Requires-Dist: rich>=13.0.0
|
|
20
|
+
Requires-Dist: requests>=2.32.0
|
|
21
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
22
|
+
Provides-Extra: pytest
|
|
23
|
+
Requires-Dist: pytest>=7.0.0; extra == "pytest"
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
27
|
+
|
|
28
|
+
# AIANDME(1) - AI Agent Security Testing CLI
|
|
29
|
+
|
|
30
|
+
## NAME
|
|
31
|
+
|
|
32
|
+
**aiandme** - command-line interface for AI agent security testing
|
|
33
|
+
|
|
34
|
+
## SYNOPSIS
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
aiandme [--base-url URL] COMMAND [OPTIONS] [ARGS]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## DESCRIPTION
|
|
41
|
+
|
|
42
|
+
AIandMe CLI provides security testing for AI chatbots and agents. Run adversarial tests, behavioral analysis, and export guardrails configurations.
|
|
43
|
+
|
|
44
|
+
## GETTING STARTED
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# 1. Install
|
|
48
|
+
pip install aiandme-cli
|
|
49
|
+
|
|
50
|
+
# 2. Authenticate (opens browser)
|
|
51
|
+
aiandme login
|
|
52
|
+
|
|
53
|
+
# 3. Select organisation
|
|
54
|
+
aiandme orgs list
|
|
55
|
+
aiandme switch <org-id>
|
|
56
|
+
|
|
57
|
+
# 4. Configure a model provider
|
|
58
|
+
aiandme providers add --name openai --api-key sk-...
|
|
59
|
+
|
|
60
|
+
# 5. Create a project from system prompt
|
|
61
|
+
aiandme init --name "My Bot" --prompt ./system_prompt.txt
|
|
62
|
+
|
|
63
|
+
# 6. Run security tests
|
|
64
|
+
aiandme test \
|
|
65
|
+
--chat-endpoint https://my-bot.com/chat \
|
|
66
|
+
--chat-header "Authorization: Bearer token"
|
|
67
|
+
|
|
68
|
+
# 7. Check status and results
|
|
69
|
+
aiandme status
|
|
70
|
+
aiandme logs
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## COMMANDS
|
|
76
|
+
|
|
77
|
+
### Authentication
|
|
78
|
+
|
|
79
|
+
| Command | Description |
|
|
80
|
+
|---------|-------------|
|
|
81
|
+
| `login` | Authenticate via browser (OAuth PKCE) |
|
|
82
|
+
| `logout` | Clear stored credentials |
|
|
83
|
+
| `whoami` | Show current authentication status |
|
|
84
|
+
|
|
85
|
+
### Organisation Management
|
|
86
|
+
|
|
87
|
+
| Command | Description |
|
|
88
|
+
|---------|-------------|
|
|
89
|
+
| `orgs list` | List available organisations |
|
|
90
|
+
| `orgs current` | Show current organisation |
|
|
91
|
+
| `switch <id>` | Switch to organisation |
|
|
92
|
+
|
|
93
|
+
### Provider Management
|
|
94
|
+
|
|
95
|
+
Providers are LLM configurations used for running security tests.
|
|
96
|
+
|
|
97
|
+
| Command | Description |
|
|
98
|
+
|---------|-------------|
|
|
99
|
+
| `providers list` | List configured providers |
|
|
100
|
+
| `providers add` | Add new provider |
|
|
101
|
+
| `providers update <id>` | Update provider config |
|
|
102
|
+
| `providers remove <id>` | Remove provider |
|
|
103
|
+
|
|
104
|
+
**providers add** options:
|
|
105
|
+
```
|
|
106
|
+
--name, -n Provider name: openai, claude, azureopenai, gemini, grok, custom
|
|
107
|
+
--api-key, -k API key
|
|
108
|
+
--endpoint, -e Endpoint URL (required for azureopenai, custom)
|
|
109
|
+
--model, -m Model name (optional)
|
|
110
|
+
--default Set as default provider
|
|
111
|
+
--interactive Interactive configuration mode
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Project Management
|
|
115
|
+
|
|
116
|
+
| Command | Description |
|
|
117
|
+
|---------|-------------|
|
|
118
|
+
| `projects list` | List projects |
|
|
119
|
+
| `projects use <id>` | Select project |
|
|
120
|
+
| `projects current` | Show current project |
|
|
121
|
+
| `projects show [id]` | Show project details |
|
|
122
|
+
|
|
123
|
+
**init** - Create project from various sources:
|
|
124
|
+
```
|
|
125
|
+
aiandme init --name NAME [OPTIONS]
|
|
126
|
+
|
|
127
|
+
--prompt PATH Extract scope from system prompt file
|
|
128
|
+
--endpoint URL Probe live chatbot endpoint
|
|
129
|
+
--repo PATH Scan repository for prompts/tools
|
|
130
|
+
--openapi PATH Parse OpenAPI specification
|
|
131
|
+
--description Project description
|
|
132
|
+
--yes, -y Skip confirmation prompts
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Test Execution
|
|
136
|
+
|
|
137
|
+
**test** - Run security tests on current project:
|
|
138
|
+
```
|
|
139
|
+
aiandme test [OPTIONS]
|
|
140
|
+
|
|
141
|
+
Test Category:
|
|
142
|
+
--test-category, -t Test to run (default: owasp_multi_turn)
|
|
143
|
+
Values: owasp_single_turn, owasp_multi_turn,
|
|
144
|
+
owasp_agentic_multi_turn, owasp_adaptive,
|
|
145
|
+
behavioral
|
|
146
|
+
|
|
147
|
+
Testing Level:
|
|
148
|
+
--testing-level, -l Depth of testing (default: unit)
|
|
149
|
+
unit (~20 min), system (~45 min), acceptance (~90 min)
|
|
150
|
+
|
|
151
|
+
Chat Endpoint (required):
|
|
152
|
+
--chat-endpoint Chat completion URL of the bot to test
|
|
153
|
+
--chat-header Header for chat endpoint (repeatable)
|
|
154
|
+
--chat-payload JSON payload template for chat
|
|
155
|
+
|
|
156
|
+
Init Endpoint (optional):
|
|
157
|
+
--init-endpoint Thread initialization URL
|
|
158
|
+
--init-header Header for init endpoint (repeatable)
|
|
159
|
+
--init-payload JSON payload for init
|
|
160
|
+
|
|
161
|
+
Auth Endpoint (optional):
|
|
162
|
+
--auth-endpoint Auth/token endpoint URL
|
|
163
|
+
--auth-header Header for auth endpoint (repeatable)
|
|
164
|
+
--auth-payload JSON payload for auth
|
|
165
|
+
|
|
166
|
+
Other:
|
|
167
|
+
--provider-id Provider to use (default: first available)
|
|
168
|
+
--name, -n Experiment name (auto-generated if omitted)
|
|
169
|
+
--lang Language (default: english). Accepts codes: en, de, es...
|
|
170
|
+
--streaming Enable streaming mode (requires wss:// endpoint)
|
|
171
|
+
--no-auto-start Create without starting (manual mode)
|
|
172
|
+
--wait, -w Wait for completion
|
|
173
|
+
--fail-on SEVERITY Exit non-zero if findings >= severity
|
|
174
|
+
Values: critical, high, medium, low, any
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Experiment Management
|
|
178
|
+
|
|
179
|
+
| Command | Description |
|
|
180
|
+
|---------|-------------|
|
|
181
|
+
| `experiments list` | List experiments |
|
|
182
|
+
| `experiments show <id>` | Show experiment details |
|
|
183
|
+
| `experiments status <id>` | Check status |
|
|
184
|
+
| `experiments status <id> --watch` | Watch until completion |
|
|
185
|
+
| `experiments wait <id>` | Wait with progressive backoff |
|
|
186
|
+
| `experiments logs <id>` | List experiment logs |
|
|
187
|
+
| `experiments report <id>` | Download HTML report |
|
|
188
|
+
|
|
189
|
+
**experiments wait** options:
|
|
190
|
+
```
|
|
191
|
+
--timeout MINUTES Max wait time (default: 120)
|
|
192
|
+
```
|
|
193
|
+
Progressive backoff: 30s → 60s → 120s → 300s
|
|
194
|
+
|
|
195
|
+
**status** (top-level alias):
|
|
196
|
+
```
|
|
197
|
+
aiandme status [experiment_id] [--watch]
|
|
198
|
+
```
|
|
199
|
+
Without ID, shows most recent experiment.
|
|
200
|
+
|
|
201
|
+
### Results & Export
|
|
202
|
+
|
|
203
|
+
**logs** - View experiment results:
|
|
204
|
+
```
|
|
205
|
+
aiandme logs [experiment_id] [OPTIONS]
|
|
206
|
+
|
|
207
|
+
--format Output format: table, json, csv (default: table)
|
|
208
|
+
--verdict Filter by verdict: pass, fail
|
|
209
|
+
--page Page number
|
|
210
|
+
--size Items per page
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**posture** - Security posture score:
|
|
214
|
+
```
|
|
215
|
+
aiandme posture [--json]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**guardrails** - Export guardrails configuration:
|
|
219
|
+
```
|
|
220
|
+
aiandme guardrails [OPTIONS]
|
|
221
|
+
|
|
222
|
+
--vendor Target vendor: aiandme, openai, azure, bedrock
|
|
223
|
+
--format Output format: json, yaml (default: json)
|
|
224
|
+
--output, -o Output file path
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Documentation
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
aiandme docs [TOPIC]
|
|
231
|
+
```
|
|
232
|
+
Opens documentation in browser. Topics: quickstart, api, cli, concepts, testing.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## CONFIGURATION
|
|
237
|
+
|
|
238
|
+
### Environment Variables
|
|
239
|
+
|
|
240
|
+
| Variable | Description | Default |
|
|
241
|
+
|----------|-------------|---------|
|
|
242
|
+
| `AIANDME_BASE_URL` | API base URL | https://api.aiandme.io |
|
|
243
|
+
| `AIANDME_AUTH0_DOMAIN` | Auth0 domain (on-prem) | aiandme.eu.auth0.com |
|
|
244
|
+
| `AIANDME_AUTH0_CLIENT_ID` | Auth0 client ID (on-prem) | - |
|
|
245
|
+
|
|
246
|
+
### On-premises
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
export AIANDME_BASE_URL=https://api.your-domain.com
|
|
250
|
+
aiandme login
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## FILES
|
|
256
|
+
|
|
257
|
+
| Path | Description |
|
|
258
|
+
|------|-------------|
|
|
259
|
+
| `~/.aiandme/` | Configuration directory |
|
|
260
|
+
| `~/.aiandme/credentials.json` | Auth tokens (mode 600) |
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## EXIT STATUS
|
|
265
|
+
|
|
266
|
+
| Code | Meaning |
|
|
267
|
+
|------|---------|
|
|
268
|
+
| 0 | Success |
|
|
269
|
+
| 1 | Error or test failure (with `--fail-on`) |
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## EXAMPLES
|
|
274
|
+
|
|
275
|
+
### Basic workflow
|
|
276
|
+
```bash
|
|
277
|
+
aiandme login
|
|
278
|
+
aiandme switch abc123
|
|
279
|
+
aiandme projects use def456
|
|
280
|
+
aiandme test --chat-endpoint https://bot.com/chat
|
|
281
|
+
aiandme status --watch
|
|
282
|
+
aiandme logs
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### CI/CD integration
|
|
286
|
+
```bash
|
|
287
|
+
aiandme test \
|
|
288
|
+
--chat-endpoint $BOT_ENDPOINT \
|
|
289
|
+
--chat-header "Authorization: Bearer $BOT_TOKEN" \
|
|
290
|
+
--testing-level system \
|
|
291
|
+
--wait \
|
|
292
|
+
--fail-on high
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Multi-endpoint bot with auth
|
|
296
|
+
```bash
|
|
297
|
+
aiandme test \
|
|
298
|
+
--auth-endpoint https://bot.com/oauth/token \
|
|
299
|
+
--auth-payload '{"client_id":"x","client_secret":"y"}' \
|
|
300
|
+
--init-endpoint https://bot.com/threads \
|
|
301
|
+
--init-header "Content-Type: application/json" \
|
|
302
|
+
--chat-endpoint https://bot.com/chat \
|
|
303
|
+
--chat-header "Content-Type: application/json" \
|
|
304
|
+
--chat-payload '{"messages":[{"role":"user","content":"$PROMPT"}]}'
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Export guardrails for OpenAI
|
|
308
|
+
```bash
|
|
309
|
+
aiandme guardrails --vendor openai --format json -o guardrails.json
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Create project from repository
|
|
313
|
+
```bash
|
|
314
|
+
aiandme init \
|
|
315
|
+
--name "Support Bot" \
|
|
316
|
+
--repo ./my-agent \
|
|
317
|
+
--prompt ./prompts/system.txt
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## SEE ALSO
|
|
323
|
+
|
|
324
|
+
- Documentation: https://docs.aiandme.io
|
|
325
|
+
- API Reference: https://docs.aiandme.io/api
|
|
326
|
+
- GitHub: https://github.com/aiandme/cli
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# AIANDME(1) - AI Agent Security Testing CLI
|
|
2
|
+
|
|
3
|
+
## NAME
|
|
4
|
+
|
|
5
|
+
**aiandme** - command-line interface for AI agent security testing
|
|
6
|
+
|
|
7
|
+
## SYNOPSIS
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
aiandme [--base-url URL] COMMAND [OPTIONS] [ARGS]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## DESCRIPTION
|
|
14
|
+
|
|
15
|
+
AIandMe CLI provides security testing for AI chatbots and agents. Run adversarial tests, behavioral analysis, and export guardrails configurations.
|
|
16
|
+
|
|
17
|
+
## GETTING STARTED
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# 1. Install
|
|
21
|
+
pip install aiandme-cli
|
|
22
|
+
|
|
23
|
+
# 2. Authenticate (opens browser)
|
|
24
|
+
aiandme login
|
|
25
|
+
|
|
26
|
+
# 3. Select organisation
|
|
27
|
+
aiandme orgs list
|
|
28
|
+
aiandme switch <org-id>
|
|
29
|
+
|
|
30
|
+
# 4. Configure a model provider
|
|
31
|
+
aiandme providers add --name openai --api-key sk-...
|
|
32
|
+
|
|
33
|
+
# 5. Create a project from system prompt
|
|
34
|
+
aiandme init --name "My Bot" --prompt ./system_prompt.txt
|
|
35
|
+
|
|
36
|
+
# 6. Run security tests
|
|
37
|
+
aiandme test \
|
|
38
|
+
--chat-endpoint https://my-bot.com/chat \
|
|
39
|
+
--chat-header "Authorization: Bearer token"
|
|
40
|
+
|
|
41
|
+
# 7. Check status and results
|
|
42
|
+
aiandme status
|
|
43
|
+
aiandme logs
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## COMMANDS
|
|
49
|
+
|
|
50
|
+
### Authentication
|
|
51
|
+
|
|
52
|
+
| Command | Description |
|
|
53
|
+
|---------|-------------|
|
|
54
|
+
| `login` | Authenticate via browser (OAuth PKCE) |
|
|
55
|
+
| `logout` | Clear stored credentials |
|
|
56
|
+
| `whoami` | Show current authentication status |
|
|
57
|
+
|
|
58
|
+
### Organisation Management
|
|
59
|
+
|
|
60
|
+
| Command | Description |
|
|
61
|
+
|---------|-------------|
|
|
62
|
+
| `orgs list` | List available organisations |
|
|
63
|
+
| `orgs current` | Show current organisation |
|
|
64
|
+
| `switch <id>` | Switch to organisation |
|
|
65
|
+
|
|
66
|
+
### Provider Management
|
|
67
|
+
|
|
68
|
+
Providers are LLM configurations used for running security tests.
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
|---------|-------------|
|
|
72
|
+
| `providers list` | List configured providers |
|
|
73
|
+
| `providers add` | Add new provider |
|
|
74
|
+
| `providers update <id>` | Update provider config |
|
|
75
|
+
| `providers remove <id>` | Remove provider |
|
|
76
|
+
|
|
77
|
+
**providers add** options:
|
|
78
|
+
```
|
|
79
|
+
--name, -n Provider name: openai, claude, azureopenai, gemini, grok, custom
|
|
80
|
+
--api-key, -k API key
|
|
81
|
+
--endpoint, -e Endpoint URL (required for azureopenai, custom)
|
|
82
|
+
--model, -m Model name (optional)
|
|
83
|
+
--default Set as default provider
|
|
84
|
+
--interactive Interactive configuration mode
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Project Management
|
|
88
|
+
|
|
89
|
+
| Command | Description |
|
|
90
|
+
|---------|-------------|
|
|
91
|
+
| `projects list` | List projects |
|
|
92
|
+
| `projects use <id>` | Select project |
|
|
93
|
+
| `projects current` | Show current project |
|
|
94
|
+
| `projects show [id]` | Show project details |
|
|
95
|
+
|
|
96
|
+
**init** - Create project from various sources:
|
|
97
|
+
```
|
|
98
|
+
aiandme init --name NAME [OPTIONS]
|
|
99
|
+
|
|
100
|
+
--prompt PATH Extract scope from system prompt file
|
|
101
|
+
--endpoint URL Probe live chatbot endpoint
|
|
102
|
+
--repo PATH Scan repository for prompts/tools
|
|
103
|
+
--openapi PATH Parse OpenAPI specification
|
|
104
|
+
--description Project description
|
|
105
|
+
--yes, -y Skip confirmation prompts
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Test Execution
|
|
109
|
+
|
|
110
|
+
**test** - Run security tests on current project:
|
|
111
|
+
```
|
|
112
|
+
aiandme test [OPTIONS]
|
|
113
|
+
|
|
114
|
+
Test Category:
|
|
115
|
+
--test-category, -t Test to run (default: owasp_multi_turn)
|
|
116
|
+
Values: owasp_single_turn, owasp_multi_turn,
|
|
117
|
+
owasp_agentic_multi_turn, owasp_adaptive,
|
|
118
|
+
behavioral
|
|
119
|
+
|
|
120
|
+
Testing Level:
|
|
121
|
+
--testing-level, -l Depth of testing (default: unit)
|
|
122
|
+
unit (~20 min), system (~45 min), acceptance (~90 min)
|
|
123
|
+
|
|
124
|
+
Chat Endpoint (required):
|
|
125
|
+
--chat-endpoint Chat completion URL of the bot to test
|
|
126
|
+
--chat-header Header for chat endpoint (repeatable)
|
|
127
|
+
--chat-payload JSON payload template for chat
|
|
128
|
+
|
|
129
|
+
Init Endpoint (optional):
|
|
130
|
+
--init-endpoint Thread initialization URL
|
|
131
|
+
--init-header Header for init endpoint (repeatable)
|
|
132
|
+
--init-payload JSON payload for init
|
|
133
|
+
|
|
134
|
+
Auth Endpoint (optional):
|
|
135
|
+
--auth-endpoint Auth/token endpoint URL
|
|
136
|
+
--auth-header Header for auth endpoint (repeatable)
|
|
137
|
+
--auth-payload JSON payload for auth
|
|
138
|
+
|
|
139
|
+
Other:
|
|
140
|
+
--provider-id Provider to use (default: first available)
|
|
141
|
+
--name, -n Experiment name (auto-generated if omitted)
|
|
142
|
+
--lang Language (default: english). Accepts codes: en, de, es...
|
|
143
|
+
--streaming Enable streaming mode (requires wss:// endpoint)
|
|
144
|
+
--no-auto-start Create without starting (manual mode)
|
|
145
|
+
--wait, -w Wait for completion
|
|
146
|
+
--fail-on SEVERITY Exit non-zero if findings >= severity
|
|
147
|
+
Values: critical, high, medium, low, any
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Experiment Management
|
|
151
|
+
|
|
152
|
+
| Command | Description |
|
|
153
|
+
|---------|-------------|
|
|
154
|
+
| `experiments list` | List experiments |
|
|
155
|
+
| `experiments show <id>` | Show experiment details |
|
|
156
|
+
| `experiments status <id>` | Check status |
|
|
157
|
+
| `experiments status <id> --watch` | Watch until completion |
|
|
158
|
+
| `experiments wait <id>` | Wait with progressive backoff |
|
|
159
|
+
| `experiments logs <id>` | List experiment logs |
|
|
160
|
+
| `experiments report <id>` | Download HTML report |
|
|
161
|
+
|
|
162
|
+
**experiments wait** options:
|
|
163
|
+
```
|
|
164
|
+
--timeout MINUTES Max wait time (default: 120)
|
|
165
|
+
```
|
|
166
|
+
Progressive backoff: 30s → 60s → 120s → 300s
|
|
167
|
+
|
|
168
|
+
**status** (top-level alias):
|
|
169
|
+
```
|
|
170
|
+
aiandme status [experiment_id] [--watch]
|
|
171
|
+
```
|
|
172
|
+
Without ID, shows most recent experiment.
|
|
173
|
+
|
|
174
|
+
### Results & Export
|
|
175
|
+
|
|
176
|
+
**logs** - View experiment results:
|
|
177
|
+
```
|
|
178
|
+
aiandme logs [experiment_id] [OPTIONS]
|
|
179
|
+
|
|
180
|
+
--format Output format: table, json, csv (default: table)
|
|
181
|
+
--verdict Filter by verdict: pass, fail
|
|
182
|
+
--page Page number
|
|
183
|
+
--size Items per page
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**posture** - Security posture score:
|
|
187
|
+
```
|
|
188
|
+
aiandme posture [--json]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**guardrails** - Export guardrails configuration:
|
|
192
|
+
```
|
|
193
|
+
aiandme guardrails [OPTIONS]
|
|
194
|
+
|
|
195
|
+
--vendor Target vendor: aiandme, openai, azure, bedrock
|
|
196
|
+
--format Output format: json, yaml (default: json)
|
|
197
|
+
--output, -o Output file path
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Documentation
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
aiandme docs [TOPIC]
|
|
204
|
+
```
|
|
205
|
+
Opens documentation in browser. Topics: quickstart, api, cli, concepts, testing.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## CONFIGURATION
|
|
210
|
+
|
|
211
|
+
### Environment Variables
|
|
212
|
+
|
|
213
|
+
| Variable | Description | Default |
|
|
214
|
+
|----------|-------------|---------|
|
|
215
|
+
| `AIANDME_BASE_URL` | API base URL | https://api.aiandme.io |
|
|
216
|
+
| `AIANDME_AUTH0_DOMAIN` | Auth0 domain (on-prem) | aiandme.eu.auth0.com |
|
|
217
|
+
| `AIANDME_AUTH0_CLIENT_ID` | Auth0 client ID (on-prem) | - |
|
|
218
|
+
|
|
219
|
+
### On-premises
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
export AIANDME_BASE_URL=https://api.your-domain.com
|
|
223
|
+
aiandme login
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## FILES
|
|
229
|
+
|
|
230
|
+
| Path | Description |
|
|
231
|
+
|------|-------------|
|
|
232
|
+
| `~/.aiandme/` | Configuration directory |
|
|
233
|
+
| `~/.aiandme/credentials.json` | Auth tokens (mode 600) |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## EXIT STATUS
|
|
238
|
+
|
|
239
|
+
| Code | Meaning |
|
|
240
|
+
|------|---------|
|
|
241
|
+
| 0 | Success |
|
|
242
|
+
| 1 | Error or test failure (with `--fail-on`) |
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## EXAMPLES
|
|
247
|
+
|
|
248
|
+
### Basic workflow
|
|
249
|
+
```bash
|
|
250
|
+
aiandme login
|
|
251
|
+
aiandme switch abc123
|
|
252
|
+
aiandme projects use def456
|
|
253
|
+
aiandme test --chat-endpoint https://bot.com/chat
|
|
254
|
+
aiandme status --watch
|
|
255
|
+
aiandme logs
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### CI/CD integration
|
|
259
|
+
```bash
|
|
260
|
+
aiandme test \
|
|
261
|
+
--chat-endpoint $BOT_ENDPOINT \
|
|
262
|
+
--chat-header "Authorization: Bearer $BOT_TOKEN" \
|
|
263
|
+
--testing-level system \
|
|
264
|
+
--wait \
|
|
265
|
+
--fail-on high
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Multi-endpoint bot with auth
|
|
269
|
+
```bash
|
|
270
|
+
aiandme test \
|
|
271
|
+
--auth-endpoint https://bot.com/oauth/token \
|
|
272
|
+
--auth-payload '{"client_id":"x","client_secret":"y"}' \
|
|
273
|
+
--init-endpoint https://bot.com/threads \
|
|
274
|
+
--init-header "Content-Type: application/json" \
|
|
275
|
+
--chat-endpoint https://bot.com/chat \
|
|
276
|
+
--chat-header "Content-Type: application/json" \
|
|
277
|
+
--chat-payload '{"messages":[{"role":"user","content":"$PROMPT"}]}'
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Export guardrails for OpenAI
|
|
281
|
+
```bash
|
|
282
|
+
aiandme guardrails --vendor openai --format json -o guardrails.json
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Create project from repository
|
|
286
|
+
```bash
|
|
287
|
+
aiandme init \
|
|
288
|
+
--name "Support Bot" \
|
|
289
|
+
--repo ./my-agent \
|
|
290
|
+
--prompt ./prompts/system.txt
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## SEE ALSO
|
|
296
|
+
|
|
297
|
+
- Documentation: https://docs.aiandme.io
|
|
298
|
+
- API Reference: https://docs.aiandme.io/api
|
|
299
|
+
- GitHub: https://github.com/aiandme/cli
|