@totoday/quinn-cli 0.1.1 → 0.1.2
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/CHANGELOG.md +11 -0
- package/README.md +69 -0
- package/dist/index.js +2 -13
- package/package.json +2 -2
- package/src/index.ts +2 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @totoday/quinn-cli
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 629fba0: Unify organization query semantics around `organizations current`:
|
|
8
|
+
- remove `organizations details` command from CLI
|
|
9
|
+
- make `organizations current` return organization details with aggregate stats
|
|
10
|
+
- align SDK and skill documentation with the simplified flow
|
|
11
|
+
- @totoday/quinn-sdk@0.1.2
|
|
12
|
+
|
|
3
13
|
## 0.1.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -8,3 +18,4 @@
|
|
|
8
18
|
- default to interactive hidden password prompt
|
|
9
19
|
- add `--password-stdin` for script-friendly secure input
|
|
10
20
|
- deprecate plain-text `--password` with warning
|
|
21
|
+
- @totoday/quinn-sdk@0.1.1
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @totoday/quinn-cli
|
|
2
|
+
|
|
3
|
+
CLI for Quinn organization/member/role/competency queries.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g @totoday/quinn-cli
|
|
9
|
+
quinn --help
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
One-off without global install:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @totoday/quinn-cli --help
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
Login (recommended: hidden password prompt):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
quinn login --email <email>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Login via stdin (scripts/password managers):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
echo "<password>" | quinn login --email <email> --password-stdin
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Check organization:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
quinn organizations current
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Common Commands
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# members
|
|
42
|
+
quinn members find alice
|
|
43
|
+
quinn members list --privilege owner,admin
|
|
44
|
+
quinn members get <memberId1,memberId2,user@example.com>
|
|
45
|
+
|
|
46
|
+
# roles / levels / competencies
|
|
47
|
+
quinn roles list
|
|
48
|
+
quinn levels list --role-id <roleId>
|
|
49
|
+
quinn competencies list --role-id <roleId> --level-id <levelId>
|
|
50
|
+
|
|
51
|
+
# endorsements
|
|
52
|
+
quinn endorsements find --uid <uid> --competency-id <competencyId>
|
|
53
|
+
quinn endorsements list --uids <u1,u2> --competency-ids <c1,c2>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Config
|
|
57
|
+
|
|
58
|
+
CLI reads config from:
|
|
59
|
+
|
|
60
|
+
- `~/.config/quinn/config.json` (default)
|
|
61
|
+
- `QUINN_CONFIG_PATH` (override)
|
|
62
|
+
|
|
63
|
+
Runtime override order:
|
|
64
|
+
|
|
65
|
+
1. command flags
|
|
66
|
+
2. env vars (`QUINN_API_URL`, `QUINN_API_TOKEN`, `QUINN_ORG_ID`)
|
|
67
|
+
3. config file
|
|
68
|
+
|
|
69
|
+
If `apiUrl` is missing, default is `https://api.lunapark.com`.
|
package/dist/index.js
CHANGED
|
@@ -186,7 +186,7 @@ program
|
|
|
186
186
|
' quinn login --email <email>',
|
|
187
187
|
' echo "<password>" | quinn login --email <email> --password-stdin',
|
|
188
188
|
' quinn config set --api-url http://localhost:8090 --api-token <token> --org-id <orgId>',
|
|
189
|
-
' quinn organizations
|
|
189
|
+
' quinn organizations current',
|
|
190
190
|
' quinn members find alice',
|
|
191
191
|
' quinn members get user-1,user-2,user@example.com',
|
|
192
192
|
].join('\n'))
|
|
@@ -313,7 +313,7 @@ const orgCmd = program
|
|
|
313
313
|
.description('organization metadata and high-level stats');
|
|
314
314
|
orgCmd
|
|
315
315
|
.command('current')
|
|
316
|
-
.description('get current organization
|
|
316
|
+
.description('get current organization details with aggregate stats')
|
|
317
317
|
.action(function () {
|
|
318
318
|
return withHandler(async () => {
|
|
319
319
|
const { runtimeConfig } = getContext(this);
|
|
@@ -321,21 +321,10 @@ orgCmd
|
|
|
321
321
|
print(await quinn.organizations.current());
|
|
322
322
|
});
|
|
323
323
|
});
|
|
324
|
-
orgCmd
|
|
325
|
-
.command('details')
|
|
326
|
-
.description('get organization details with aggregate stats')
|
|
327
|
-
.action(function () {
|
|
328
|
-
return withHandler(async () => {
|
|
329
|
-
const { runtimeConfig } = getContext(this);
|
|
330
|
-
const quinn = createClient(runtimeConfig);
|
|
331
|
-
print(await quinn.organizations.getDetails());
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
324
|
orgCmd.addHelpText('after', [
|
|
335
325
|
'',
|
|
336
326
|
'Examples:',
|
|
337
327
|
' quinn organizations current',
|
|
338
|
-
' quinn organizations details',
|
|
339
328
|
].join('\n'));
|
|
340
329
|
const membersCmd = program.command('members').description('member operations');
|
|
341
330
|
membersCmd
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totoday/quinn-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"bin": {
|
|
5
5
|
"quinn": "dist/index.js"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"commander": "^13.1.0",
|
|
9
|
-
"@totoday/quinn-sdk": "0.1.
|
|
9
|
+
"@totoday/quinn-sdk": "0.1.2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/node": "^22.13.10",
|
package/src/index.ts
CHANGED
|
@@ -228,7 +228,7 @@ program
|
|
|
228
228
|
' quinn login --email <email>',
|
|
229
229
|
' echo "<password>" | quinn login --email <email> --password-stdin',
|
|
230
230
|
' quinn config set --api-url http://localhost:8090 --api-token <token> --org-id <orgId>',
|
|
231
|
-
' quinn organizations
|
|
231
|
+
' quinn organizations current',
|
|
232
232
|
' quinn members find alice',
|
|
233
233
|
' quinn members get user-1,user-2,user@example.com',
|
|
234
234
|
].join('\n')
|
|
@@ -364,7 +364,7 @@ const orgCmd = program
|
|
|
364
364
|
.description('organization metadata and high-level stats');
|
|
365
365
|
orgCmd
|
|
366
366
|
.command('current')
|
|
367
|
-
.description('get current organization
|
|
367
|
+
.description('get current organization details with aggregate stats')
|
|
368
368
|
.action(function () {
|
|
369
369
|
return withHandler(async () => {
|
|
370
370
|
const { runtimeConfig } = getContext(this);
|
|
@@ -372,24 +372,12 @@ orgCmd
|
|
|
372
372
|
print(await quinn.organizations.current());
|
|
373
373
|
});
|
|
374
374
|
});
|
|
375
|
-
|
|
376
|
-
orgCmd
|
|
377
|
-
.command('details')
|
|
378
|
-
.description('get organization details with aggregate stats')
|
|
379
|
-
.action(function () {
|
|
380
|
-
return withHandler(async () => {
|
|
381
|
-
const { runtimeConfig } = getContext(this);
|
|
382
|
-
const quinn = createClient(runtimeConfig);
|
|
383
|
-
print(await quinn.organizations.getDetails());
|
|
384
|
-
});
|
|
385
|
-
});
|
|
386
375
|
orgCmd.addHelpText(
|
|
387
376
|
'after',
|
|
388
377
|
[
|
|
389
378
|
'',
|
|
390
379
|
'Examples:',
|
|
391
380
|
' quinn organizations current',
|
|
392
|
-
' quinn organizations details',
|
|
393
381
|
].join('\n')
|
|
394
382
|
);
|
|
395
383
|
|