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

Facilities

Facilities represent physical locations like offices, warehouses, factories, and stores.

List Facilities

dcy facility list
Output:
┌────────────────────────────────────────┬─────────────────────┬───────────┬─────────┬────────┐
│ ID                                     │ Name                │ Type      │ Country │ Status │
├────────────────────────────────────────┼─────────────────────┼───────────┼─────────┼────────┤
│ abc123-def456-...                      │ Madrid HQ           │ office    │ ES      │ active │
│ def456-ghi789-...                      │ Barcelona Warehouse │ warehouse │ ES      │ active │
│ ghi789-jkl012-...                      │ Valencia Factory    │ factory   │ ES      │ active │
└────────────────────────────────────────┴─────────────────────┴───────────┴─────────┴────────┘

Filter Facilities

# By status
dcy facility list --status active

# By type
dcy facility list --type warehouse

# By country
dcy facility list --country ES

# Combine filters
dcy facility list --type office --status active --country ES

Show Facility Details

dcy facility show abc123-def456-...
Output includes address, area (m²), energy configuration, and associated emissions data.

Create Facility

dcy facility create --name "Madrid HQ" --type office --country ES --address "Calle Gran Vía 1, Madrid"
FlagRequiredDescription
--nameYesFacility name
--typeYesFacility type (e.g. office, warehouse, factory)
--countryNoCountry code (default: ES)
--addressNoPhysical address
--statusNoactive or inactive (default: active)
--categoriesNoComma-separated categories
--logistic-factorNoLogistic factor

Edit Facility

dcy facility edit abc123-def456-... --name "Madrid HQ v2" --status active
Accepts the same flags as create (all optional — only provided fields are updated).

Delete Facility

dcy facility delete abc123-def456-... --yes
Use --yes to skip the confirmation prompt.

Vehicles

Manage your organization’s fleet of vehicles.

List Vehicles

dcy vehicle list
Output:
┌────────────────────────────────────────┬───────────┬──────────┬──────────┬────────┐
│ ID                                     │ Plate     │ Type     │ Fuel     │ Status │
├────────────────────────────────────────┼───────────┼──────────┼──────────┼────────┤
│ v1-abc123-...                          │ 1234 ABC  │ van      │ diesel   │ active │
│ v2-def456-...                          │ 5678 DEF  │ truck    │ diesel   │ active │
│ v3-ghi789-...                          │ 9012 GHI  │ car      │ electric │ active │
└────────────────────────────────────────┴───────────┴──────────┴──────────┴────────┘

Filter Vehicles

# By type
dcy vehicle list --type truck

# By ownership
dcy vehicle list --ownership owned

# By status
dcy vehicle list --status active

# By license plate
dcy vehicle list --license-plate "1234 ABC"

# Search text
dcy vehicle list --search "Tesla"

# Sort
dcy vehicle list --sort-by name --sort-order desc

# Pagination
dcy vehicle list --page 2 --size 100

Show Vehicle Details

dcy vehicle show v1-abc123-...

Create Vehicle

dcy vehicle create \
  --type passenger \
  --ownership owned \
  --license-plate "1234 ABC" \
  --unknown-vehicle-id <unknown-vehicle-id> \
  --vehicle-fuel-id <fuel-id>
FlagRequiredDescription
--typeYespassenger or freight
--ownershipYesowned or rented
--license-plateYesLicense plate
--unknown-vehicle-idYesUnknown vehicle type ID
--vehicle-fuel-idYesVehicle fuel ID
--nameNoDisplay name
--countryNoCountry ISO-2 code (default: ES)
--registration-yearNoRegistration year
--market-segmentNoMarket segment
--sizeNoVehicle size
--custom-emission-factor-idNoCustom emission factor ID
Use dcy vehicle-fuel list to browse available fuel IDs for your organization.

Edit Vehicle

dcy vehicle edit v1-abc123-... --name "Fleet Car 1" --status inactive
Accepts the same flags as create (all optional).

Delete Vehicle

dcy vehicle delete v1-abc123-... --yes

Diagnose Vehicle Issues

Scan a vehicle for configuration or data issues:
dcy vehicle diagnose

# With detailed output
dcy vehicle diagnose --verbose

Recalculate Vehicle Emissions

Trigger a recalculation of vehicle emissions:
# Preview what will be recalculated
dcy vehicle recalculate

# Force recalculation
dcy vehicle recalculate --force --yes

Bulk Upload Vehicles

Upload multiple vehicles from a CSV file:
# Generate template
dcy vehicle upload --template

# Generate template with real UUIDs from your organization
dcy vehicle upload --template-with-data

# Validate only (default)
dcy vehicle upload vehicles.csv

# Validate and upload
dcy vehicle upload vehicles.csv --no-dry-run

# Verbose output
dcy vehicle upload vehicles.csv --no-dry-run --verbose

Vehicle Fuels

List available fuel types for your organization:
# List all fuels
dcy vehicle-fuel list

# Search by name
dcy vehicle-fuel list --search diesel

# List generic fuel type categories
dcy vehicle-fuel types

Logistic Hubs

Hubs are distribution centers and logistic nodes used in transport calculations.

List Hubs

dcy hub list

# Filter
dcy hub list --name "Madrid" --type distribution --category national
dcy hub list --facility <facility-id>
dcy hub list --limit 50

Show Hub Details

dcy hub show <hub-id>

Create Hub

dcy hub create \
  --name "Madrid Distribution Center" \
  --address "Pol. Ind. Las Mercedes, Madrid" \
  --type distribution \
  --category national
FlagRequiredDescription
--nameYesHub name
--addressYesPhysical address
--typeYesHub type
--categoryYesHub category
--countryNoCountry code
--facilityNoAssociated facility ID
--superchargerNoHas supercharger (electric charging)

Edit Hub

dcy hub edit <hub-id> --name "New Name" --supercharger
Accepts the same flags as create (all optional). Use --no-supercharger to remove supercharger designation.

Delete Hub

dcy hub delete <hub-id> --yes

Common Options

All asset commands support these options:
OptionDescription
--format jsonOutput as JSON
--format csvOutput as CSV
--page NPagination (page number)
--size NItems per page (default: 50)
--sort FIELDSort by field

Export to File

# Export vehicles to JSON
dcy vehicle list --format json > vehicles.json

# Export facilities to CSV
dcy facility list --format csv > facilities.csv

Best Practices

Use CSV templates for bulk uploads: Generate a fresh template with --template, fill it with your data, then upload. This ensures correct column names and formats.
# Recommended workflow for vehicle upload
dcy vehicle upload --template > vehicles_template.csv
# Edit vehicles_template.csv with your data
dcy vehicle upload vehicles_template.csv

Next Steps

Emissions Data

Work with employees, invoices, and purchases

Logistics

Upload transport requests and fuel data