cost-guard auth¶
Manage API credentials for Cost Guard backend.
Usage¶
cost-guard auth <SUBCOMMAND> [OPTIONS]
Subcommands¶
auth set¶
Store API key for authentication.
cost-guard auth set <API_KEY>
API key must start with cg_live_ (obtained from https://app.costcut.dev/settings).
Example:
cost-guard auth set cg_live_abc123xyz...
Token is stored locally (encrypted on disk, not sent to server).
auth status¶
Check current authentication status.
cost-guard auth status
Displays:
- Logged-in email
- Plan type (Free / Pro)
- Masked API key
Example output:
Logged in as: [email protected] (plan: Pro)
Token: cg_live_***...xyz
auth logout¶
Remove stored API key.
cost-guard auth logout
After logout, you must run auth set again before using push or other authenticated commands.
Token Storage¶
API keys are stored in:
- macOS / Linux:
~/.cost-guard/token - Windows:
%APPDATA%\.cost-guard\token
File is readable only by your user account.