ByCloud Docs
GuidesCLIAPISDK

Environment Variables

Configure the CLI using environment variables. These take precedence over config file settings but are overridden by command-line flags.

Authentication

BYCLOUD_API_KEY

API key for authentication (format: ACCESS_KEY_ID:SECRET_ACCESS_KEY)

Example: ak_prod_abc123:sk_secret_xyz789

BYCLOUD_ACCESS_KEY_ID

API access key ID (alternative to BYCLOUD_API_KEY)

Example: ak_prod_abc123

BYCLOUD_SECRET_ACCESS_KEY

API secret access key (use with BYCLOUD_ACCESS_KEY_ID)

Example: sk_secret_xyz789

Connection

BYCLOUD_REGION

Default region for API requests

Example: spo1

BYCLOUD_ENDPOINT

Override the API endpoint URL

Example: https://api.custom.bycloud.com

BYCLOUD_TIMEOUT

Request timeout duration

Example: 60s

Configuration

BYCLOUD_PROFILE

Default profile to use from config file

Example: production

BYCLOUD_CONFIG_FILE

Path to config file

Example: ~/.config/bycloud/config.yaml

Output

BYCLOUD_OUTPUT

Default output format

Example: text

NO_COLOR

Disable color output (standard env var)

Example: 1

BYCLOUD_DEBUG

Enable debug logging

Example: 1

Usage Example

Set environment variables in your shell or CI/CD pipeline:

# Set credentials export BYCLOUD_API_KEY="ak_prod_abc123:sk_secret_xyz789" export BYCLOUD_REGION="spo1" export BYCLOUD_OUTPUT="text" # Run commands bycloud compute instances list

CI/CD Example (GitHub Actions)

jobs: deploy: runs-on: ubuntu-latest env: BYCLOUD_API_KEY: ${{ secrets.BYCLOUD_API_KEY }} BYCLOUD_REGION: spo1 steps: - name: Deploy run: bycloud compute instances create --name app-server