grant

command
v1.42.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package main implements commerce-grant — a CLI for manually granting subscriptions to users (e.g. gifting a Pro plan to a beta tester).

Usage:

commerce-grant --email hunter@example.com --plan world-pro
commerce-grant --email hunter@example.com --plan world-pro --months 6 --reason "beta gift"

Auth: pulls the IAM admin client-id/secret and the commerce service token from environment variables (or, in production, from KMS under project hanzo-commerce / path /admin/grant-token). No user-visible UI.

The CLI talks to the same datastore commerce uses at runtime. It calls commerce.App.Bootstrap() to wire the DB, IAM middleware, and KMS client, then invokes billing/grant.Grant() directly. This keeps the grant path tested end-to-end without needing an HTTP server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL