Early Access - The Dcycle CLI is currently available for enterprise customers.
Contact us to learn more about access.
Logging In
The CLI uses the same credentials as the Dcycle web application.
Interactive Login
This opens an interactive prompt for email and password.
Non-Interactive Login
For automation and scripting:
dc auth login --email user@example.com --password your_password
Avoid storing passwords in scripts. Consider using environment variables or secure secret management.
Checking Session Status
View your current authentication state:
Output example:
✓ Authenticated
User: John Doe (john@company.com)
Organization: Acme Corp
Host: https://api.dcycle.io
Token: eyJhbG...xyz (valid)
Logging Out
This removes your stored credentials from the local configuration.
Configuring Environments
The CLI can connect to different Dcycle environments.
List Available Hosts
Output:
Available hosts:
* prod https://api.dcycle.io (current)
staging https://api.staging.dcycle.io
local http://localhost:8000
Switch Environment
# Production (default)
dc config host set prod
# Staging environment
dc config host set staging
# Local development
dc config host set local
Development and staging environments automatically disable SSL verification for self-signed certificates.
Configuration File
The CLI stores configuration in ~/.dcycle/config.yaml:
# ~/.dcycle/config.yaml
host: https://api.dcycle.io
token: eyJhbGciOiJIUzI1NiIs...
organization_id: ff4adcc7-8172-45fe-9cf1-e90a6de53aa9
organization_name: Acme Corp
user_email: john@company.com
user_name: John Doe
Configuration Priority
- Command-line flags (highest priority)
- Environment variables (
DCYCLE_API_KEY, DCYCLE_HOST)
- Configuration file (
~/.dcycle/config.yaml)
- Defaults (lowest priority)
Environment Variables
For CI/CD and automation:
| Variable | Description |
|---|
DCYCLE_API_KEY | API key for authentication (alternative to login) |
DCYCLE_HOST | Override the API host URL |
DCYCLE_ORG_ID | Override the active organization |
# Example: Using API key in CI/CD
export DCYCLE_API_KEY=your_api_key
export DCYCLE_ORG_ID=your_org_id
dc vehicle list
Troubleshooting
Permission Errors (403/404)
-
Verify your session is valid:
-
Check you’re in the correct organization:
dc org list
dc org set <correct-org-id>
Token Expired
Re-authenticate:
SSL Certificate Errors
For staging/development environments:
dc config host set staging # Auto-disables SSL verification
Next Steps