Authentication
Authenticate with the Beltic platform using the CLI
Authentication
The Beltic CLI supports authentication with the Beltic platform, allowing you to manage your developer identity and create agents directly from the command line.
Login
Authenticate with your Beltic API key:
beltic loginThis will:
- Prompt for your API key (masked input)
- Validate the key against the Beltic platform
- Store credentials securely in
~/.beltic/credentials - Save configuration to
~/.beltic/config.yaml
Getting an API Key
- Log in to the Beltic Console
- Navigate to Settings > API Keys
- Click Create New Key
- Copy the key (it's only shown once)
Non-interactive Mode
For CI/CD pipelines or scripts, pass the API key directly:
beltic login --api-key YOUR_API_KEYOr use the --non-interactive flag:
beltic login --api-key $BELTIC_API_KEY --non-interactiveCustom API URL
For development or self-hosted deployments:
beltic login --api-url https://custom.api.urlWhoami
Display your current authenticated identity:
beltic whoamiExample output:
Current Developer
----------------------------------------
Developer ID: dev_m5x7k9p_a1b2c3d4e5f6
Legal Name: Acme Corporation
KYB Tier: tier_2 (Enhanced)
Verified: VerifiedJSON Output
For programmatic use, output as JSON:
beltic whoami --json{
"id": "dev_m5x7k9p_a1b2c3d4e5f6",
"type": "developers",
"attributes": {
"legal_name": "Acme Corporation",
"kyb_tier": "tier_2",
"verification_status": "verified"
}
}Credential Storage
Credentials are stored in ~/.beltic/ with restricted permissions:
| File | Purpose | Permissions |
|---|---|---|
~/.beltic/credentials | API key storage | 0600 (owner read/write only) |
~/.beltic/config.yaml | Configuration | 0644 |
Configuration File
The config.yaml file stores:
api_url: https://api.beltic.dev
current_developer_id: dev_xxxTroubleshooting
"Not logged in" Error
If you see this error when running commands:
Error: Not logged in. Run 'beltic login' first.Run beltic login to authenticate.
"Session expired" Error
If your API key has been revoked or expired:
Error: Session expired or invalid. Run 'beltic login' to re-authenticate.Generate a new API key in the Console and run beltic login again.
Clearing Credentials
To log out and clear stored credentials, delete the credentials file:
rm ~/.beltic/credentials