asp-cli 0.1.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.
- asp_cli/__init__.py +1 -0
- asp_cli/api_client.py +118 -0
- asp_cli/config.py +176 -0
- asp_cli/errors.py +26 -0
- asp_cli/main.py +1461 -0
- asp_cli/output.py +66 -0
- asp_cli/py.typed +0 -0
- asp_cli/spec/__init__.py +0 -0
- asp_cli/spec/operations.json +404 -0
- asp_cli-0.1.0.dist-info/METADATA +54 -0
- asp_cli-0.1.0.dist-info/RECORD +14 -0
- asp_cli-0.1.0.dist-info/WHEEL +4 -0
- asp_cli-0.1.0.dist-info/entry_points.txt +2 -0
- asp_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
asp_cli/output.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from enum import Enum
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from rich.table import Table
|
|
9
|
+
|
|
10
|
+
from .errors import CliError
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class OutputFormat(str, Enum):
|
|
14
|
+
human = "human"
|
|
15
|
+
json = "json"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def emit_success(
|
|
19
|
+
console: Console,
|
|
20
|
+
*,
|
|
21
|
+
output: OutputFormat,
|
|
22
|
+
operation: str,
|
|
23
|
+
data: Any,
|
|
24
|
+
meta: dict[str, Any] | None = None,
|
|
25
|
+
human: str | None = None,
|
|
26
|
+
) -> None:
|
|
27
|
+
if output == OutputFormat.json:
|
|
28
|
+
payload = {
|
|
29
|
+
"data": data,
|
|
30
|
+
"meta": {
|
|
31
|
+
"operation": operation,
|
|
32
|
+
**(meta or {}),
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
console.print(json.dumps(payload, ensure_ascii=False, indent=2))
|
|
36
|
+
return
|
|
37
|
+
if human is not None:
|
|
38
|
+
console.print(human)
|
|
39
|
+
return
|
|
40
|
+
console.print(data)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def emit_error(console: Console, *, output: OutputFormat, error: CliError, operation: str | None = None) -> None:
|
|
44
|
+
if output == OutputFormat.json:
|
|
45
|
+
payload = {
|
|
46
|
+
"error": {
|
|
47
|
+
"code": error.code,
|
|
48
|
+
"message": error.message,
|
|
49
|
+
"details": error.details,
|
|
50
|
+
},
|
|
51
|
+
"meta": {
|
|
52
|
+
"operation": operation,
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
console.print(json.dumps(payload, ensure_ascii=False, indent=2))
|
|
56
|
+
return
|
|
57
|
+
console.print(f"Error: {error.message}", style="bold red")
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def key_value_table(title: str, rows: list[tuple[str, Any]]) -> Table:
|
|
61
|
+
table = Table(title=title, show_header=False)
|
|
62
|
+
table.add_column("Key", style="cyan", no_wrap=True)
|
|
63
|
+
table.add_column("Value")
|
|
64
|
+
for key, value in rows:
|
|
65
|
+
table.add_row(key, "" if value is None else str(value))
|
|
66
|
+
return table
|
asp_cli/py.typed
ADDED
|
File without changes
|
asp_cli/spec/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "0.1.0",
|
|
3
|
+
"api_version": "v1",
|
|
4
|
+
"min_cli_version": "0.1.0",
|
|
5
|
+
"operations": [
|
|
6
|
+
{
|
|
7
|
+
"id": "agent.version",
|
|
8
|
+
"cli_path": "doctor",
|
|
9
|
+
"method": "GET",
|
|
10
|
+
"endpoint": "/api/agent/v1/version/",
|
|
11
|
+
"permission": "authenticated",
|
|
12
|
+
"capabilities": ["agent.version"],
|
|
13
|
+
"aliases": [],
|
|
14
|
+
"examples": [
|
|
15
|
+
"asp doctor",
|
|
16
|
+
"asp doctor --output json"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "auth.login",
|
|
21
|
+
"cli_path": "auth login",
|
|
22
|
+
"method": "local",
|
|
23
|
+
"endpoint": null,
|
|
24
|
+
"permission": "local",
|
|
25
|
+
"capabilities": [],
|
|
26
|
+
"aliases": [],
|
|
27
|
+
"examples": [
|
|
28
|
+
"asp auth login --api-url https://asp.example.com --api-key asp_xxx"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "auth.status",
|
|
33
|
+
"cli_path": "auth status",
|
|
34
|
+
"method": "GET",
|
|
35
|
+
"endpoint": "/api/agent/v1/version/",
|
|
36
|
+
"permission": "authenticated",
|
|
37
|
+
"capabilities": ["agent.version"],
|
|
38
|
+
"aliases": [],
|
|
39
|
+
"examples": [
|
|
40
|
+
"asp auth status",
|
|
41
|
+
"asp auth status --output json"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "auth.logout",
|
|
46
|
+
"cli_path": "auth logout",
|
|
47
|
+
"method": "local",
|
|
48
|
+
"endpoint": null,
|
|
49
|
+
"permission": "local",
|
|
50
|
+
"capabilities": [],
|
|
51
|
+
"aliases": [],
|
|
52
|
+
"examples": [
|
|
53
|
+
"asp auth logout"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "config.list",
|
|
58
|
+
"cli_path": "config list",
|
|
59
|
+
"method": "local",
|
|
60
|
+
"endpoint": null,
|
|
61
|
+
"permission": "local",
|
|
62
|
+
"capabilities": [],
|
|
63
|
+
"aliases": [],
|
|
64
|
+
"examples": [
|
|
65
|
+
"asp config list",
|
|
66
|
+
"asp --output json config list"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "config.get",
|
|
71
|
+
"cli_path": "config get",
|
|
72
|
+
"method": "local",
|
|
73
|
+
"endpoint": null,
|
|
74
|
+
"permission": "local",
|
|
75
|
+
"capabilities": [],
|
|
76
|
+
"aliases": [],
|
|
77
|
+
"examples": [
|
|
78
|
+
"asp config get api_url"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "config.set",
|
|
83
|
+
"cli_path": "config set",
|
|
84
|
+
"method": "local",
|
|
85
|
+
"endpoint": null,
|
|
86
|
+
"permission": "local",
|
|
87
|
+
"capabilities": [],
|
|
88
|
+
"aliases": [],
|
|
89
|
+
"examples": [
|
|
90
|
+
"asp config set api_url https://asp.example.com"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "case.list",
|
|
95
|
+
"cli_path": "case list",
|
|
96
|
+
"method": "GET",
|
|
97
|
+
"endpoint": "/api/agent/v1/cases/",
|
|
98
|
+
"permission": "authenticated",
|
|
99
|
+
"capabilities": ["case.list"],
|
|
100
|
+
"aliases": ["list_cases"],
|
|
101
|
+
"examples": ["asp case list --status New --output json"]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "case.show",
|
|
105
|
+
"cli_path": "case show",
|
|
106
|
+
"method": "GET",
|
|
107
|
+
"endpoint": "/api/agent/v1/cases/{case_id}/",
|
|
108
|
+
"permission": "authenticated",
|
|
109
|
+
"capabilities": ["case.show"],
|
|
110
|
+
"aliases": ["list_cases(case_id=...)"],
|
|
111
|
+
"examples": ["asp case show case_000001 --output json"]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"id": "case.update_ai",
|
|
115
|
+
"cli_path": "case update-ai",
|
|
116
|
+
"method": "PATCH",
|
|
117
|
+
"endpoint": "/api/agent/v1/cases/{case_id}/ai-analysis/",
|
|
118
|
+
"permission": "business_writer",
|
|
119
|
+
"capabilities": ["case.update_ai"],
|
|
120
|
+
"aliases": ["update_case"],
|
|
121
|
+
"examples": ["asp case update-ai case_000001 --summary-file summary.md --output json"]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "alert.list",
|
|
125
|
+
"cli_path": "alert list",
|
|
126
|
+
"method": "GET",
|
|
127
|
+
"endpoint": "/api/agent/v1/alerts/",
|
|
128
|
+
"permission": "authenticated",
|
|
129
|
+
"capabilities": ["alert.list"],
|
|
130
|
+
"aliases": ["list_alerts"],
|
|
131
|
+
"examples": ["asp alert list --case-id case_000001 --output json"]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "alert.show",
|
|
135
|
+
"cli_path": "alert show",
|
|
136
|
+
"method": "GET",
|
|
137
|
+
"endpoint": "/api/agent/v1/alerts/{alert_id}/",
|
|
138
|
+
"permission": "authenticated",
|
|
139
|
+
"capabilities": ["alert.show"],
|
|
140
|
+
"aliases": ["list_alerts(alert_id=...)"],
|
|
141
|
+
"examples": ["asp alert show alert_000001 --output json"]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "artifact.list",
|
|
145
|
+
"cli_path": "artifact list",
|
|
146
|
+
"method": "GET",
|
|
147
|
+
"endpoint": "/api/agent/v1/artifacts/",
|
|
148
|
+
"permission": "authenticated",
|
|
149
|
+
"capabilities": ["artifact.list"],
|
|
150
|
+
"aliases": ["list_artifacts"],
|
|
151
|
+
"examples": ["asp artifact list --type \"IP Address\" --output json"]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "artifact.show",
|
|
155
|
+
"cli_path": "artifact show",
|
|
156
|
+
"method": "GET",
|
|
157
|
+
"endpoint": "/api/agent/v1/artifacts/{artifact_id}/",
|
|
158
|
+
"permission": "authenticated",
|
|
159
|
+
"capabilities": ["artifact.show"],
|
|
160
|
+
"aliases": ["list_artifacts(artifact_id=...)"],
|
|
161
|
+
"examples": ["asp artifact show artifact_000001 --output json"]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "knowledge.search",
|
|
165
|
+
"cli_path": "knowledge search",
|
|
166
|
+
"method": "GET",
|
|
167
|
+
"endpoint": "/api/agent/v1/knowledge/",
|
|
168
|
+
"permission": "authenticated",
|
|
169
|
+
"capabilities": ["knowledge.search"],
|
|
170
|
+
"aliases": ["search_knowledge"],
|
|
171
|
+
"examples": ["asp knowledge search phishing --output json"]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "knowledge.show",
|
|
175
|
+
"cli_path": "knowledge show",
|
|
176
|
+
"method": "GET",
|
|
177
|
+
"endpoint": "/api/agent/v1/knowledge/{knowledge_id}/",
|
|
178
|
+
"permission": "authenticated",
|
|
179
|
+
"capabilities": ["knowledge.show"],
|
|
180
|
+
"aliases": [],
|
|
181
|
+
"examples": ["asp knowledge show knowledge_000001 --output json"]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "knowledge.update",
|
|
185
|
+
"cli_path": "knowledge update",
|
|
186
|
+
"method": "PATCH",
|
|
187
|
+
"endpoint": "/api/agent/v1/knowledge/{knowledge_id}/",
|
|
188
|
+
"permission": "business_writer",
|
|
189
|
+
"capabilities": ["knowledge.update"],
|
|
190
|
+
"aliases": ["update_knowledge"],
|
|
191
|
+
"examples": ["asp knowledge update knowledge_000001 --body-file note.md --output json"]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "comment.list",
|
|
195
|
+
"cli_path": "comment list",
|
|
196
|
+
"method": "GET",
|
|
197
|
+
"endpoint": "/api/agent/v1/comments/",
|
|
198
|
+
"permission": "authenticated",
|
|
199
|
+
"capabilities": ["comment.list"],
|
|
200
|
+
"aliases": [],
|
|
201
|
+
"examples": ["asp comment list case_000001 --output json"]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "comment.add",
|
|
205
|
+
"cli_path": "comment add",
|
|
206
|
+
"method": "POST",
|
|
207
|
+
"endpoint": "/api/agent/v1/comments/",
|
|
208
|
+
"permission": "business_writer",
|
|
209
|
+
"capabilities": ["comment.add"],
|
|
210
|
+
"aliases": ["add_comment"],
|
|
211
|
+
"examples": ["asp comment add case_000001 --body-file note.md --output json"]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"id": "file.upload",
|
|
215
|
+
"cli_path": "file upload",
|
|
216
|
+
"method": "POST",
|
|
217
|
+
"endpoint": "/api/agent/v1/files/",
|
|
218
|
+
"permission": "authenticated",
|
|
219
|
+
"capabilities": ["file.upload"],
|
|
220
|
+
"aliases": [],
|
|
221
|
+
"examples": ["asp file upload evidence.txt --output json"]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"id": "file.info",
|
|
225
|
+
"cli_path": "file info",
|
|
226
|
+
"method": "GET",
|
|
227
|
+
"endpoint": "/api/agent/v1/files/{file_key}/",
|
|
228
|
+
"permission": "authenticated",
|
|
229
|
+
"capabilities": ["file.info"],
|
|
230
|
+
"aliases": ["get_file"],
|
|
231
|
+
"examples": ["asp file info 6f2c5d7e-31c6-4f48-9e3c-6d9b5f92c457 --output json"]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "file.download",
|
|
235
|
+
"cli_path": "file download",
|
|
236
|
+
"method": "GET",
|
|
237
|
+
"endpoint": "/api/agent/v1/files/{file_key}/",
|
|
238
|
+
"permission": "authenticated",
|
|
239
|
+
"capabilities": ["file.info"],
|
|
240
|
+
"aliases": [],
|
|
241
|
+
"examples": ["asp file download 6f2c5d7e-31c6-4f48-9e3c-6d9b5f92c457 --output-path evidence.txt"]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "file.read_text",
|
|
245
|
+
"cli_path": "file read-text",
|
|
246
|
+
"method": "GET",
|
|
247
|
+
"endpoint": "/api/agent/v1/files/{file_key}/read-text/",
|
|
248
|
+
"permission": "authenticated",
|
|
249
|
+
"capabilities": ["file.read_text"],
|
|
250
|
+
"aliases": [],
|
|
251
|
+
"examples": ["asp file read-text 6f2c5d7e-31c6-4f48-9e3c-6d9b5f92c457 --max-bytes 4096 --output json"]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"id": "enrichment.create",
|
|
255
|
+
"cli_path": "enrichment create",
|
|
256
|
+
"method": "POST",
|
|
257
|
+
"endpoint": "/api/agent/v1/enrichments/",
|
|
258
|
+
"permission": "business_writer",
|
|
259
|
+
"capabilities": ["enrichment.create"],
|
|
260
|
+
"aliases": ["create_enrichment"],
|
|
261
|
+
"examples": ["asp enrichment create case_000001 --name ti --data-file enrichment.json --output json"]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "playbook.template.list",
|
|
265
|
+
"cli_path": "playbook template list",
|
|
266
|
+
"method": "GET",
|
|
267
|
+
"endpoint": "/api/agent/v1/playbooks/templates/",
|
|
268
|
+
"permission": "authenticated",
|
|
269
|
+
"capabilities": ["playbook.template.list"],
|
|
270
|
+
"aliases": ["list_playbook_templates"],
|
|
271
|
+
"examples": ["asp playbook template list --output json"]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "playbook.list",
|
|
275
|
+
"cli_path": "playbook list",
|
|
276
|
+
"method": "GET",
|
|
277
|
+
"endpoint": "/api/agent/v1/playbooks/",
|
|
278
|
+
"permission": "authenticated",
|
|
279
|
+
"capabilities": ["playbook.list"],
|
|
280
|
+
"aliases": ["list_playbooks"],
|
|
281
|
+
"examples": ["asp playbook list --case-id case_000001 --output json"]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"id": "playbook.show",
|
|
285
|
+
"cli_path": "playbook show",
|
|
286
|
+
"method": "GET",
|
|
287
|
+
"endpoint": "/api/agent/v1/playbooks/{playbook_id}/",
|
|
288
|
+
"permission": "authenticated",
|
|
289
|
+
"capabilities": ["playbook.show"],
|
|
290
|
+
"aliases": ["list_playbooks(playbook_id=...)"],
|
|
291
|
+
"examples": ["asp playbook show playbook_000001 --output json"]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"id": "playbook.run",
|
|
295
|
+
"cli_path": "playbook run",
|
|
296
|
+
"method": "POST",
|
|
297
|
+
"endpoint": "/api/agent/v1/playbooks/run/",
|
|
298
|
+
"permission": "business_writer",
|
|
299
|
+
"capabilities": ["playbook.run"],
|
|
300
|
+
"aliases": ["execute_playbook"],
|
|
301
|
+
"examples": ["asp playbook run collect_case_context case_000001 --user-input-file prompt.md --output json"]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"id": "siem.schema",
|
|
305
|
+
"cli_path": "siem schema list|show",
|
|
306
|
+
"method": "GET",
|
|
307
|
+
"endpoint": "/api/agent/v1/siem/schema/",
|
|
308
|
+
"permission": "authenticated",
|
|
309
|
+
"capabilities": ["siem.schema"],
|
|
310
|
+
"aliases": ["siem_explore_schema"],
|
|
311
|
+
"examples": ["asp siem schema list --output json", "asp siem schema show logs-security --output json"]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"id": "siem.search.keyword",
|
|
315
|
+
"cli_path": "siem search keyword",
|
|
316
|
+
"method": "POST",
|
|
317
|
+
"endpoint": "/api/agent/v1/siem/search/keyword/",
|
|
318
|
+
"permission": "authenticated",
|
|
319
|
+
"capabilities": ["siem.search.keyword"],
|
|
320
|
+
"aliases": ["siem_keyword_search"],
|
|
321
|
+
"examples": ["asp siem search keyword 1.2.3.4 --from 2026-07-02T00:00:00Z --to 2026-07-02T01:00:00Z --output json"]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"id": "siem.query.adaptive",
|
|
325
|
+
"cli_path": "siem query adaptive",
|
|
326
|
+
"method": "POST",
|
|
327
|
+
"endpoint": "/api/agent/v1/siem/query/adaptive/",
|
|
328
|
+
"permission": "authenticated",
|
|
329
|
+
"capabilities": ["siem.query.adaptive"],
|
|
330
|
+
"aliases": ["siem_adaptive_query"],
|
|
331
|
+
"examples": ["asp siem query adaptive logs-security --from 2026-07-02T00:00:00Z --to 2026-07-02T01:00:00Z --filters-file filters.json --output json"]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"id": "siem.fields.discover",
|
|
335
|
+
"cli_path": "siem fields discover",
|
|
336
|
+
"method": "POST",
|
|
337
|
+
"endpoint": "/api/agent/v1/siem/fields/discover/",
|
|
338
|
+
"permission": "authenticated",
|
|
339
|
+
"capabilities": ["siem.fields.discover"],
|
|
340
|
+
"aliases": ["siem_discover_index_fields"],
|
|
341
|
+
"examples": ["asp siem fields discover logs-security ELK --from 2026-07-02T00:00:00Z --to 2026-07-02T01:00:00Z --output json"]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"id": "siem.query.spl",
|
|
345
|
+
"cli_path": "siem query spl",
|
|
346
|
+
"method": "POST",
|
|
347
|
+
"endpoint": "/api/agent/v1/siem/query/spl/",
|
|
348
|
+
"permission": "authenticated",
|
|
349
|
+
"capabilities": ["siem.query.spl"],
|
|
350
|
+
"aliases": ["siem_execute_spl"],
|
|
351
|
+
"examples": ["asp siem query spl \"index=main error\" --from 2026-07-02T00:00:00Z --to 2026-07-02T01:00:00Z --output json"]
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"id": "siem.query.esql",
|
|
355
|
+
"cli_path": "siem query esql",
|
|
356
|
+
"method": "POST",
|
|
357
|
+
"endpoint": "/api/agent/v1/siem/query/esql/",
|
|
358
|
+
"permission": "authenticated",
|
|
359
|
+
"capabilities": ["siem.query.esql"],
|
|
360
|
+
"aliases": ["siem_execute_esql"],
|
|
361
|
+
"examples": ["asp siem query esql \"FROM logs-* | LIMIT 10\" --from 2026-07-02T00:00:00Z --to 2026-07-02T01:00:00Z --output json"]
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"id": "ti.query",
|
|
365
|
+
"cli_path": "ti query",
|
|
366
|
+
"method": "POST",
|
|
367
|
+
"endpoint": "/api/agent/v1/threat-intel/query/",
|
|
368
|
+
"permission": "authenticated",
|
|
369
|
+
"capabilities": ["ti.query"],
|
|
370
|
+
"aliases": ["ti_query", "threat-intel query"],
|
|
371
|
+
"examples": ["asp ti query 1.2.3.4 --artifact-type \"IP Address\" --output json"]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"id": "cmdb.lookup",
|
|
375
|
+
"cli_path": "cmdb lookup",
|
|
376
|
+
"method": "POST",
|
|
377
|
+
"endpoint": "/api/agent/v1/cmdb/lookup/",
|
|
378
|
+
"permission": "authenticated",
|
|
379
|
+
"capabilities": ["cmdb.lookup"],
|
|
380
|
+
"aliases": ["cmdb_lookup"],
|
|
381
|
+
"examples": ["asp cmdb lookup \"IP Address\" 1.2.3.4 --output json"]
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"id": "dev.stream.head",
|
|
385
|
+
"cli_path": "dev stream head",
|
|
386
|
+
"method": "GET",
|
|
387
|
+
"endpoint": "/api/agent/v1/dev/streams/head/",
|
|
388
|
+
"permission": "authenticated",
|
|
389
|
+
"capabilities": ["dev.stream.head"],
|
|
390
|
+
"aliases": ["read_stream_head"],
|
|
391
|
+
"examples": ["asp dev stream head custom-module-events -n 3 --output json"]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"id": "dev.stream.read",
|
|
395
|
+
"cli_path": "dev stream read",
|
|
396
|
+
"method": "GET",
|
|
397
|
+
"endpoint": "/api/agent/v1/dev/streams/message/",
|
|
398
|
+
"permission": "authenticated",
|
|
399
|
+
"capabilities": ["dev.stream.read"],
|
|
400
|
+
"aliases": ["read_stream_message_by_id"],
|
|
401
|
+
"examples": ["asp dev stream read custom-module-events 0-1 --output json"]
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: asp-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Command line client for Agentic SOC Platform
|
|
5
|
+
Project-URL: Homepage, https://github.com/FunnyWolf/agentic-soc-platform
|
|
6
|
+
Project-URL: Repository, https://github.com/FunnyWolf/agentic-soc-platform
|
|
7
|
+
Project-URL: Issues, https://github.com/FunnyWolf/agentic-soc-platform/issues
|
|
8
|
+
Author: Agentic SOC Platform contributors
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agentic-soc,cli,security,soc
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Security
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: httpx>=0.28.1
|
|
24
|
+
Requires-Dist: jmespath>=1.0.1
|
|
25
|
+
Requires-Dist: pydantic>=2.13.4
|
|
26
|
+
Requires-Dist: rich>=14.2.0
|
|
27
|
+
Requires-Dist: typer>=0.20.0
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# ASP CLI
|
|
31
|
+
|
|
32
|
+
Command line client for Agentic SOC Platform.
|
|
33
|
+
|
|
34
|
+
`asp-cli` provides the `asp` command for SOC analysts and automation agents to authenticate with an ASP server, inspect cases and alerts, add comments, upload files, run playbooks, and query investigation integrations.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```powershell
|
|
39
|
+
pipx install asp-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Quick start
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
asp auth login --api-url https://asp.example.com --api-key asp_xxx
|
|
46
|
+
asp doctor
|
|
47
|
+
asp case list
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
For automation and agent skills, prefer stable JSON output:
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
asp case list --output json
|
|
54
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
asp_cli/__init__.py,sha256=QTYqXqSTHFRkM9TEgpDFcHvwLbvqHDqvqfQ9EiXkcAM,23
|
|
2
|
+
asp_cli/api_client.py,sha256=X_p_o2jEfk6Hs-BteaI3jTtFQp3J0oLs_kSjRb4Q6ZA,4381
|
|
3
|
+
asp_cli/config.py,sha256=fwhysaJqhuk8UR1fm1E_Zi3dHCGI8mn2a6TIG9-spHc,5849
|
|
4
|
+
asp_cli/errors.py,sha256=Xjy-jRcqVGiTPGVgIwMyugnZeSF9mLl-6-sTHbIgvtE,502
|
|
5
|
+
asp_cli/main.py,sha256=ZOGjWqPmQ2hzmEv7RZEppauAiEOC2lUVwb_SOGW7lyU,65593
|
|
6
|
+
asp_cli/output.py,sha256=mE9DZfj0SZaGTheM6phi-kBUSq0brMGExRYyGNl8fs0,1783
|
|
7
|
+
asp_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
asp_cli/spec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
asp_cli/spec/operations.json,sha256=m3ka1GdGaxfygFe5Mx4IsLDJgY9FRNkTzpPaCEf3yg8,13735
|
|
10
|
+
asp_cli-0.1.0.dist-info/METADATA,sha256=PWnMCIeTPHrAosv7AFLgwEdHAjScvSPkmvhGfBwTncE,1700
|
|
11
|
+
asp_cli-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
12
|
+
asp_cli-0.1.0.dist-info/entry_points.txt,sha256=aLN1IvA_MD9eopkejBVS3S6nMJ05nUjNkVAxIhAxyIY,41
|
|
13
|
+
asp_cli-0.1.0.dist-info/licenses/LICENSE,sha256=0ny1Sz4au53cXxksDiY_0YuuqXkW5xaWQ2a8uOegqCA,1111
|
|
14
|
+
asp_cli-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agentic SOC Platform contributors
|
|
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.
|