@seclai/cli 1.0.6 → 1.1.0
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.
- package/README.md +333 -59
- package/dist/cli.js +1728 -219
- package/dist/cli.js.map +1 -1
- package/package.json +24 -5
package/README.md
CHANGED
|
@@ -1,143 +1,411 @@
|
|
|
1
1
|
# Seclai CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Full-featured command-line interface for the [Seclai](https://seclai.com) platform.
|
|
4
|
+
Manage agents, knowledge bases, sources, memory banks, evaluations, solutions, governance, and more — all from the terminal.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
All commands return JSON to stdout, so you can pipe into `jq` or other tools.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
## Install
|
|
8
9
|
|
|
9
10
|
```bash
|
|
10
11
|
npm i -g @seclai/cli
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Or run directly via npx (no install needed):
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npx @seclai/cli agents list
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Documentation
|
|
16
21
|
|
|
17
|
-
https://seclai.github.io/seclai-cli/1.0
|
|
22
|
+
Command reference (latest): https://seclai.github.io/seclai-cli/1.1.0/
|
|
18
23
|
|
|
19
24
|
## Authentication
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
Set the `SECLAI_API_KEY` environment variable, or pass `--api-key` per-command:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
export SECLAI_API_KEY="sk-..."
|
|
30
|
+
|
|
31
|
+
# or inline
|
|
32
|
+
seclai --api-key "$SECLAI_API_KEY" agents list
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Environment Variables
|
|
36
|
+
|
|
37
|
+
| Variable | Description |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `SECLAI_API_KEY` | Default API key (alternative to `--api-key`) |
|
|
40
|
+
| `SECLAI_API_URL` | Override API base URL (default: `https://api.seclai.com`) |
|
|
41
|
+
|
|
42
|
+
## Global Options
|
|
22
43
|
|
|
23
|
-
|
|
44
|
+
| Flag | Description |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `--api-key <key>` | Seclai API key |
|
|
47
|
+
| `--compact` | Output compact (single-line) JSON |
|
|
48
|
+
| `-V, --version` | Print version |
|
|
24
49
|
|
|
25
|
-
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Commands
|
|
53
|
+
|
|
54
|
+
### Agents
|
|
26
55
|
|
|
27
56
|
```bash
|
|
28
|
-
seclai --
|
|
57
|
+
seclai agents list [--page N] [--limit N]
|
|
58
|
+
seclai agents create --json '{"name":"My Agent"}'
|
|
59
|
+
seclai agents get <agentId>
|
|
60
|
+
seclai agents update <agentId> --json '{"name":"Renamed"}'
|
|
61
|
+
seclai agents delete <agentId>
|
|
29
62
|
```
|
|
30
63
|
|
|
31
|
-
|
|
64
|
+
#### Running Agents
|
|
65
|
+
|
|
66
|
+
Four modes: basic, streaming (SSE wait), events (NDJSON), and polling.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Basic run (returns final result)
|
|
70
|
+
seclai agents run <agentId> --json '{"input":"Hello"}'
|
|
71
|
+
seclai agents run <agentId> --json-file ./run.json
|
|
72
|
+
cat run.json | seclai agents run <agentId> --json-file -
|
|
73
|
+
|
|
74
|
+
# SSE streaming (waits for done event or timeout)
|
|
75
|
+
seclai agents run <agentId> --json '{"input":"Hi"}' --stream --timeout-ms 60000
|
|
76
|
+
|
|
77
|
+
# NDJSON event stream (outputs every SSE event as a JSON line)
|
|
78
|
+
seclai agents run <agentId> --json '{"input":"Hi"}' --events
|
|
79
|
+
seclai agents run <agentId> --json '{"input":"Hi"}' --events --event-filter status
|
|
80
|
+
seclai agents run <agentId> --json '{"input":"Hi"}' --events --output data
|
|
81
|
+
|
|
82
|
+
# Polling (submit then poll until complete)
|
|
83
|
+
seclai agents run <agentId> --json '{"input":"Hi"}' --poll --poll-interval-ms 2000
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
#### Agent Runs
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
seclai agents runs list <agentId> [--page N] [--limit N]
|
|
90
|
+
seclai agents runs get <runId> [--include-step-outputs]
|
|
91
|
+
seclai agents runs delete <runId>
|
|
92
|
+
seclai agents runs cancel <runId>
|
|
93
|
+
seclai agents runs search [--page N] [--limit N] [--json '...']
|
|
94
|
+
seclai agents runs eval-results <agentId> <runId> [--page N] [--limit N]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
#### Agent Definition
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
seclai agents def get <agentId>
|
|
101
|
+
seclai agents def update <agentId> --json '{"steps":[...]}'
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Agent Input Upload
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
seclai agents upload-input <agentId> --file ./data.csv [--file-name data.csv] [--mime-type text/csv]
|
|
108
|
+
seclai agents input-status <agentId> <uploadId>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Agent AI Assistant
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
seclai agents ai gen-steps <agentId> --user-input "Build a QA chatbot"
|
|
115
|
+
seclai agents ai step-config <agentId> --user-input "Configure the search step"
|
|
116
|
+
seclai agents ai history <agentId>
|
|
117
|
+
seclai agents ai mark <agentId> <conversationId> --json '{"accepted":true}'
|
|
118
|
+
```
|
|
32
119
|
|
|
33
120
|
### Sources
|
|
34
121
|
|
|
35
|
-
|
|
122
|
+
```bash
|
|
123
|
+
seclai sources list [--page N] [--limit N] [--sort <field>] [--order asc|desc]
|
|
124
|
+
seclai sources create --json '{"name":"Docs","type":"manual"}'
|
|
125
|
+
seclai sources get <sourceId>
|
|
126
|
+
seclai sources update <sourceId> --json '{"name":"Renamed"}'
|
|
127
|
+
seclai sources delete <sourceId>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
`source` is an alias for `sources` (e.g. `seclai source list`).
|
|
131
|
+
|
|
132
|
+
#### Upload
|
|
36
133
|
|
|
37
134
|
```bash
|
|
38
|
-
seclai sources
|
|
39
|
-
seclai sources
|
|
40
|
-
seclai sources list --account-id 9f3c2a7d-2d4a-4c8e-9d1d-3f7a2f1c0b5e
|
|
135
|
+
seclai sources upload <sourceId> --file ./doc.pdf [--title "Doc"] [--mime-type application/pdf] [--metadata '{}']
|
|
136
|
+
seclai sources upload-text <sourceId> --json '{"title":"Note","text":"Hello world"}'
|
|
41
137
|
```
|
|
42
138
|
|
|
43
|
-
|
|
139
|
+
#### Exports
|
|
44
140
|
|
|
45
141
|
```bash
|
|
46
|
-
seclai sources
|
|
47
|
-
seclai sources
|
|
48
|
-
seclai sources
|
|
142
|
+
seclai sources exports list <sourceId> [--page N] [--limit N]
|
|
143
|
+
seclai sources exports create <sourceId>
|
|
144
|
+
seclai sources exports get <sourceId> <exportId>
|
|
145
|
+
seclai sources exports cancel <sourceId> <exportId>
|
|
146
|
+
seclai sources exports delete <sourceId> <exportId>
|
|
147
|
+
seclai sources exports download <sourceId> <exportId>
|
|
148
|
+
seclai sources exports estimate <sourceId>
|
|
49
149
|
```
|
|
50
150
|
|
|
51
|
-
|
|
151
|
+
#### Embedding Migration
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
seclai sources migration get <sourceId>
|
|
155
|
+
seclai sources migration start <sourceId>
|
|
156
|
+
seclai sources migration cancel <sourceId>
|
|
157
|
+
```
|
|
52
158
|
|
|
53
|
-
|
|
159
|
+
### Contents
|
|
54
160
|
|
|
55
161
|
```bash
|
|
56
|
-
seclai
|
|
57
|
-
seclai
|
|
58
|
-
|
|
162
|
+
seclai contents get <contentVersionId> [--start N] [--end N]
|
|
163
|
+
seclai contents delete <contentVersionId>
|
|
164
|
+
seclai contents embeddings <contentVersionId> [--page N] [--limit N]
|
|
59
165
|
```
|
|
60
166
|
|
|
61
|
-
|
|
167
|
+
#### Upload / Replace
|
|
62
168
|
|
|
63
|
-
|
|
169
|
+
```bash
|
|
170
|
+
seclai contents upload <contentVersionId> --file ./updated.pdf [--metadata '{}']
|
|
171
|
+
seclai contents replace <contentVersionId> --file ./updated.pdf # alias
|
|
172
|
+
seclai contents replace-text <contentVersionId> --json '{"title":"Note","text":"Updated content"}'
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Knowledge Bases
|
|
64
176
|
|
|
65
177
|
```bash
|
|
66
|
-
seclai
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
178
|
+
seclai kb list [--page N] [--limit N] [--sort <field>] [--order asc|desc]
|
|
179
|
+
seclai kb create --json '{"name":"Support KB"}'
|
|
180
|
+
seclai kb get <kbId>
|
|
181
|
+
seclai kb update <kbId> --json '{"name":"Renamed"}'
|
|
182
|
+
seclai kb delete <kbId>
|
|
70
183
|
```
|
|
71
184
|
|
|
72
|
-
|
|
185
|
+
### Memory Banks
|
|
73
186
|
|
|
74
187
|
```bash
|
|
75
|
-
seclai
|
|
76
|
-
seclai
|
|
188
|
+
seclai memory list [--page N] [--limit N]
|
|
189
|
+
seclai memory create --json '{"name":"Chat Memory","type":"conversation"}'
|
|
190
|
+
seclai memory get <memoryBankId>
|
|
191
|
+
seclai memory update <memoryBankId> --json '{"name":"Renamed"}'
|
|
192
|
+
seclai memory delete <memoryBankId>
|
|
193
|
+
seclai memory stats <memoryBankId>
|
|
194
|
+
seclai memory agents <memoryBankId>
|
|
195
|
+
seclai memory compact <memoryBankId>
|
|
196
|
+
seclai memory delete-source <memoryBankId>
|
|
197
|
+
seclai memory templates
|
|
198
|
+
seclai memory test-compaction <memoryBankId> [--json '...']
|
|
199
|
+
seclai memory test-compaction-standalone [--json '...']
|
|
77
200
|
```
|
|
78
201
|
|
|
79
|
-
|
|
202
|
+
#### Memory AI Assistant
|
|
80
203
|
|
|
81
204
|
```bash
|
|
82
|
-
seclai
|
|
83
|
-
seclai
|
|
205
|
+
seclai memory ai generate --user-input "Configure compaction"
|
|
206
|
+
seclai memory ai last
|
|
207
|
+
seclai memory ai accept <conversationId> --json '{"accepted":true}'
|
|
84
208
|
```
|
|
85
209
|
|
|
86
|
-
|
|
210
|
+
### Evaluations
|
|
211
|
+
|
|
212
|
+
#### Criteria
|
|
87
213
|
|
|
88
214
|
```bash
|
|
89
|
-
seclai
|
|
215
|
+
seclai evals criteria list <agentId> [--page N] [--limit N]
|
|
216
|
+
seclai evals criteria create <agentId> --json '{"name":"Quality"}'
|
|
217
|
+
seclai evals criteria get <criteriaId>
|
|
218
|
+
seclai evals criteria update <criteriaId> --json '{"name":"Renamed"}'
|
|
219
|
+
seclai evals criteria delete <criteriaId>
|
|
220
|
+
seclai evals criteria summary <criteriaId>
|
|
90
221
|
```
|
|
91
222
|
|
|
92
|
-
|
|
223
|
+
#### Results
|
|
93
224
|
|
|
94
|
-
|
|
225
|
+
```bash
|
|
226
|
+
seclai evals results list <criteriaId> [--page N] [--limit N]
|
|
227
|
+
seclai evals results create <criteriaId> --json '{"run_id":"...","score":0.9}'
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Agent-level
|
|
95
231
|
|
|
96
232
|
```bash
|
|
97
|
-
seclai
|
|
98
|
-
seclai
|
|
233
|
+
seclai evals compatible-runs <criteriaId> [--page N] [--limit N]
|
|
234
|
+
seclai evals test-draft <agentId> --json '{"criteria":{...}}'
|
|
235
|
+
seclai evals agent-results <agentId> [--page N] [--limit N]
|
|
236
|
+
seclai evals agent-runs <agentId> [--page N] [--limit N]
|
|
237
|
+
seclai evals non-manual-summary <agentId>
|
|
99
238
|
```
|
|
100
239
|
|
|
101
|
-
|
|
240
|
+
### Solutions
|
|
102
241
|
|
|
103
242
|
```bash
|
|
104
|
-
seclai
|
|
243
|
+
seclai solutions list [--page N] [--limit N]
|
|
244
|
+
seclai solutions create --json '{"name":"My Solution"}'
|
|
245
|
+
seclai solutions get <solutionId>
|
|
246
|
+
seclai solutions update <solutionId> --json '{"name":"Renamed"}'
|
|
247
|
+
seclai solutions delete <solutionId>
|
|
105
248
|
```
|
|
106
249
|
|
|
107
|
-
|
|
250
|
+
#### Link / Unlink Resources
|
|
108
251
|
|
|
109
252
|
```bash
|
|
110
|
-
seclai
|
|
111
|
-
seclai
|
|
253
|
+
seclai solutions link <solutionId> --agents '["id1","id2"]' --kb '["id3"]' --sources '["id4"]'
|
|
254
|
+
seclai solutions unlink <solutionId> --agents '["id1"]'
|
|
112
255
|
```
|
|
113
256
|
|
|
114
|
-
|
|
257
|
+
#### Conversations
|
|
115
258
|
|
|
116
259
|
```bash
|
|
117
|
-
seclai
|
|
118
|
-
seclai
|
|
119
|
-
seclai
|
|
260
|
+
seclai solutions convos list <solutionId>
|
|
261
|
+
seclai solutions convos add <solutionId> --json '{"user_input":"Add a source"}'
|
|
262
|
+
seclai solutions convos mark <solutionId> <conversationId> --json '{"accepted":true}'
|
|
120
263
|
```
|
|
121
264
|
|
|
122
|
-
|
|
265
|
+
#### Solution AI Assistant
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
seclai solutions ai generate <solutionId> --user-input "Add a FAQ source"
|
|
269
|
+
seclai solutions ai kb <solutionId> --user-input "Create a knowledge base"
|
|
270
|
+
seclai solutions ai source <solutionId> --user-input "Create a file source"
|
|
271
|
+
seclai solutions ai accept <solutionId> <conversationId>
|
|
272
|
+
seclai solutions ai decline <solutionId> <conversationId>
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Governance
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
seclai governance ai generate --user-input "Create a content safety policy"
|
|
279
|
+
seclai governance ai list
|
|
280
|
+
seclai governance ai accept <conversationId>
|
|
281
|
+
seclai governance ai decline <conversationId>
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Alerts
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
seclai alerts list [--page N] [--limit N] [--status open] [--severity high]
|
|
288
|
+
seclai alerts get <alertId>
|
|
289
|
+
seclai alerts status <alertId> --json '{"status":"resolved"}'
|
|
290
|
+
seclai alerts comment <alertId> --json '{"comment":"Investigating"}'
|
|
291
|
+
seclai alerts subscribe <alertId>
|
|
292
|
+
seclai alerts unsubscribe <alertId>
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
#### Alert Configurations
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
seclai alerts configs list [--page N] [--limit N]
|
|
299
|
+
seclai alerts configs create --json '{"name":"Critical Alerts","type":"email"}'
|
|
300
|
+
seclai alerts configs get <configId>
|
|
301
|
+
seclai alerts configs update <configId> --json '{"name":"Renamed"}'
|
|
302
|
+
seclai alerts configs delete <configId>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
#### Organization Alert Preferences
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
seclai alerts prefs list
|
|
309
|
+
seclai alerts prefs update <organizationId> <alertType> --json '{"enabled":true}'
|
|
310
|
+
```
|
|
123
311
|
|
|
124
|
-
###
|
|
312
|
+
### Models
|
|
125
313
|
|
|
126
|
-
|
|
314
|
+
#### Model Alerts
|
|
127
315
|
|
|
128
|
-
|
|
316
|
+
```bash
|
|
317
|
+
seclai models alerts list [--page N] [--limit N]
|
|
318
|
+
seclai models alerts mark-read <alertId>
|
|
319
|
+
seclai models alerts mark-all-read
|
|
320
|
+
seclai models alerts unread-count
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
#### Recommendations
|
|
129
324
|
|
|
130
325
|
```bash
|
|
131
|
-
|
|
326
|
+
seclai models recommendations <modelId>
|
|
132
327
|
```
|
|
133
328
|
|
|
134
|
-
|
|
329
|
+
### Search
|
|
135
330
|
|
|
136
331
|
```bash
|
|
137
|
-
|
|
332
|
+
seclai search --query "deployment guide" [--limit N] [--entity-type agent|source|kb]
|
|
138
333
|
```
|
|
139
334
|
|
|
140
|
-
|
|
335
|
+
### AI Assistant
|
|
336
|
+
|
|
337
|
+
Top-level AI assistant for multi-domain operations.
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
seclai ai feedback --json '{"conversation_id":"...","feedback":"helpful"}'
|
|
341
|
+
seclai ai kb --user-input "Create a support knowledge base"
|
|
342
|
+
seclai ai source --user-input "Create a documentation source"
|
|
343
|
+
seclai ai solution --user-input "Build a customer support solution"
|
|
344
|
+
seclai ai memory --user-input "Create a conversation memory bank"
|
|
345
|
+
seclai ai memory-history
|
|
346
|
+
seclai ai accept <conversationId> [--json '...']
|
|
347
|
+
seclai ai decline <conversationId>
|
|
348
|
+
seclai ai memory-accept <conversationId> [--json '...']
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Skills
|
|
352
|
+
|
|
353
|
+
Install Seclai skill files for AI coding tools (Copilot, Claude Code, Cursor, Windsurf, Codex, Kiro, Cline, Roo Code, Gemini, Antigravity).
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
# Auto-detect tools from workspace directory structure
|
|
357
|
+
seclai skills install
|
|
358
|
+
|
|
359
|
+
# Target a specific tool
|
|
360
|
+
seclai skills install --tool copilot
|
|
361
|
+
seclai skills install --tool claude
|
|
362
|
+
seclai skills install --tool cursor
|
|
363
|
+
seclai skills install --tool kiro
|
|
364
|
+
seclai skills install --tool cline
|
|
365
|
+
|
|
366
|
+
# Install for all supported tools
|
|
367
|
+
seclai skills install --tool all
|
|
368
|
+
|
|
369
|
+
# Specify a custom directory
|
|
370
|
+
seclai skills install --tool copilot --dir /path/to/project
|
|
371
|
+
|
|
372
|
+
# Via npx (no install required)
|
|
373
|
+
npx @seclai/cli skills install
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
Skills follow the [Agent Skills specification](https://agentskills.io/specification). Each tool gets a `seclai-cli/` directory containing a `SKILL.md` with YAML frontmatter and a `references/` subdirectory for progressive disclosure:
|
|
377
|
+
|
|
378
|
+
| Tool | Directory |
|
|
379
|
+
|---|---|
|
|
380
|
+
| Copilot | `.github/copilot/seclai-cli/` |
|
|
381
|
+
| Claude Code | `.claude/skills/seclai-cli/` |
|
|
382
|
+
| Cursor | `.cursor/skills/seclai-cli/` |
|
|
383
|
+
| Windsurf | `.windsurf/skills/seclai-cli/` |
|
|
384
|
+
| Codex | `.codex/skills/seclai-cli/` |
|
|
385
|
+
| Kiro | `.kiro/steering/seclai-cli/` |
|
|
386
|
+
| Cline | `.clinerules/seclai-cli/` |
|
|
387
|
+
| Roo Code | `.roo/rules/seclai-cli/` |
|
|
388
|
+
| Gemini | `.gemini/seclai-cli/` |
|
|
389
|
+
| Antigravity | `.antigravity/seclai-cli/` |
|
|
390
|
+
|
|
391
|
+
### Shell Completion
|
|
392
|
+
|
|
393
|
+
Generate shell completion scripts for tab-completion of commands:
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# Bash — add to ~/.bashrc
|
|
397
|
+
eval "$(seclai completion bash)"
|
|
398
|
+
|
|
399
|
+
# Zsh — add to ~/.zshrc
|
|
400
|
+
eval "$(seclai completion zsh)"
|
|
401
|
+
|
|
402
|
+
# Fish — save to completions directory
|
|
403
|
+
seclai completion fish > ~/.config/fish/completions/seclai.fish
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Development
|
|
141
409
|
|
|
142
410
|
### Install dependencies
|
|
143
411
|
|
|
@@ -163,6 +431,12 @@ npm run build
|
|
|
163
431
|
npm run dev -- --help
|
|
164
432
|
```
|
|
165
433
|
|
|
434
|
+
### Test
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
npm test
|
|
438
|
+
```
|
|
439
|
+
|
|
166
440
|
### Test global install locally
|
|
167
441
|
|
|
168
442
|
```bash
|