@grantex/cli 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +124 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # @grantex/cli
2
+
3
+ Command-line tool for the [Grantex](https://github.com/mishrasanjeev/grantex) delegated authorization protocol.
4
+
5
+ Manage agents, grants, audit logs, webhooks, policies, anomalies, and compliance exports from your terminal.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @grantex/cli
11
+ ```
12
+
13
+ ## Configure
14
+
15
+ Point the CLI at your Grantex server and set your API key:
16
+
17
+ ```bash
18
+ # Interactive setup
19
+ grantex config set --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app --key YOUR_API_KEY
20
+
21
+ # Or use environment variables
22
+ export GRANTEX_URL=https://grantex-auth-dd4mtrt2gq-uc.a.run.app
23
+ export GRANTEX_KEY=YOUR_API_KEY
24
+ ```
25
+
26
+ Config is saved to `~/.grantex/config.json`. Environment variables override the config file.
27
+
28
+ ```bash
29
+ # Verify your setup
30
+ grantex config show
31
+ ```
32
+
33
+ ## Commands
34
+
35
+ ### Agents
36
+
37
+ ```bash
38
+ grantex agents list
39
+ grantex agents register --name travel-booker --scopes calendar:read,payments:initiate
40
+ grantex agents get ag_01ABC...
41
+ grantex agents update ag_01ABC... --name new-name --scopes calendar:read,email:send
42
+ grantex agents delete ag_01ABC...
43
+ ```
44
+
45
+ ### Grants
46
+
47
+ ```bash
48
+ grantex grants list
49
+ grantex grants list --agent ag_01ABC... --status active
50
+ grantex grants revoke grnt_01XYZ...
51
+ ```
52
+
53
+ ### Tokens
54
+
55
+ ```bash
56
+ grantex tokens verify <jwt-token>
57
+ grantex tokens revoke <jti>
58
+ ```
59
+
60
+ ### Audit Log
61
+
62
+ ```bash
63
+ grantex audit list
64
+ grantex audit list --agent ag_01ABC... --action payment.initiated --since 2026-01-01
65
+ ```
66
+
67
+ ### Webhooks
68
+
69
+ ```bash
70
+ grantex webhooks list
71
+ grantex webhooks create --url https://example.com/hook --events grant.created,grant.revoked
72
+ grantex webhooks delete wh_01XYZ...
73
+ ```
74
+
75
+ Supported events: `grant.created`, `grant.revoked`, `token.issued`
76
+
77
+ ### Compliance
78
+
79
+ ```bash
80
+ # Summary stats
81
+ grantex compliance summary
82
+ grantex compliance summary --since 2026-01-01 --until 2026-02-01
83
+
84
+ # Export grants
85
+ grantex compliance export grants --format json --output grants.json
86
+
87
+ # Export audit log
88
+ grantex compliance export audit --format json --output audit.json
89
+
90
+ # Evidence pack (SOC 2, GDPR, etc.)
91
+ grantex compliance evidence-pack --framework soc2 --output evidence.json
92
+ ```
93
+
94
+ ### Anomaly Detection
95
+
96
+ ```bash
97
+ grantex anomalies detect
98
+ grantex anomalies list
99
+ grantex anomalies list --unacknowledged
100
+ grantex anomalies acknowledge anom_01XYZ...
101
+ ```
102
+
103
+ ## Local Development
104
+
105
+ For local development with `docker compose`:
106
+
107
+ ```bash
108
+ grantex config set --url http://localhost:3001 --key dev-api-key-local
109
+ ```
110
+
111
+ ## Requirements
112
+
113
+ - Node.js 18+
114
+
115
+ ## Links
116
+
117
+ - [Grantex Protocol](https://github.com/mishrasanjeev/grantex)
118
+ - [TypeScript SDK](https://www.npmjs.com/package/@grantex/sdk)
119
+ - [Self-Hosting Guide](https://github.com/mishrasanjeev/grantex/blob/main/docs/self-hosting.md)
120
+ - [Developer Portal](https://grantex.dev/dashboard)
121
+
122
+ ## License
123
+
124
+ Apache 2.0
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@grantex/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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",