@grantex/cli
v0.1.2
Published
CLI tool for local Grantex development
Downloads
275
Maintainers
Readme
@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/cliConfigure
Point the CLI at your Grantex server and set your API key:
# Interactive setup
grantex config set --url https://grantex-auth-dd4mtrt2gq-uc.a.run.app --key YOUR_API_KEY
# Or use environment variables
export GRANTEX_URL=https://grantex-auth-dd4mtrt2gq-uc.a.run.app
export GRANTEX_KEY=YOUR_API_KEYConfig is saved to ~/.grantex/config.json. Environment variables override the config file.
# Verify your setup
grantex config showCommands
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-01Webhooks
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
# Summary stats
grantex compliance summary
grantex compliance summary --since 2026-01-01 --until 2026-02-01
# Export grants
grantex compliance export grants --format json --output grants.json
# Export audit log
grantex compliance export audit --format json --output audit.json
# Evidence pack (SOC 2, GDPR, etc.)
grantex compliance evidence-pack --framework soc2 --output evidence.jsonAnomaly 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-localRequirements
- Node.js 18+
Links
Grantex Ecosystem
This package is part of the Grantex ecosystem. See also:
@grantex/sdk— Core TypeScript SDKgrantex— Python SDK@grantex/langchain— LangChain integration@grantex/mcp— MCP server for Claude Desktop / Cursor / Windsurf@grantex/vercel-ai— Vercel AI SDK integration
License
Apache 2.0
