> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Projects

> Create and manage sustainability projects and tasks

<Note>
  **Early Access** - The Dcycle CLI is currently available for enterprise customers.
  [Contact us](/docs/support) to learn more about access.
</Note>

## Overview

Projects group sustainability work — carbon footprints, LCAs, ISO audits, and custom initiatives — with associated tasks, files, and deadlines. Each project has a type, date range, methodology, and a responsible user.

***

## List Projects

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project list
```

Output:

```
Showing 3 project(s) in Acme Corp
550e8400-... | 2024 Carbon Footprint | carbon_footprint | start=2024-01-01 | end=2024-12-31 | due=2025-03-31
661f9511-... | Q1 LCA Analysis       | acv              | start=2024-01-01 | end=2024-03-31 | due=2024-06-30
772a0622-... | Supplier Audit 2024   | suppliers        | start=2024-01-01 | end=2024-12-31 | due=2025-01-31
```

| Flag    | Description              |
| ------- | ------------------------ |
| `--org` | Organization ID override |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# JSON output for scripting
dcy project list --format json | jq '.[] | {id, name, project_type, due_date}'

# Use the ls alias
dcy project ls
```

***

## Show Project Details

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project show <project-id>
```

Output:

```
ID: 550e8400-e29b-41d4-a716-446655440000
Name: 2024 Carbon Footprint
Type: carbon_footprint
Start Date: 2024-01-01
End Date: 2024-12-31
Due Date: 2025-03-31
Description: Annual GHG inventory per GHG Protocol
Methodology: gri
Responsible: Jane Doe (jane@company.com)
Created: 2024-01-15
```

***

## Create Project

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project create \
  --name "2024 Carbon Footprint" \
  --type carbon \
  --start 2024-01-01 \
  --end 2024-12-31 \
  --due 2025-03-31
```

### Create Flags

| Flag            | Short | Required | Description                    |
| --------------- | ----- | -------- | ------------------------------ |
| `--name`        | `-n`  | Yes      | Project name                   |
| `--type`        | `-t`  | Yes      | Project type (see table below) |
| `--start`       | —     | Yes      | Start date (YYYY-MM-DD)        |
| `--end`         | —     | Yes      | End date (YYYY-MM-DD)          |
| `--due`         | —     | Yes      | Due date (YYYY-MM-DD)          |
| `--description` | `-d`  | No       | Project description            |
| `--methodology` | `-m`  | No       | `esrs` or `gri`                |
| `--org`         | —     | No       | Organization ID override       |

### Project Types

| Type               | Aliases    | Description                          |
| ------------------ | ---------- | ------------------------------------ |
| `carbon_footprint` | `carbon`   | Carbon footprint (GHG inventory)     |
| `custom`           | —          | Custom project                       |
| `einf`             | —          | EINF (non-financial reporting)       |
| `iso_14064`        | `iso14064` | ISO 14064 audit                      |
| `iso_14001`        | `iso14001` | ISO 14001 (environmental management) |
| `iso_9001`         | `iso9001`  | ISO 9001 (quality management)        |
| `acv`              | `lca`      | Life Cycle Assessment                |
| `visualization`    | `viz`      | Data visualization project           |
| `suppliers`        | —          | Supplier sustainability              |
| `logistics`        | —          | Logistics project                    |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Create with methodology
dcy project create \
  --name "EINF 2024" \
  --type einf \
  --start 2024-01-01 \
  --end 2024-12-31 \
  --due 2025-06-30 \
  --methodology esrs \
  --description "Annual EINF report following ESRS standards"
```

<Tip>
  The responsible user is automatically set to the currently authenticated user. Use `dcy project edit` to change it afterward.
</Tip>

***

## Edit Project

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project edit <project-id> --name "Updated Name" --due 2025-06-30
```

