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

# Project Commands

> Use kdx project commands to create Kodexa projects from project templates and then manage project metadata with resource and sync commands.

## Overview

`kdx project` contains focused project operations that go beyond generic `get`, `describe`, `apply`, and `delete`.

Current command:

| Command              | Purpose                                  |
| -------------------- | ---------------------------------------- |
| `kdx project create` | Create a project from a project template |

Use project templates when a new project should start with the right document stores, data definitions, data forms, task templates, task statuses, Activity Plans, Service Bridges, modules, knowledge, and project bindings.

## Create A Project From A Template

```bash theme={null}
kdx project create \
  --template <org-slug/template-slug> \
  --org <org-slug> \
  --name <project-name>
```

Flags:

| Flag            | Required | Description                                                          |
| --------------- | -------- | -------------------------------------------------------------------- |
| `--template`    | Yes      | Project template reference, such as `kodexa/invoice-intake-template` |
| `--org`         | Yes      | Organization slug where the project will be created                  |
| `--name`        | Yes      | Project name. The CLI uses this as the initial slug.                 |
| `--description` | No       | Human-readable project description                                   |

## Examples

Create a project:

```bash theme={null}
kdx project create \
  --template kodexa/invoice-intake-template \
  --org acme-finance \
  --name invoice-processing
```

Create with a description:

```bash theme={null}
kdx project create \
  --template kodexa/claims-intake-template \
  --org acme-insurance \
  --name claims-intake \
  --description "Claims intake workflow for loss documents"
```

Output:

```text theme={null}
Project created: acme-finance/invoice-processing
  ID: 3f0354ee-5e0c-4d6b-9484-18b179bea100
```

## Find Templates And Organizations

```bash theme={null}
kdx get project-templates
kdx get organizations
```

Inspect a template before using it:

```bash theme={null}
kdx describe project-template invoice-intake-template
```

## What A Template Should Provide

A modern project template should bind the resources needed to run Activity-centered work:

| Resource         | Role                                                     |
| ---------------- | -------------------------------------------------------- |
| Activity Plans   | Automated business process definitions                   |
| Task Templates   | Human review, approval, correction, and exception work   |
| Task Statuses    | Statuses used by review queues and Activity decisions    |
| Data Definitions | Business data model and validation behavior              |
| Data Forms       | Task review surfaces                                     |
| Document Stores  | Uploaded documents and document families                 |
| Modules          | Extraction, classification, parsing, or processing steps |
| Service Bridges  | External systems used by Activity steps and scripts      |
| Knowledge Sets   | Domain guidance, examples, and rules                     |
| Triggers         | Events that start Activities in the project              |

## Complete Workflow

```bash theme={null}
# 1. Pick a template
kdx get project-templates

# 2. Create the project
kdx project create \
  --template kodexa/invoice-intake-template \
  --org acme-finance \
  --name invoice-processing

# 3. Review the created project
kdx describe project invoice-processing

# 4. Upload a document to the project's document store
kdx store upload acme-finance/invoice-processing-documents ./invoice.pdf

# 5. Watch processing
kdx store watch <document-family-id> --label PROCESSED

# 6. Export data
kdx document-family data <document-family-id> -o extracted.json
```

## Managing Projects After Creation

Use generic resource operations for normal project metadata:

```bash theme={null}
kdx get projects
kdx describe project invoice-processing
kdx apply -f kodexa-resources/projects/invoice-processing.yaml
kdx delete project invoice-processing
```

For version-controlled projects, use sync:

```bash theme={null}
kdx sync pull --target finance --env dev --filter '^invoice-processing$'
kdx sync push --target finance --env dev --dry-run
```

## Troubleshooting

### Organization Not Found

```bash theme={null}
kdx get organizations
```

Use the organization slug in `--org`.

### Template Not Found

```bash theme={null}
kdx get project-templates
kdx describe project-template <template-slug>
```

Check that the template reference includes the organization slug.

### Project Created But Resources Are Missing

Inspect the project and its resource bindings:

```bash theme={null}
kdx describe project invoice-processing
kdx run projects get-apiprojects-resources --id <project-id>
```
