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

Overview

The hub command manages logistic hubs — distribution centers and logistic nodes used in transport emission calculations.
dcy hub <subcommand> [flags]

Available Commands

CommandDescription
listList logistic hubs
showShow hub details
createCreate a logistic hub
editEdit a logistic hub
deleteDelete a logistic hub

List Hubs

dcy hub list [flags]

# Aliases
dcy hub ls

Examples

# List all hubs
dcy hub list

# Filter by name and type
dcy hub list --name "Madrid" --type owned

# Filter by category
dcy hub list --category warehouse_ambient

# Filter by facility
dcy hub list --facility <facility-id>

# Filter by status
dcy hub list --status active

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

# JSON output
dcy hub list --format json | jq '.[] | {id, name, type, category}'

Flags

FlagShortDefaultDescription
--name-nFilter by name
--type-tFilter by type (owned, subcontracted)
--category-cFilter by category (see table below)
--facility-fFilter by facility ID
--statusFilter by status
--page1Page number
--size50Items per page
--orgOrganization ID override

Hub Categories

transshipment_ambient, transshipment_mixed, storage_transhipment_ambient, storage_transhipment_mixed, warehouse_ambient, warehouse_mixed, liquid_bulk_terminals_ambient, liquid_bulk_terminals_mixed, maritime_container_terminals_ambient, maritime_container_terminals_temperature_controlled

Output

Showing 3 of 3 hubs in Acme Corp
h1-abc123-... | Madrid DC     | owned          | warehouse_ambient | ES | supercharger=false | active
h2-def456-... | Barcelona Hub | subcontracted  | transshipment_ambient | ES | supercharger=true  | active
h3-ghi789-... | Valencia Port | owned          | maritime_container_terminals_ambient | ES | supercharger=false | active
Columns: ID, name, type, category, country, supercharger status, status.

Show Hub Details

dcy hub show <hub-id>

Examples

dcy hub show 00000000-0000-0000-0000-000000000000

# JSON output
dcy hub show <hub-id> --format json

Flags

FlagDescription
--orgOrganization ID override

Output

ID: h1-abc123-...
Name: Madrid DC
Address: Pol. Ind. Las Mercedes, Madrid
Type: owned
Category: warehouse_ambient
Country: ES
Facility ID: abc123-def456-...
Status: active
Supercharger: false
CO2e: 0.00000 tCO2e

Create Hub

dcy hub create [flags]

Examples

dcy hub create \
  --name "Madrid Distribution Center" \
  --address "Pol. Ind. Las Mercedes, Madrid" \
  --type owned \
  --category warehouse_ambient

dcy hub create \
  --name "Port Terminal" \
  --address "Valencia Port" \
  --type subcontracted \
  --category maritime_container_terminals_ambient \
  --country ES \
  --facility <facility-id>

Flags

FlagShortRequiredDefaultDescription
--name-nYesHub name
--address-aYesPhysical address
--type-tYesHub type (owned, subcontracted)
--category-cYesHub category (see categories above)
--countryNoCountry code
--facilityNoAssociated facility ID
--superchargerNofalseHas supercharger (electric charging)
--orgNoOrganization ID override

Edit Hub

dcy hub edit <hub-id> [flags]

Examples

dcy hub edit <hub-id> --name "New Name"
dcy hub edit <hub-id> --address "New Address" --supercharger
dcy hub edit <hub-id> --no-supercharger
dcy hub edit <hub-id> --type subcontracted --category transshipment_ambient

Flags

Accepts the same flags as create (all optional). Additionally:
FlagDescription
--no-superchargerSet supercharger to false

Delete Hub

dcy hub delete <hub-id> [flags]

# Aliases
dcy hub rm <hub-id>

Examples

# Interactive confirmation
dcy hub delete <hub-id>

# Skip confirmation
dcy hub delete <hub-id> --yes

Flags

FlagShortDefaultDescription
--yes-yfalseSkip confirmation prompt
--orgOrganization ID override

Output

Confirmation prompt:
Delete hub Madrid DC (h1-abc123-...)? [y/N]
hub deleted successfully: Madrid DC

Common Options

All hub commands support:
FlagDescription
--format jsonJSON output (default: text)
--verboseShow HTTP request/response details
--timeoutRequest timeout in seconds

Workflows

Export Hubs for Reporting

# Export all hubs as JSON
dcy hub list --format json --size 100 > hubs.json

# Group hubs by type
dcy hub list --format json | jq 'group_by(.type) | map({type: .[0].type, count: length})'

# Find hubs with supercharger
dcy hub list --format json | jq '[.[] | select(.supercharger == true)]'

Piping with jq

# List hub IDs for scripting
dcy hub list --format json | jq -r '.[].id'

# Get hub names and categories
dcy hub list --format json | jq '.[] | {name, type, category}'