| Flag            | Short | Description                 |
| --------------- | ----- | --------------------------- |
| `--name`        | `-n`  | New project name            |
| `--description` | `-d`  | New description             |
| `--start`       | —     | New start date (YYYY-MM-DD) |
| `--end`         | —     | New end date (YYYY-MM-DD)   |
| `--due`         | —     | New due date (YYYY-MM-DD)   |
| `--responsible` | —     | Responsible user UUID       |
| `--org`         | —     | Organization ID override    |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Change responsible user
dcy project edit <project-id> --responsible <user-id>

# Extend deadline
dcy project edit <project-id> --due 2025-09-30
```

***

## Delete Project

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Interactive confirmation
dcy project delete <project-id>
```

Confirmation prompt:

```
Delete project 2024 Carbon Footprint (550e8400-...)? [y/N]
```

Output:

```
project deleted successfully: 2024 Carbon Footprint
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Skip confirmation
dcy project delete <project-id> --yes
```

| Flag    | Short | Default | Description              |
| ------- | ----- | ------- | ------------------------ |
| `--yes` | `-y`  | `false` | Skip confirmation prompt |
| `--org` | —     | —       | Organization ID override |

***

## Project Tasks

Tasks track individual work items within a project — data collection, reviews, approvals, and deadlines.

### List Tasks

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project task list <project-id>
```

Output:

```
Showing 4 task(s) for project 550e8400-...
abc123-... | Collect energy invoices  | stage=completed | assigned=Jane Doe  | due=2024-06-30
def456-... | Review vehicle data      | stage=pending   | assigned=John Smith| due=2024-07-15
ghi789-... | Upload purchase records  | stage=pending   | assigned=Alice Brown| due=2024-08-01
jkl012-... | Final review             | stage=pending   | assigned=Jane Doe  | due=2025-03-15
```

| Flag    | Description              |
| ------- | ------------------------ |
| `--org` | Organization ID override |

### Show Task Details

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project task show <task-id>
```

Output:

```
ID: abc123-def456-...
Name: Collect energy invoices
Description: Gather all electricity and gas invoices for 2024
Stage: completed
Category: data-collection
Due Date: 2024-06-30
Assigned to: Jane Doe (jane@company.com)
Projects: 2024 Carbon Footprint
```

### Create Task

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project task create <project-id> \
  --title "Collect energy invoices" \
  --assigned-to <user-id> \
  --due 2024-06-30
```

| Flag            | Short | Required | Default   | Description                     |
| --------------- | ----- | -------- | --------- | ------------------------------- |
| `--title`       | `-t`  | Yes      | —         | Task title                      |
| `--assigned-to` | `-a`  | Yes      | —         | User UUID to assign the task to |
| `--description` | `-d`  | No       | —         | Task description                |
| `--due`         | —     | No       | —         | Due date (YYYY-MM-DD)           |
| `--stage`       | —     | No       | `pending` | Initial task stage              |
| `--category`    | —     | No       | —         | Task category                   |
| `--org`         | —     | No       | —         | Organization ID override        |

### Edit Task

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project task edit <task-id> --stage completed
```

| Flag                | Short | Description                                        |
| ------------------- | ----- | -------------------------------------------------- |
| `--title`           | `-t`  | New title                                          |
| `--description`     | `-d`  | New description                                    |
| `--assigned-to`     | `-a`  | New assigned user UUID                             |
| `--due`             | —     | New due date (YYYY-MM-DD)                          |
| `--stage`           | —     | New stage                                          |
| `--category`        | —     | New category                                       |
| `--parent-task-id`  | —     | Set parent task UUID                               |
| `--update-children` | —     | Move eligible child tasks when completing a parent |
| `--org`             | —     | Organization ID override                           |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Complete a task and cascade to subtasks
dcy project task edit <task-id> --stage completed --update-children

# Reassign
dcy project task edit <task-id> --assigned-to <new-user-id>

# Make it a subtask
dcy project task edit <task-id> --parent-task-id <parent-id>
```

### Delete Task

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Interactive confirmation
dcy project task delete <task-id>
```

Confirmation prompt:

