@grantex/cli
Command-line tool for the Grantex delegated authorization protocol.
Manage agents, grants, audit logs, webhooks, policies, anomalies, and compliance exports from your terminal.
Homepage | Docs | Sign Up Free | GitHub
Install
npm install -g @grantex/cli
Configure
Point the CLI at your Grantex server and set your API key:
grantex config set --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app --key YOUR_API_KEY
export GRANTEX_URL=https://grantex-auth-dd4mtrt2gq-uc.a.run.app
export GRANTEX_KEY=YOUR_API_KEY
Config is saved to ~/.grantex/config.json. Environment variables override the config file.
grantex config show
Commands
Agents
grantex agents list
grantex agents register --name travel-booker --scopes calendar:read,payments:initiate
grantex agents get ag_01ABC...
grantex agents update ag_01ABC... --name new-name --scopes calendar:read,email:send
grantex agents delete ag_01ABC...
Grants
grantex grants list
grantex grants list --agent ag_01ABC... --status active
grantex grants revoke grnt_01XYZ...
Tokens
grantex tokens verify <jwt-token>
grantex tokens revoke <jti>
Audit Log
grantex audit list
grantex audit list --agent ag_01ABC... --action payment.initiated --since 2026-01-01
Webhooks
grantex webhooks list
grantex webhooks create --url https://example.com/hook --events grant.created,grant.revoked
grantex webhooks delete wh_01XYZ...
Supported events: grant.created, grant.revoked, token.issued
Compliance
grantex compliance summary
grantex compliance summary --since 2026-01-01 --until 2026-02-01
grantex compliance export grants --format json --output grants.json
grantex compliance export audit --format json --output audit.json
grantex compliance evidence-pack --framework soc2 --output evidence.json
Anomaly Detection
grantex anomalies detect
grantex anomalies list
grantex anomalies list --unacknowledged
grantex anomalies acknowledge anom_01XYZ...
Local Development
For local development with docker compose:
grantex config set --url http://localhost:3001 --key dev-api-key-local
Requirements
Links
Grantex Ecosystem
This package is part of the Grantex ecosystem. See also:
License
Apache 2.0