@grantex/cli 0.1.0 → 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/README.md +136 -0
- package/dist/commands/billing.d.ts +3 -0
- package/dist/commands/billing.d.ts.map +1 -0
- package/dist/commands/billing.js +46 -0
- package/dist/commands/billing.js.map +1 -0
- package/dist/commands/policies.d.ts +3 -0
- package/dist/commands/policies.d.ts.map +1 -0
- package/dist/commands/policies.js +90 -0
- package/dist/commands/policies.js.map +1 -0
- package/dist/commands/scim.d.ts +3 -0
- package/dist/commands/scim.d.ts.map +1 -0
- package/dist/commands/scim.js +78 -0
- package/dist/commands/scim.js.map +1 -0
- package/dist/commands/sso.d.ts +3 -0
- package/dist/commands/sso.d.ts.map +1 -0
- package/dist/commands/sso.js +55 -0
- package/dist/commands/sso.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -2
package/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# @grantex/cli
|
|
2
|
+
|
|
3
|
+
Command-line tool for the [Grantex](https://grantex.dev) delegated authorization protocol.
|
|
4
|
+
|
|
5
|
+
Manage agents, grants, audit logs, webhooks, policies, anomalies, and compliance exports from your terminal.
|
|
6
|
+
|
|
7
|
+
> **[Homepage](https://grantex.dev)** | **[Docs](https://grantex.dev/docs)** | **[Sign Up Free](https://grantex.dev/dashboard/signup)** | **[GitHub](https://github.com/mishrasanjeev/grantex)**
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @grantex/cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Configure
|
|
16
|
+
|
|
17
|
+
Point the CLI at your Grantex server and set your API key:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Interactive setup
|
|
21
|
+
grantex config set --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app --key YOUR_API_KEY
|
|
22
|
+
|
|
23
|
+
# Or use environment variables
|
|
24
|
+
export GRANTEX_URL=https://grantex-auth-dd4mtrt2gq-uc.a.run.app
|
|
25
|
+
export GRANTEX_KEY=YOUR_API_KEY
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Config is saved to `~/.grantex/config.json`. Environment variables override the config file.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Verify your setup
|
|
32
|
+
grantex config show
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
### Agents
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
grantex agents list
|
|
41
|
+
grantex agents register --name travel-booker --scopes calendar:read,payments:initiate
|
|
42
|
+
grantex agents get ag_01ABC...
|
|
43
|
+
grantex agents update ag_01ABC... --name new-name --scopes calendar:read,email:send
|
|
44
|
+
grantex agents delete ag_01ABC...
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Grants
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
grantex grants list
|
|
51
|
+
grantex grants list --agent ag_01ABC... --status active
|
|
52
|
+
grantex grants revoke grnt_01XYZ...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Tokens
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
grantex tokens verify <jwt-token>
|
|
59
|
+
grantex tokens revoke <jti>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Audit Log
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
grantex audit list
|
|
66
|
+
grantex audit list --agent ag_01ABC... --action payment.initiated --since 2026-01-01
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Webhooks
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
grantex webhooks list
|
|
73
|
+
grantex webhooks create --url https://example.com/hook --events grant.created,grant.revoked
|
|
74
|
+
grantex webhooks delete wh_01XYZ...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Supported events: `grant.created`, `grant.revoked`, `token.issued`
|
|
78
|
+
|
|
79
|
+
### Compliance
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Summary stats
|
|
83
|
+
grantex compliance summary
|
|
84
|
+
grantex compliance summary --since 2026-01-01 --until 2026-02-01
|
|
85
|
+
|
|
86
|
+
# Export grants
|
|
87
|
+
grantex compliance export grants --format json --output grants.json
|
|
88
|
+
|
|
89
|
+
# Export audit log
|
|
90
|
+
grantex compliance export audit --format json --output audit.json
|
|
91
|
+
|
|
92
|
+
# Evidence pack (SOC 2, GDPR, etc.)
|
|
93
|
+
grantex compliance evidence-pack --framework soc2 --output evidence.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Anomaly Detection
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
grantex anomalies detect
|
|
100
|
+
grantex anomalies list
|
|
101
|
+
grantex anomalies list --unacknowledged
|
|
102
|
+
grantex anomalies acknowledge anom_01XYZ...
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Local Development
|
|
106
|
+
|
|
107
|
+
For local development with `docker compose`:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
grantex config set --url http://localhost:3001 --key dev-api-key-local
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Requirements
|
|
114
|
+
|
|
115
|
+
- Node.js 18+
|
|
116
|
+
|
|
117
|
+
## Links
|
|
118
|
+
|
|
119
|
+
- [Grantex Protocol](https://github.com/mishrasanjeev/grantex)
|
|
120
|
+
- [TypeScript SDK](https://www.npmjs.com/package/@grantex/sdk)
|
|
121
|
+
- [Self-Hosting Guide](https://github.com/mishrasanjeev/grantex/blob/main/docs/self-hosting.md)
|
|
122
|
+
- [Developer Portal](https://grantex.dev/dashboard)
|
|
123
|
+
|
|
124
|
+
## Grantex Ecosystem
|
|
125
|
+
|
|
126
|
+
This package is part of the [Grantex](https://grantex.dev) ecosystem. See also:
|
|
127
|
+
|
|
128
|
+
- [`@grantex/sdk`](https://www.npmjs.com/package/@grantex/sdk) — Core TypeScript SDK
|
|
129
|
+
- [`grantex`](https://pypi.org/project/grantex/) — Python SDK
|
|
130
|
+
- [`@grantex/langchain`](https://www.npmjs.com/package/@grantex/langchain) — LangChain integration
|
|
131
|
+
- [`@grantex/mcp`](https://www.npmjs.com/package/@grantex/mcp) — MCP server for Claude Desktop / Cursor / Windsurf
|
|
132
|
+
- [`@grantex/vercel-ai`](https://www.npmjs.com/package/@grantex/vercel-ai) — Vercel AI SDK integration
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
Apache 2.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/commands/billing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,cAAc,IAAI,OAAO,CA4CxC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { requireClient } from '../client.js';
|
|
4
|
+
import { printRecord } from '../format.js';
|
|
5
|
+
export function billingCommand() {
|
|
6
|
+
const cmd = new Command('billing').description('Manage subscription and billing');
|
|
7
|
+
cmd
|
|
8
|
+
.command('status')
|
|
9
|
+
.description('Show current subscription status')
|
|
10
|
+
.action(async () => {
|
|
11
|
+
const client = await requireClient();
|
|
12
|
+
const sub = await client.billing.getSubscription();
|
|
13
|
+
printRecord({
|
|
14
|
+
plan: sub.plan,
|
|
15
|
+
status: sub.status,
|
|
16
|
+
currentPeriodEnd: sub.currentPeriodEnd ?? '—',
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
cmd
|
|
20
|
+
.command('checkout <plan>')
|
|
21
|
+
.description('Create a checkout session for a plan (pro or enterprise)')
|
|
22
|
+
.requiredOption('--success-url <url>', 'Redirect URL after successful payment')
|
|
23
|
+
.requiredOption('--cancel-url <url>', 'Redirect URL if user cancels')
|
|
24
|
+
.action(async (plan, opts) => {
|
|
25
|
+
const client = await requireClient();
|
|
26
|
+
const { checkoutUrl } = await client.billing.createCheckout({
|
|
27
|
+
plan: plan,
|
|
28
|
+
successUrl: opts.successUrl,
|
|
29
|
+
cancelUrl: opts.cancelUrl,
|
|
30
|
+
});
|
|
31
|
+
console.log(chalk.green('✓') + ' Checkout URL:');
|
|
32
|
+
console.log(checkoutUrl);
|
|
33
|
+
});
|
|
34
|
+
cmd
|
|
35
|
+
.command('portal')
|
|
36
|
+
.description('Create a billing portal session')
|
|
37
|
+
.requiredOption('--return-url <url>', 'URL to return to after portal session')
|
|
38
|
+
.action(async (opts) => {
|
|
39
|
+
const client = await requireClient();
|
|
40
|
+
const { portalUrl } = await client.billing.createPortal({ returnUrl: opts.returnUrl });
|
|
41
|
+
console.log(chalk.green('✓') + ' Portal URL:');
|
|
42
|
+
console.log(portalUrl);
|
|
43
|
+
});
|
|
44
|
+
return cmd;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=billing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/commands/billing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,iCAAiC,CAAC,CAAC;IAElF,GAAG;SACA,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,kCAAkC,CAAC;SAC/C,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QACrC,MA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E,CAAC,CAAC;QACvF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../src/commands/policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,eAAe,IAAI,OAAO,CAsGzC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { requireClient } from '../client.js';
|
|
4
|
+
import { printTable, printRecord, shortDate } from '../format.js';
|
|
5
|
+
export function policiesCommand() {
|
|
6
|
+
const cmd = new Command('policies').description('Manage authorization policies');
|
|
7
|
+
cmd
|
|
8
|
+
.command('list')
|
|
9
|
+
.description('List all policies')
|
|
10
|
+
.action(async () => {
|
|
11
|
+
const client = await requireClient();
|
|
12
|
+
const { policies } = await client.policies.list();
|
|
13
|
+
printTable(policies.map((p) => ({
|
|
14
|
+
ID: p.id,
|
|
15
|
+
NAME: p.name,
|
|
16
|
+
EFFECT: p.effect,
|
|
17
|
+
PRIORITY: String(p.priority),
|
|
18
|
+
CREATED: shortDate(p.createdAt),
|
|
19
|
+
})), ['ID', 'NAME', 'EFFECT', 'PRIORITY', 'CREATED']);
|
|
20
|
+
});
|
|
21
|
+
cmd
|
|
22
|
+
.command('get <policyId>')
|
|
23
|
+
.description('Get details for a policy')
|
|
24
|
+
.action(async (policyId) => {
|
|
25
|
+
const client = await requireClient();
|
|
26
|
+
const p = await client.policies.get(policyId);
|
|
27
|
+
printRecord({
|
|
28
|
+
id: p.id,
|
|
29
|
+
name: p.name,
|
|
30
|
+
effect: p.effect,
|
|
31
|
+
priority: String(p.priority),
|
|
32
|
+
agentId: p.agentId ?? '(any)',
|
|
33
|
+
principalId: p.principalId ?? '(any)',
|
|
34
|
+
scopes: p.scopes?.join(', ') ?? '(any)',
|
|
35
|
+
timeOfDayStart: p.timeOfDayStart ?? '—',
|
|
36
|
+
timeOfDayEnd: p.timeOfDayEnd ?? '—',
|
|
37
|
+
createdAt: shortDate(p.createdAt),
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
cmd
|
|
41
|
+
.command('create')
|
|
42
|
+
.description('Create a new policy')
|
|
43
|
+
.requiredOption('--name <name>', 'Policy name')
|
|
44
|
+
.requiredOption('--effect <effect>', 'Effect: allow or deny')
|
|
45
|
+
.option('--priority <n>', 'Priority (lower = higher priority)', '100')
|
|
46
|
+
.option('--agent-id <id>', 'Restrict to specific agent')
|
|
47
|
+
.option('--principal-id <id>', 'Restrict to specific principal')
|
|
48
|
+
.option('--scopes <scopes>', 'Comma-separated scopes')
|
|
49
|
+
.option('--time-start <HH:mm>', 'Time-of-day window start')
|
|
50
|
+
.option('--time-end <HH:mm>', 'Time-of-day window end')
|
|
51
|
+
.action(async (opts) => {
|
|
52
|
+
const client = await requireClient();
|
|
53
|
+
const policy = await client.policies.create({
|
|
54
|
+
name: opts.name,
|
|
55
|
+
effect: opts.effect,
|
|
56
|
+
priority: parseInt(opts.priority, 10),
|
|
57
|
+
...(opts.agentId !== undefined ? { agentId: opts.agentId } : {}),
|
|
58
|
+
...(opts.principalId !== undefined ? { principalId: opts.principalId } : {}),
|
|
59
|
+
...(opts.scopes !== undefined ? { scopes: opts.scopes.split(',').map((s) => s.trim()) } : {}),
|
|
60
|
+
...(opts.timeStart !== undefined ? { timeOfDayStart: opts.timeStart } : {}),
|
|
61
|
+
...(opts.timeEnd !== undefined ? { timeOfDayEnd: opts.timeEnd } : {}),
|
|
62
|
+
});
|
|
63
|
+
console.log(chalk.green('✓') + ` Policy created: ${policy.id}`);
|
|
64
|
+
});
|
|
65
|
+
cmd
|
|
66
|
+
.command('update <policyId>')
|
|
67
|
+
.description('Update a policy')
|
|
68
|
+
.option('--name <name>', 'New name')
|
|
69
|
+
.option('--effect <effect>', 'New effect')
|
|
70
|
+
.option('--priority <n>', 'New priority')
|
|
71
|
+
.action(async (policyId, opts) => {
|
|
72
|
+
const client = await requireClient();
|
|
73
|
+
const policy = await client.policies.update(policyId, {
|
|
74
|
+
...(opts.name !== undefined ? { name: opts.name } : {}),
|
|
75
|
+
...(opts.effect !== undefined ? { effect: opts.effect } : {}),
|
|
76
|
+
...(opts.priority !== undefined ? { priority: parseInt(opts.priority, 10) } : {}),
|
|
77
|
+
});
|
|
78
|
+
console.log(chalk.green('✓') + ` Policy updated: ${policy.id}`);
|
|
79
|
+
});
|
|
80
|
+
cmd
|
|
81
|
+
.command('delete <policyId>')
|
|
82
|
+
.description('Delete a policy')
|
|
83
|
+
.action(async (policyId) => {
|
|
84
|
+
const client = await requireClient();
|
|
85
|
+
await client.policies.delete(policyId);
|
|
86
|
+
console.log(chalk.green('✓') + ` Policy ${policyId} deleted.`);
|
|
87
|
+
});
|
|
88
|
+
return cmd;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=policies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.js","sourceRoot":"","sources":["../../src/commands/policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC;IAEjF,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC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AG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAA0B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjF,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClF,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,oBAAoB,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEL,GAAG;SACA,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CAAC,iBAAiB,CAAC;SAC9B,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;QACjC,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QACrC,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,WAAW,QAAQ,WAAW,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.d.ts","sourceRoot":"","sources":["../../src/commands/scim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,WAAW,IAAI,OAAO,CAwFrC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { requireClient } from '../client.js';
|
|
4
|
+
import { printTable, printRecord, shortDate } from '../format.js';
|
|
5
|
+
export function scimCommand() {
|
|
6
|
+
const cmd = new Command('scim').description('Manage SCIM provisioning');
|
|
7
|
+
// ── scim tokens ──────────────────────────────────────────────────────────
|
|
8
|
+
const tokens = new Command('tokens').description('Manage SCIM bearer tokens');
|
|
9
|
+
tokens
|
|
10
|
+
.command('list')
|
|
11
|
+
.description('List SCIM tokens')
|
|
12
|
+
.action(async () => {
|
|
13
|
+
const client = await requireClient();
|
|
14
|
+
const { tokens: list } = await client.scim.listTokens();
|
|
15
|
+
printTable(list.map((t) => ({
|
|
16
|
+
ID: t.id,
|
|
17
|
+
LABEL: t.label,
|
|
18
|
+
CREATED: shortDate(t.createdAt),
|
|
19
|
+
'LAST USED': t.lastUsedAt ? shortDate(t.lastUsedAt) : '—',
|
|
20
|
+
})), ['ID', 'LABEL', 'CREATED', 'LAST USED']);
|
|
21
|
+
});
|
|
22
|
+
tokens
|
|
23
|
+
.command('create')
|
|
24
|
+
.description('Create a new SCIM token')
|
|
25
|
+
.requiredOption('--label <label>', 'Human-readable label')
|
|
26
|
+
.action(async (opts) => {
|
|
27
|
+
const client = await requireClient();
|
|
28
|
+
const result = await client.scim.createToken({ label: opts.label });
|
|
29
|
+
console.log(chalk.green('✓') + ` SCIM token created: ${result.id}`);
|
|
30
|
+
console.log(`Token: ${chalk.bold(result.token)} (shown once — store it securely)`);
|
|
31
|
+
});
|
|
32
|
+
tokens
|
|
33
|
+
.command('revoke <tokenId>')
|
|
34
|
+
.description('Revoke a SCIM token')
|
|
35
|
+
.action(async (tokenId) => {
|
|
36
|
+
const client = await requireClient();
|
|
37
|
+
await client.scim.revokeToken(tokenId);
|
|
38
|
+
console.log(chalk.green('✓') + ` SCIM token ${tokenId} revoked.`);
|
|
39
|
+
});
|
|
40
|
+
cmd.addCommand(tokens);
|
|
41
|
+
// ── scim users ───────────────────────────────────────────────────────────
|
|
42
|
+
const users = new Command('users').description('View SCIM-provisioned users');
|
|
43
|
+
users
|
|
44
|
+
.command('list')
|
|
45
|
+
.description('List SCIM users')
|
|
46
|
+
.option('--start-index <n>', 'Start index', '1')
|
|
47
|
+
.option('--count <n>', 'Page size', '25')
|
|
48
|
+
.action(async (opts) => {
|
|
49
|
+
const client = await requireClient();
|
|
50
|
+
const result = await client.scim.listUsers({
|
|
51
|
+
startIndex: parseInt(opts.startIndex, 10),
|
|
52
|
+
count: parseInt(opts.count, 10),
|
|
53
|
+
});
|
|
54
|
+
printTable(result.Resources.map((u) => ({
|
|
55
|
+
ID: u.id,
|
|
56
|
+
USERNAME: u.userName,
|
|
57
|
+
DISPLAY: u.displayName ?? '—',
|
|
58
|
+
ACTIVE: u.active ? 'yes' : 'no',
|
|
59
|
+
})), ['ID', 'USERNAME', 'DISPLAY', 'ACTIVE']);
|
|
60
|
+
});
|
|
61
|
+
users
|
|
62
|
+
.command('get <userId>')
|
|
63
|
+
.description('Get a SCIM user by ID')
|
|
64
|
+
.action(async (userId) => {
|
|
65
|
+
const client = await requireClient();
|
|
66
|
+
const u = await client.scim.getUser(userId);
|
|
67
|
+
printRecord({
|
|
68
|
+
id: u.id,
|
|
69
|
+
userName: u.userName,
|
|
70
|
+
displayName: u.displayName ?? '—',
|
|
71
|
+
active: u.active ? 'yes' : 'no',
|
|
72
|
+
emails: u.emails.map((e) => e.value).join(', ') || '—',
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
cmd.addCommand(users);
|
|
76
|
+
return cmd;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=scim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.js","sourceRoot":"","sources":["../../src/commands/scim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,UAAU,W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|
|
1
|
+
{"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../src/commands/sso.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,UAAU,IAAI,OAAO,CAsDpC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { requireClient } from '../client.js';
|
|
4
|
+
import { printRecord, shortDate } from '../format.js';
|
|
5
|
+
export function ssoCommand() {
|
|
6
|
+
const cmd = new Command('sso').description('Manage SSO configuration');
|
|
7
|
+
cmd
|
|
8
|
+
.command('get')
|
|
9
|
+
.description('Show current SSO configuration')
|
|
10
|
+
.action(async () => {
|
|
11
|
+
const client = await requireClient();
|
|
12
|
+
const config = await client.sso.getConfig();
|
|
13
|
+
printRecord({
|
|
14
|
+
issuerUrl: config.issuerUrl,
|
|
15
|
+
clientId: config.clientId,
|
|
16
|
+
redirectUri: config.redirectUri,
|
|
17
|
+
updatedAt: shortDate(config.updatedAt),
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
cmd
|
|
21
|
+
.command('configure')
|
|
22
|
+
.description('Create or update SSO configuration')
|
|
23
|
+
.requiredOption('--issuer-url <url>', 'OIDC issuer URL')
|
|
24
|
+
.requiredOption('--client-id <id>', 'OIDC client ID')
|
|
25
|
+
.requiredOption('--client-secret <secret>', 'OIDC client secret')
|
|
26
|
+
.requiredOption('--redirect-uri <uri>', 'Callback redirect URI')
|
|
27
|
+
.action(async (opts) => {
|
|
28
|
+
const client = await requireClient();
|
|
29
|
+
await client.sso.createConfig({
|
|
30
|
+
issuerUrl: opts.issuerUrl,
|
|
31
|
+
clientId: opts.clientId,
|
|
32
|
+
clientSecret: opts.clientSecret,
|
|
33
|
+
redirectUri: opts.redirectUri,
|
|
34
|
+
});
|
|
35
|
+
console.log(chalk.green('✓') + ' SSO configuration saved.');
|
|
36
|
+
});
|
|
37
|
+
cmd
|
|
38
|
+
.command('delete')
|
|
39
|
+
.description('Delete SSO configuration')
|
|
40
|
+
.action(async () => {
|
|
41
|
+
const client = await requireClient();
|
|
42
|
+
await client.sso.deleteConfig();
|
|
43
|
+
console.log(chalk.green('✓') + ' SSO configuration deleted.');
|
|
44
|
+
});
|
|
45
|
+
cmd
|
|
46
|
+
.command('login-url <org>')
|
|
47
|
+
.description('Get the SSO login URL for an organization')
|
|
48
|
+
.action(async (org) => {
|
|
49
|
+
const client = await requireClient();
|
|
50
|
+
const { authorizeUrl } = await client.sso.getLoginUrl(org);
|
|
51
|
+
console.log(authorizeUrl);
|
|
52
|
+
});
|
|
53
|
+
return cmd;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=sso.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sso.js","sourceRoot":"","sources":["../../src/commands/sso.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,UAAU,UAAU;IACxB,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAEvE,GAAG;SACA,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAC5C,WAAW,CAAC;YACV,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,WAAW,EAAE,MAAM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,EAAE,GAAW,EAAE,EAAE;QAC5B,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QACrC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,10 @@ import { configCommand } from './commands/config.js';
|
|
|
8
8
|
import { grantsCommand } from './commands/grants.js';
|
|
9
9
|
import { tokensCommand } from './commands/tokens.js';
|
|
10
10
|
import { webhooksCommand } from './commands/webhooks.js';
|
|
11
|
+
import { policiesCommand } from './commands/policies.js';
|
|
12
|
+
import { billingCommand } from './commands/billing.js';
|
|
13
|
+
import { scimCommand } from './commands/scim.js';
|
|
14
|
+
import { ssoCommand } from './commands/sso.js';
|
|
11
15
|
const program = new Command();
|
|
12
16
|
program
|
|
13
17
|
.name('grantex')
|
|
@@ -21,6 +25,10 @@ program.addCommand(auditCommand());
|
|
|
21
25
|
program.addCommand(webhooksCommand());
|
|
22
26
|
program.addCommand(complianceCommand());
|
|
23
27
|
program.addCommand(anomaliesCommand());
|
|
28
|
+
program.addCommand(policiesCommand());
|
|
29
|
+
program.addCommand(billingCommand());
|
|
30
|
+
program.addCommand(scimCommand());
|
|
31
|
+
program.addCommand(ssoCommand());
|
|
24
32
|
program.parseAsync(process.argv).catch((err) => {
|
|
25
33
|
console.error((err instanceof Error ? err.message : String(err)));
|
|
26
34
|
process.exit(1);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAA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AC,CAAC;AAEpB,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC;AACpC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;AACnC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;AACtC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACxC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC;AACvC,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;AACtC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;AACrC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;AAEjC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACtD,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grantex/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI tool for local Grantex development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"grantex": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -32,6 +33,15 @@
|
|
|
32
33
|
"engines": {
|
|
33
34
|
"node": ">=18.0.0"
|
|
34
35
|
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"grantex",
|
|
38
|
+
"cli",
|
|
39
|
+
"ai-agents",
|
|
40
|
+
"authorization",
|
|
41
|
+
"oauth",
|
|
42
|
+
"jwt",
|
|
43
|
+
"developer-tools"
|
|
44
|
+
],
|
|
35
45
|
"license": "Apache-2.0",
|
|
36
46
|
"repository": {
|
|
37
47
|
"type": "git",
|