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

Overview

The employee command tracks how employees travel to and from work, covering GHG Protocol Scope 3 Category 7 (Employee Commuting). Employees have commuting periods that define their transport mode, distance, and frequency.
dcy employee <subcommand> [flags]

Available Commands

CommandDescription
listList employees
showShow employee details
create employeeCreate an employee (with optional inline period)
create add-periodAdd a commute period to an existing employee
create import-periodsBulk import employee periods from CSV
set infoUpdate employee name, email, or situation
set update-historicBulk update historic periods from CSV
deleteDelete an employee

List Employees

dcy employee list [flags]

# Aliases
dcy employee ls

Examples

# List all employees
dcy employee list

# Filter by year
dcy employee list --year 2024

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

# JSON output
dcy employee list --format json

Flags

FlagShortDefaultDescription
--yearFilter by year
--page1Page number
--size50Page size
--orgOrganization ID override

Show Employee Details

dcy employee show <employee-id>

Examples

dcy employee show 00000000-0000-0000-0000-000000000000

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

Flags

FlagDescription
--orgOrganization ID override

Create Employee

Create an employee with optional inline commuting period data.
dcy employee create employee [flags]

Examples

# Basic employee
dcy employee create employee --name "Jane Doe" --email jane@company.com

# With inline commuting period
dcy employee create employee \
  --name "Jane Doe" \
  --email jane@company.com \
  --transport car \
  --start-date 2024-01-01 \
  --end-date 2024-12-31 \
  --total-km 4800 \
  --fuel diesel \
  --vehicle-size medium

Flags

FlagShortDefaultDescription
--name-nEmployee name
--email-eEmployee email
--situationactiveEmployee situation (active, inactive, terminated)
--statusuploadedEmployee status
--orgOrganization ID override

Period Flags (optional — creates period if --transport is set)

FlagShortDefaultDescription
--transport-tCommute transport mode
--start-datePeriod start date (YYYY-MM-DD)
--end-datePeriod end date (YYYY-MM-DD)
--total-kmTotal km per period
--weekly-travelsComma-separated days worked per week
--daily-trips2Number of daily trips
--vehicle-sizeVehicle size (small, medium, large)
--fuel-fFuel type
--renewable-energyRenewable energy (yes, no, do_not_know)
--carpoolfalseEnable carpooling
--commuting-typein_itinereCommuting type
--response-mediummanualResponse medium
--period-situationactivePeriod situation

Add Period to Employee

Add a commuting period to an existing employee.
dcy employee create add-period <employee-id> [flags]

Examples

dcy employee create add-period <employee-id> \
  --transport car \
  --start-date 2024-01-01 \
  --end-date 2024-12-31 \
  --total-km 4800

dcy employee create add-period <employee-id> \
  --transport bus \
  --start-date 2024-01-01 \
  --end-date 2024-06-30 \
  --total-km 2400 \
  --weekly-travels "1,2,3,4,5"

Flags

Required: --transport, --start-date, --end-date. All period flags from create employee apply.

Import Employees from CSV

Bulk import employee commute periods from a CSV file.
dcy employee create import-periods <file.csv> [flags]

Examples

# Dry run (preview)
dcy employee create import-periods employees.csv --dry-run

# Import
dcy employee create import-periods employees.csv

# Skip overlapping periods
dcy employee create import-periods employees.csv --skip-overlap

Flags

FlagShortDefaultDescription
--dry-runfalsePreview changes without importing
--skip-overlapfalseSkip periods that overlap existing ones
--yes-yfalseSkip confirmation prompt
--orgOrganization ID override

CSV Columns

Required: employee_id, transport_type, start_date, end_date. Optional: total_km, weekly_travels, daily_trips, vehicle_size, fuel_type, renewable_energy, commuting_type, response_medium, situation, carpool.

Edit Employee

Update employee name, email, or situation.
dcy employee set info <employee-id> [flags]

Examples

dcy employee set info <employee-id> --name "Jane Smith"
dcy employee set info <employee-id> --email jane.smith@company.com
dcy employee set info <employee-id> --situation inactive

Flags

FlagShortDescription
--name-nNew name
--email-eNew email
--situation-sNew situation (active, inactive, terminated)

Update Historic Periods

Bulk update employee historic periods from a CSV file.
dcy employee set update-historic <file.csv> [flags]

Examples

# Preview changes
dcy employee set update-historic periods.csv --dry-run

# Apply updates (interactive confirmation)
dcy employee set update-historic periods.csv

Flags

FlagDefaultDescription
--dry-runfalsePreview changes without updating
--yesfalseSkip confirmation prompt
--orgOrganization ID override

CSV Columns

Required: employee_historic_id. At least one of: total_km, start_date, end_date.

Delete Employee

dcy employee delete <employee-id> [flags]

# Aliases
dcy employee rm <employee-id>

Examples

# Interactive confirmation
dcy employee delete <employee-id>

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

Flags

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

Common Options

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