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:
dcy 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
dcy org list --country ES

# Filter by status
dcy org list --status active

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

Set Active Organization

Switch your working context to a specific organization:
dcy 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:
dcy 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:
dcy 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:
dcy org tree --from-root

Edit Organization

Update details of an organization:
dcy org edit <org-id> --name "New Name" --country ES --sector manufacture
FlagDescription
--nameNew organization name
--countryCountry code
--sectorBusiness sector
--employeesEmployee count
--statusactive or inactive
--api-enabledEnable API access
--no-api-enabledDisable API access
--enabledEnabled flag: true or false

Create Organization

Create a new organization:
dcy org create --name "Subsidiary SL" --country ES --sector manufacture --vat B12345678
FlagRequiredDescription
--nameNoCompany name
--countryNoCountry code
--sectorNoBusiness sector
--vatNoVAT number
--employeesNoEmployee count
--is-groupNoCreate as group/holding organization
--user-idNoUser ID to assign as admin

Invite User

Invite a user to the active organization:
dcy org invite user@example.com --role member --lang es
FlagDefaultDescription
--rolememberRole: admin, member, or fund
--send-emailtrueSend invitation email
--langenEmail language

Bulk Create Child Organizations

Create multiple child organizations from a CSV file:
# Preview without creating
dcy org bulk children.csv --dry-run

# Create organizations
dcy org bulk children.csv --yes
FlagDescription
--dry-runPreview without creating
--sectorDefault sector for new organizations (default: other)
--yesSkip confirmation prompt

Quick Organization Switch

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

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

# Restore original context
dcy org set $ORIGINAL_ORG

JSON Output

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

# Show organization as JSON
dcy 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
}

Sort and Filter

# Sort by name ascending
dcy org list --sort-by name --sort-order asc

# Show with child organization counts
dcy org list --show-hierarchy

Current Context

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

Next Steps

Members

Manage organization members

Assets

Manage facilities, vehicles, and hubs

Emissions Data

Work with emissions data sources