Skip to main content
Early Access - The Dcycle CLI is currently available for enterprise customers. Contact us to learn more about access.

Overview

Most CLI commands operate within an organization context. You must set an active organization before working with facilities, vehicles, emissions data, etc.

List Organizations

View all organizations you have access to:
dc org list
Output:
┌────────────────────────────────────────┬──────────────────┬─────────┬────────┐
│ ID                                     │ Name             │ Country │ Status │
├────────────────────────────────────────┼──────────────────┼─────────┼────────┤
│ ff4adcc7-8172-45fe-9cf1-e90a6de53aa9   │ Acme Corp        │ ES      │ active │
│ a1b2c3d4-5678-90ab-cdef-1234567890ab   │ Acme Logistics   │ ES      │ active │
│ b2c3d4e5-6789-01bc-def0-234567890abc   │ Acme UK          │ UK      │ active │
└────────────────────────────────────────┴──────────────────┴─────────┴────────┘

Filtering Organizations

# Filter by country
dc org list --country ES

# Filter by status
dc org list --status active

# Search by name
dc org list --name "Acme"

Set Active Organization

Switch your working context to a specific organization:
dc org set ff4adcc7-8172-45fe-9cf1-e90a6de53aa9
Output:
✓ Organization set to: Acme Corp (ff4adcc7-8172-45fe-9cf1-e90a6de53aa9)
The active organization is stored in your config file (~/.dcycle/config.yaml) and persists across sessions.

Show Organization Details

View detailed information about a specific organization:
dc org show ff4adcc7-8172-45fe-9cf1-e90a6de53aa9
Output:
Organization: Acme Corp

  ID:           ff4adcc7-8172-45fe-9cf1-e90a6de53aa9
  Country:      ES
  Sector:       Manufacturing
  Status:       active
  VAT:          B12345678
  Employees:    250
  API Enabled:  Yes
  Plan:         Enterprise
  Created:      2023-01-15

Organization Tree

For holdings with subsidiaries, view the organizational hierarchy:
dc org tree
Output:
Acme Holding Corp
├── Acme Spain
│   ├── Acme Madrid Office
│   └── Acme Barcelona Warehouse
├── Acme UK
│   └── Acme London Office
└── Acme Logistics

View Tree from Root

If you’re in a subsidiary, view the full tree from the root parent:
dc org tree --from-root

Quick Organization Switch

For scripts that need to work across multiple organizations:
# Save current context
ORIGINAL_ORG=$(dc auth status --json | jq -r '.organization_id')

# Work with another organization
dc org set a1b2c3d4-5678-90ab-cdef-1234567890ab
dc vehicle list --format json > logistics_vehicles.json

# Restore original context
dc org set $ORIGINAL_ORG

JSON Output

For scripting and automation:
# List organizations as JSON
dc org list --format json

# Show organization as JSON
dc org show ff4adcc7-8172-45fe-9cf1-e90a6de53aa9 --format json
Example JSON output:
{
  "id": "ff4adcc7-8172-45fe-9cf1-e90a6de53aa9",
  "name": "Acme Corp",
  "country": "ES",
  "sector": "Manufacturing",
  "status": "active",
  "employee_count": 250,
  "api_enabled": true
}

Current Context

Check your current organization context:
dc auth status
The output shows your active organization along with authentication details.

Next Steps