> ## 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.

# LCA Materials

> Link Life Cycle Assessment materials to ecoinvent activity names

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

## Overview

Link Life Cycle Assessment (LCA) materials to ecoinvent activity names for accurate environmental impact calculations. Materials can be linked in bulk from an Excel file or individually with explicit match pairs.

### Available Commands

| Command             | Description                                                            |
| ------------------- | ---------------------------------------------------------------------- |
| `dcy lca link`      | Link materials to ecoinvent activities (from file or explicit matches) |
| `dcy lca edit <id>` | Edit the ecoinvent match for a single material                         |

***

## Link from File

Upload an Excel file (.xlsx) with material-to-activity mappings:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy lca link --file-path materials.xlsx
```

Output:

```
LCA materials link file uploaded successfully
File ID: abc123-...
```

### Flags

| Flag          | Short | Default | Description                    |
| ------------- | ----- | ------- | ------------------------------ |
| `--file-path` | `-f`  | —       | Path to the Excel file (.xlsx) |
| `--dry-run`   | —     | `false` | Preview without uploading      |
| `--org`       | —     | —       | Organization ID override       |

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Preview without uploading
dcy lca link --file-path materials.xlsx --dry-run

# Upload with JSON output
dcy lca link --file-path materials.xlsx --format json
```

Dry-run output:

```
Dry run: would upload materials.xlsx (24.5 KB)
```

***

## Link with Explicit Matches

For materials that can't be auto-matched, specify the ecoinvent activity directly. This is an **alternative** to `--file-path` — they cannot be used together:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy lca link \
  --match "<material-id>=Electricity, low voltage {ES}| market for | Cut-off, U"
```

Multiple `--match` flags can be provided for different materials:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy lca link \
  --match "<id-1>=Activity name one" \
  --match "<id-2>=Activity name two"
```

### Flags

| Flag        | Short | Default | Description                                  |
| ----------- | ----- | ------- | -------------------------------------------- |
| `--match`   | `-m`  | —       | Match pair `UUID=activity_name` (repeatable) |
| `--dry-run` | —     | `false` | Preview without uploading                    |
| `--org`     | —     | —       | Organization ID override                     |

<Warning>
  `--file-path` and `--match` are mutually exclusive. Use one or the other, not both.
</Warning>

***

## Edit Material

Update the ecoinvent activity linked to a specific material:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy lca edit <material-id> \
  --activity "Electricity, low voltage {ES}| market for | Cut-off, U" \
  --country ES
```

Output:

```
Material: Electricity Grid Mix
ID: 550e8400-...
Country: ES
Current Match: None
New Match: Electricity, low voltage {ES}| market for | Cut-off, U
LCA materials link file uploaded successfully
File ID: abc123-...
```

### Flags

| Flag         | Short | Required | Description                                                                          |
| ------------ | ----- | -------- | ------------------------------------------------------------------------------------ |
| `--activity` | `-a`  | Yes      | New ecoinvent activity name                                                          |
| `--country`  | `-c`  | No       | ISO country code override                                                            |
| `--location` | `-l`  | No       | Ecoinvent product location (GLO, RER, RoW, etc.) — sets region for impact resolution |
| `--dry-run`  | —     | No       | Preview without updating                                                             |
| `--org`      | —     | No       | Organization ID override                                                             |

### Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Preview without uploading
dcy lca edit <material-id> --activity "Activity name" --dry-run

# Set country and location
dcy lca edit <material-id> \
  --activity "Electricity, low voltage {ES}| market for | Cut-off, U" \
  --country ES \
  --location RER

# JSON output
dcy lca edit <material-id> --activity "Activity name" --format json
```

***

## Typical Workflows

### Bulk Link Materials

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 1. Preview the upload
dcy lca link --file-path materials.xlsx --dry-run

# 2. Upload
dcy lca link --file-path materials.xlsx
```

### Fix Individual Matches

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 1. Check the current match
dcy lca edit <material-id> --activity "new activity" --dry-run

# 2. Apply the fix
dcy lca edit <material-id> --activity "new activity" --country ES
```

### Link Multiple Materials Without a File

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dcy lca link \
  --match "550e8400-...=Electricity, low voltage {ES}| market for | Cut-off, U" \
  --match "661f9511-...=Natural gas, high pressure {RER}| market group for | Cut-off, U"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Custom Emission Factors" icon="sliders" href="/cli/custom-ef">
    Upload organization-specific emission factors
  </Card>

  <Card title="Sold Products" icon="box" href="/cli/sold-products">
    Manage sold product records
  </Card>

  <Card title="Facilities" icon="warehouse" href="/cli/facilities">
    Manage physical locations
  </Card>

  <Card title="Projects" icon="clipboard-list" href="/cli/projects">
    Create and manage sustainability projects
  </Card>
</CardGroup>
