sentron-cli 1.0.22 → 1.0.24
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 +398 -18
- package/dist/api.d.ts +424 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +369 -1
- package/dist/api.js.map +1 -1
- package/dist/commands/app.d.ts +6 -0
- package/dist/commands/app.d.ts.map +1 -0
- package/dist/commands/app.js +874 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/invitations.d.ts +7 -0
- package/dist/commands/invitations.d.ts.map +1 -0
- package/dist/commands/invitations.js +284 -0
- package/dist/commands/invitations.js.map +1 -0
- package/dist/commands/notifications.d.ts +6 -0
- package/dist/commands/notifications.d.ts.map +1 -0
- package/dist/commands/notifications.js +327 -0
- package/dist/commands/notifications.js.map +1 -0
- package/dist/commands/org.d.ts +6 -0
- package/dist/commands/org.d.ts.map +1 -0
- package/dist/commands/org.js +1406 -0
- package/dist/commands/org.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/styling.d.ts +5 -0
- package/dist/utils/styling.d.ts.map +1 -1
- package/dist/utils/styling.js +16 -0
- package/dist/utils/styling.js.map +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
<img src="https://sentron.dev/logo-light.svg" width="32" height="32" alt="Sentron Logo" style="vertical-align: middle; margin-right: 8px;" />
|
|
7
7
|
</picture> sentron-cli
|
|
8
8
|
|
|
9
|
-
**Command-line interface for the Sentron
|
|
9
|
+
**Command-line interface for the Sentron Platform**
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/sentron-cli)
|
|
12
|
+
[](https://sentron.dev/terms)
|
|
10
13
|
|
|
11
14
|
---
|
|
12
15
|
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
## Installation
|
|
16
19
|
|
|
17
20
|
```bash
|
|
18
|
-
# Run directly with npx
|
|
21
|
+
# Run directly with npx (no install required)
|
|
19
22
|
npx sentron-cli auth signin
|
|
20
23
|
|
|
21
24
|
# Or install globally
|
|
@@ -23,6 +26,27 @@ npm install -g sentron-cli
|
|
|
23
26
|
sentron auth signin
|
|
24
27
|
```
|
|
25
28
|
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 1. Sign in with your email
|
|
33
|
+
sentron auth signin
|
|
34
|
+
|
|
35
|
+
# 2. Create an organization
|
|
36
|
+
sentron org create --name "My Team"
|
|
37
|
+
|
|
38
|
+
# 3. Create an app
|
|
39
|
+
sentron app create <org-id> --name "Production"
|
|
40
|
+
|
|
41
|
+
# 4. Invite team members
|
|
42
|
+
sentron org invites create <org-id> --email teammate@example.com
|
|
43
|
+
|
|
44
|
+
# 5. Check your usage metrics
|
|
45
|
+
sentron metrics summary
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
26
50
|
## Commands
|
|
27
51
|
|
|
28
52
|
### Authentication
|
|
@@ -51,13 +75,13 @@ sentron auth signout
|
|
|
51
75
|
sentron auth api-key create
|
|
52
76
|
|
|
53
77
|
# Create with options
|
|
54
|
-
sentron auth api-key create --name "
|
|
78
|
+
sentron auth api-key create --name "Production" --expires 90
|
|
55
79
|
|
|
56
80
|
# List all API keys
|
|
57
81
|
sentron auth api-key list
|
|
58
82
|
|
|
59
83
|
# Revoke an API key
|
|
60
|
-
sentron auth api-key revoke <id>
|
|
84
|
+
sentron auth api-key revoke <key-id>
|
|
61
85
|
```
|
|
62
86
|
|
|
63
87
|
### OAuth Clients
|
|
@@ -73,9 +97,277 @@ sentron auth oauth-client create --name "ChatGPT Integration"
|
|
|
73
97
|
sentron auth oauth-client list
|
|
74
98
|
|
|
75
99
|
# Delete an OAuth client
|
|
76
|
-
sentron auth oauth-client delete <id>
|
|
100
|
+
sentron auth oauth-client delete <client-id>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Organizations
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# List your organizations
|
|
109
|
+
sentron org list
|
|
110
|
+
sentron org ls # alias
|
|
111
|
+
|
|
112
|
+
# Create a new organization
|
|
113
|
+
sentron org create --name "My Team"
|
|
114
|
+
sentron org create --name "My Team" --description "Our company workspace"
|
|
115
|
+
|
|
116
|
+
# Get organization details
|
|
117
|
+
sentron org get <org-id-or-slug>
|
|
118
|
+
sentron org show <org-id-or-slug> # alias
|
|
119
|
+
|
|
120
|
+
# Update organization
|
|
121
|
+
sentron org update <org-id> --name "New Name"
|
|
122
|
+
sentron org update <org-id> --website "https://example.com"
|
|
123
|
+
|
|
124
|
+
# Delete organization (requires confirmation)
|
|
125
|
+
sentron org delete <org-id>
|
|
126
|
+
sentron org delete <org-id> --force # skip confirmation
|
|
127
|
+
|
|
128
|
+
# Transfer ownership
|
|
129
|
+
sentron org transfer <org-id> <new-owner-user-id>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
#### Organization Members
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# List members
|
|
136
|
+
sentron org members list <org-id>
|
|
137
|
+
|
|
138
|
+
# Update member role (owner, admin, manager, member)
|
|
139
|
+
sentron org members update-role <org-id> <user-id> admin
|
|
140
|
+
|
|
141
|
+
# Remove member
|
|
142
|
+
sentron org members remove <org-id> <user-id>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Organization Invitations
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# List pending invitations
|
|
149
|
+
sentron org invites list <org-id>
|
|
150
|
+
|
|
151
|
+
# Invite someone
|
|
152
|
+
sentron org invites create <org-id> --email user@example.com
|
|
153
|
+
sentron org invites create <org-id> --email user@example.com --role admin
|
|
154
|
+
|
|
155
|
+
# Batch invite (up to 50 at once)
|
|
156
|
+
sentron org invites batch <org-id> --emails "a@ex.com,b@ex.com,c@ex.com"
|
|
157
|
+
sentron org invites batch <org-id> --emails "a@ex.com,b@ex.com" --role manager
|
|
158
|
+
sentron org invites batch <org-id> --file invites.csv # CSV: email,role
|
|
159
|
+
|
|
160
|
+
# Cancel invitation
|
|
161
|
+
sentron org invites cancel <org-id> <invitation-id>
|
|
162
|
+
|
|
163
|
+
# Resend invitation (resets expiration)
|
|
164
|
+
sentron org invites resend <org-id> <invitation-id>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### Join Requests
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# List pending join requests
|
|
171
|
+
sentron org requests list <org-id>
|
|
172
|
+
|
|
173
|
+
# Request to join an organization
|
|
174
|
+
sentron org requests create <org-id>
|
|
175
|
+
sentron org requests create <org-id> --message "Hi, I'd like to join!"
|
|
176
|
+
|
|
177
|
+
# Approve join request
|
|
178
|
+
sentron org requests approve <org-id> <request-id>
|
|
179
|
+
|
|
180
|
+
# Reject join request
|
|
181
|
+
sentron org requests reject <org-id> <request-id>
|
|
77
182
|
```
|
|
78
183
|
|
|
184
|
+
#### Organization Logo
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Upload a logo
|
|
188
|
+
sentron org logo upload <org-id> ./logo.png
|
|
189
|
+
|
|
190
|
+
# Remove logo
|
|
191
|
+
sentron org logo remove <org-id>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### Organization Audit Logs
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# List activity logs
|
|
198
|
+
sentron org audit-logs list <org-id>
|
|
199
|
+
sentron org activity list <org-id> # alias
|
|
200
|
+
|
|
201
|
+
# Filter by action
|
|
202
|
+
sentron org audit-logs list <org-id> --action org.member.added
|
|
203
|
+
|
|
204
|
+
# Filter by date range
|
|
205
|
+
sentron org audit-logs list <org-id> --from 2026-01-01 --to 2026-01-31
|
|
206
|
+
|
|
207
|
+
# Output as JSON
|
|
208
|
+
sentron org audit-logs list <org-id> --json
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### Apps
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# List apps in an organization
|
|
217
|
+
sentron app list <org-id>
|
|
218
|
+
|
|
219
|
+
# Create a new app
|
|
220
|
+
sentron app create <org-id> --name "Production"
|
|
221
|
+
|
|
222
|
+
# Get app details
|
|
223
|
+
sentron app get <app-id>
|
|
224
|
+
|
|
225
|
+
# Update app
|
|
226
|
+
sentron app update <app-id> --name "New Name"
|
|
227
|
+
|
|
228
|
+
# Delete app (requires confirmation)
|
|
229
|
+
sentron app delete <app-id>
|
|
230
|
+
sentron app delete <app-id> --force # skip confirmation
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### App Members
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# List app members
|
|
237
|
+
sentron app members list <app-id>
|
|
238
|
+
|
|
239
|
+
# Add member (must be org member first)
|
|
240
|
+
sentron app members add <app-id> <user-id>
|
|
241
|
+
sentron app members add <app-id> <user-id> --role app_admin
|
|
242
|
+
|
|
243
|
+
# Update member role (app_admin, app_member, app_viewer)
|
|
244
|
+
sentron app members update-role <app-id> <user-id> app_admin
|
|
245
|
+
|
|
246
|
+
# Remove member
|
|
247
|
+
sentron app members remove <app-id> <user-id>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### App Invitations
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# List pending invitations
|
|
254
|
+
sentron app invites list <app-id>
|
|
255
|
+
|
|
256
|
+
# Invite someone (auto-invites to org if not a member)
|
|
257
|
+
sentron app invites create <app-id> --email user@example.com
|
|
258
|
+
sentron app invites create <app-id> --email user@example.com --role app_admin
|
|
259
|
+
|
|
260
|
+
# Batch invite (up to 50 at once)
|
|
261
|
+
sentron app invites batch <app-id> --emails "a@ex.com,b@ex.com"
|
|
262
|
+
sentron app invites batch <app-id> --file invites.csv # CSV: email,role,organizationRole
|
|
263
|
+
|
|
264
|
+
# Cancel invitation
|
|
265
|
+
sentron app invites cancel <app-id> <invitation-id>
|
|
266
|
+
|
|
267
|
+
# Resend invitation
|
|
268
|
+
sentron app invites resend <app-id> <invitation-id>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### App Join Requests
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# List join requests
|
|
275
|
+
sentron app requests list <app-id>
|
|
276
|
+
|
|
277
|
+
# Request to join an app
|
|
278
|
+
sentron app requests create <app-id>
|
|
279
|
+
|
|
280
|
+
# Approve (assign role)
|
|
281
|
+
sentron app requests approve <app-id> <request-id> --role app_member
|
|
282
|
+
|
|
283
|
+
# Reject
|
|
284
|
+
sentron app requests reject <app-id> <request-id>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### App Audit Logs
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# List app activity logs
|
|
291
|
+
sentron app audit-logs list <app-id>
|
|
292
|
+
|
|
293
|
+
# Filter and output as JSON
|
|
294
|
+
sentron app audit-logs list <app-id> --action app.updated --json
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
### Billing
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Get billing status for an organization
|
|
303
|
+
sentron org billing status <org-id>
|
|
304
|
+
|
|
305
|
+
# Add payment method (opens Stripe checkout)
|
|
306
|
+
sentron org billing add-payment <org-id>
|
|
307
|
+
|
|
308
|
+
# Open billing portal
|
|
309
|
+
sentron org billing portal <org-id>
|
|
310
|
+
|
|
311
|
+
# Get subscription details for an app type
|
|
312
|
+
sentron org billing subscription <org-id> data_studio
|
|
313
|
+
|
|
314
|
+
# Subscribe to a tier (starter, team, platform)
|
|
315
|
+
sentron org billing subscribe <org-id> data_studio team
|
|
316
|
+
sentron org billing subscribe <org-id> data_studio team --interval monthly
|
|
317
|
+
|
|
318
|
+
# Preview plan change (see prorated amount)
|
|
319
|
+
sentron org billing preview <org-id> data_studio platform
|
|
320
|
+
|
|
321
|
+
# Confirm plan change
|
|
322
|
+
sentron org billing change <org-id> data_studio platform
|
|
323
|
+
|
|
324
|
+
# Cancel subscription
|
|
325
|
+
sentron org billing cancel <org-id> data_studio
|
|
326
|
+
sentron org billing cancel <org-id> data_studio --immediate # immediate with prorated refund
|
|
327
|
+
|
|
328
|
+
# Reactivate a subscription set to cancel
|
|
329
|
+
sentron org billing reactivate <org-id> data_studio
|
|
330
|
+
|
|
331
|
+
# Check if you can create a new app (tier limits)
|
|
332
|
+
sentron org billing can-create-app <org-id> data_studio
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
### Notifications
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
# List your notifications
|
|
341
|
+
sentron notifications list
|
|
342
|
+
sentron notifications ls # alias
|
|
343
|
+
|
|
344
|
+
# Filter unread only
|
|
345
|
+
sentron notifications list --unread
|
|
346
|
+
|
|
347
|
+
# Mark notification as read
|
|
348
|
+
sentron notifications read <notification-id>
|
|
349
|
+
|
|
350
|
+
# Mark all as read
|
|
351
|
+
sentron notifications read-all
|
|
352
|
+
|
|
353
|
+
# Delete a notification
|
|
354
|
+
sentron notifications delete <notification-id>
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
#### Notification Preferences
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
# Get your notification preferences
|
|
361
|
+
sentron notifications prefs
|
|
362
|
+
|
|
363
|
+
# Update preferences
|
|
364
|
+
sentron notifications prefs set --email-enabled true
|
|
365
|
+
sentron notifications prefs set --email-billing false
|
|
366
|
+
sentron notifications prefs set --email-security true
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
79
371
|
### Metrics
|
|
80
372
|
|
|
81
373
|
```bash
|
|
@@ -84,43 +376,131 @@ sentron metrics summary
|
|
|
84
376
|
|
|
85
377
|
# View detailed metrics
|
|
86
378
|
sentron metrics get
|
|
87
|
-
|
|
88
|
-
# View metrics for specific time period
|
|
89
379
|
sentron metrics get --days 7
|
|
90
380
|
|
|
381
|
+
# Get time-series data for charts
|
|
382
|
+
sentron metrics time-series --days 30
|
|
383
|
+
|
|
384
|
+
# Get API key usage breakdown
|
|
385
|
+
sentron metrics api-keys
|
|
386
|
+
|
|
387
|
+
# Get metrics for a specific API key
|
|
388
|
+
sentron metrics api-key <key-id>
|
|
389
|
+
|
|
91
390
|
# Output as JSON
|
|
92
391
|
sentron metrics get --json
|
|
93
392
|
```
|
|
94
393
|
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
### Mailing List
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# Check subscription status
|
|
400
|
+
sentron mailing-list status
|
|
401
|
+
sentron ml status # short alias
|
|
402
|
+
|
|
403
|
+
# Subscribe to updates
|
|
404
|
+
sentron mailing-list subscribe
|
|
405
|
+
sentron ml sub # short alias
|
|
406
|
+
|
|
407
|
+
# Unsubscribe from updates
|
|
408
|
+
sentron mailing-list unsubscribe
|
|
409
|
+
sentron ml unsub # short alias
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
95
414
|
### Documentation
|
|
96
415
|
|
|
97
416
|
```bash
|
|
98
417
|
# Search across all documentation
|
|
99
418
|
sentron docs search <query>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
sentron docs search oauth --json
|
|
419
|
+
sentron docs search "authentication"
|
|
420
|
+
sentron docs search "oauth" --json
|
|
103
421
|
|
|
104
422
|
# Get full documentation by URL(s)
|
|
105
|
-
sentron docs get /docs/api/docs-search
|
|
106
|
-
|
|
107
|
-
# Get multiple documentation items
|
|
108
|
-
sentron docs get /docs/api/docs-search /docs/changelogs/2025/12/23/230000
|
|
423
|
+
sentron docs get /docs/platform/api/docs-search
|
|
424
|
+
sentron docs get /docs/platform/api/docs-search /docs/changelogs/2025/12/23/230000
|
|
109
425
|
|
|
110
426
|
# Output as JSON
|
|
111
|
-
sentron docs get /docs/api/docs-search --json
|
|
427
|
+
sentron docs get /docs/platform/api/docs-search --json
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
### Health & Status
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
# Check system health
|
|
436
|
+
sentron health
|
|
437
|
+
|
|
438
|
+
# Detailed health check
|
|
439
|
+
sentron health --verbose
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
### Invitations (Your Pending Invitations)
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
# List invitations you've received
|
|
448
|
+
sentron invitations list
|
|
449
|
+
sentron invitations ls # alias
|
|
450
|
+
|
|
451
|
+
# Filter by type
|
|
452
|
+
sentron invitations list --type organization
|
|
453
|
+
sentron invitations list --type app
|
|
454
|
+
|
|
455
|
+
# Accept an invitation
|
|
456
|
+
sentron invitations accept <invitation-id>
|
|
457
|
+
|
|
458
|
+
# Decline an invitation
|
|
459
|
+
sentron invitations decline <invitation-id>
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Global Options
|
|
465
|
+
|
|
466
|
+
All commands support these options:
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
--json # Output as JSON (where applicable)
|
|
470
|
+
--help # Show help for a command
|
|
112
471
|
```
|
|
113
472
|
|
|
473
|
+
## JSON Output
|
|
474
|
+
|
|
475
|
+
Most commands support `--json` for scripting and CI/CD pipelines:
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
sentron org list --json | jq '.[0].id'
|
|
479
|
+
sentron metrics get --json > metrics.json
|
|
480
|
+
```
|
|
114
481
|
|
|
115
482
|
## Configuration
|
|
116
483
|
|
|
117
484
|
The CLI stores credentials in `~/.sentron/token`.
|
|
118
485
|
|
|
486
|
+
```bash
|
|
487
|
+
# Clear stored credentials
|
|
488
|
+
rm ~/.sentron/token
|
|
489
|
+
|
|
490
|
+
# Or just sign out
|
|
491
|
+
sentron auth signout
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
119
496
|
## Links
|
|
120
497
|
|
|
121
|
-
- Website
|
|
122
|
-
- Documentation
|
|
498
|
+
- **Website:** https://sentron.dev
|
|
499
|
+
- **Documentation:** https://sentron.dev/docs
|
|
500
|
+
- **API Reference:** https://sentron.dev/docs/platform/api
|
|
501
|
+
- **MCP Reference:** https://sentron.dev/docs/platform/mcp
|
|
502
|
+
- **Status:** https://sentron.dev/status
|
|
123
503
|
|
|
124
504
|
## License
|
|
125
505
|
|
|
126
|
-
Proprietary - All rights reserved. See https://sentron.dev for terms.
|
|
506
|
+
Proprietary - All rights reserved. See https://sentron.dev/terms for terms.
|