```
Delete task Collect energy invoices (abc123-...)? [y/N]
```

Output:

```
task deleted successfully: Collect energy invoices
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Skip confirmation
dcy project task delete <task-id> --yes
```

| Flag    | Short | Default | Description              |
| ------- | ----- | ------- | ------------------------ |
| `--yes` | `-y`  | `false` | Skip confirmation prompt |
| `--org` | —     | —       | Organization ID override |

***

## Typical Workflows

### Set Up a New Carbon Footprint Project

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 1. Create the project
PROJECT=$(dcy project create \
  --name "2024 Carbon Footprint" \
  --type carbon \
  --start 2024-01-01 \
  --end 2024-12-31 \
  --due 2025-03-31 \
  --methodology gri \
  --format json | jq -r '.id')

echo "Project: $PROJECT"

# 2. Create tasks for each data source
for task in "Collect energy invoices" "Upload vehicle data" "Send mobility surveys" "Review purchases"; do
  dcy project task create "$PROJECT" \
    --title "$task" \
    --assigned-to <user-id> \
    --due 2025-02-28
done

# 3. Upload related files
dcy file upload ./invoices.pdf --project-id "$PROJECT"
```

### Track Task Progress

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# List pending tasks
dcy project task list <project-id> --format json \
  | jq '.[] | select(.stage == "pending") | {id, title: (.name // .title), due_date}'

# Mark task as completed
dcy project task edit <task-id> --stage completed

# Check remaining tasks
dcy project task list <project-id>
```

### Audit Projects Across Organizations

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# List projects in a subsidiary
dcy project list --org <subsidiary-org-id> --format json \
  | jq '.[] | {name, project_type, due_date}'
```

### Count Tasks by Stage

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Summary of task progress
dcy project task list <project-id> --format json | \
  jq 'group_by(.stage // .status) | map({stage: .[0].stage // .[0].status, count: length})'
```

### Find Overdue Tasks

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Tasks past their due date
dcy project task list <project-id> --format json | \
  jq '.[] | select(.due_date < "2025-01-01" and (.stage == "pending" or .status == "pending")) | {title: (.name // .title), due_date}'
```

***

## JSON Response Examples

### Project

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "2024 Carbon Footprint",
  "project_type": "carbon_footprint",
  "start_date": "2024-01-01",
  "end_date": "2024-12-31",
  "due_date": "2025-03-31",
  "description": "Annual GHG inventory",
  "methodology": "gri",
  "responsible_user": {
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane@company.com"
  },
  "created_at": "2024-01-15T10:30:00Z"
}
```

### Task

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "abc123-def456-...",
  "title": "Collect energy invoices",
  "name": "Collect energy invoices",
  "description": "Gather all electricity and gas invoices",
  "stage": "completed",
  "status": "completed",
  "category": "data-collection",
  "due_date": "2024-06-30",
  "assigned_to": {
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane@company.com"
  },
  "projects": [
    { "name": "2024 Carbon Footprint" }
  ]
}
```

<Tip>
  Tasks have both `title` and `name` fields (they may differ), and both `stage` and `status` fields. In jq filters, use `(.name // .title)` and `(.stage // .status)` to handle both.
</Tip>

***

## Aliases

The `list` subcommand supports `ls` as a short alias:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy project ls        # same as dcy project list
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Files" icon="file" href="/cli/files">
    Upload documents and link them to projects
  </Card>

  <Card title="Invoices" icon="file-invoice" href="/cli/invoices">
    Manage energy invoices for Scope 1 and Scope 2 emissions
  </Card>

  <Card title="Members" icon="users" href="/cli/members">
    Find user IDs for task assignments
  </Card>

  <Card title="Configuration" icon="gear" href="/cli/configuration">
    Set up environments and API keys
  </Card>

  <Card title="MCP Tools" icon="robot" href="/mcp/projects">
    Query projects from AI assistants via MCP
  </Card>
</CardGroup>
