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

# Quick Start

> Get started with the KDX CLI: install, authenticate, discover Kodexa resources, inspect projects, apply metadata, and run GitOps sync workflows.

## Prerequisites

Before you begin:

* Install the CLI from the [installation guide](/guides/kdx-cli/installation).
* Have access to a Kodexa Platform environment.
* Have an API key or use browser login if your environment supports it.

## Step 1: Log In Or Create A Profile

For interactive use, the simplest path is browser login:

```bash theme={null}
kdx login https://app.kodexa.com --profile dev
```

If browser login is not available, create a profile with an API key:

```bash theme={null}
kdx config set-profile dev \
  --url https://app.kodexa.com \
  --api-key <api-key>
```

Check the active profile:

```bash theme={null}
kdx config current-profile
kdx config list-profiles
```

## Step 2: Discover The Resource Surface

`kdx` reads the platform OpenAPI specification and builds the resource surface from the server you are connected to.

```bash theme={null}
kdx api-resources --refresh
```

Use this when you connect to a new environment, after a platform upgrade, or when a resource type does not resolve.

Current resources you will commonly work with include:

| Resource           | Use it for                                                                            |
| ------------------ | ------------------------------------------------------------------------------------- |
| `projects`         | Project workspaces that bind documents, Activity Plans, forms, users, and permissions |
| `activity-plans`   | Reusable automated business process definitions                                       |
| `task-templates`   | Human review, correction, approval, or exception work created by Activities           |
| `task-statuses`    | Organization-level task statuses bound into projects                                  |
| `data-definitions` | Business data models, validation, formulas, and event scripts                         |
| `data-forms`       | Review surfaces for task completion                                                   |
| `document-stores`  | Document intake and storage                                                           |
| `modules`          | Extraction, classification, parsing, and processing modules                           |
| `service-bridges`  | External API integrations used by Activity steps and scripts                          |
| `knowledge-sets`   | Reusable guidance, examples, and rules                                                |

## Step 3: Read Platform Resources

List resources:

```bash theme={null}
kdx get projects
kdx get activity-plans
kdx get data-definitions
kdx get document-stores
```

Get one resource:

```bash theme={null}
kdx get project invoice-processing
kdx describe activity-plan invoice-intake
```

Use machine-readable output when scripting:

```bash theme={null}
kdx get activity-plans -o json | jq '.[].slug'
kdx get data-definitions -o yaml
```

## Step 4: Apply Metadata

Use `kdx apply -f` for declarative create-or-update. There is no general `kdx create` command.

```bash theme={null}
kdx validate -f resources/activity-plans/invoice-intake.yaml
kdx apply -f resources/activity-plans/invoice-intake.yaml
```

Resource files should use current resource names:

```yaml theme={null}
type: activity-plan
slug: invoice-intake
name: Invoice Intake
description: Extract, review, reconcile, and post invoice data
```

For module resources, `kdx apply` also handles implementation packaging when module metadata declares implementation content. If the module has build steps, define them under `metadata.build`.

## Step 5: Use Focused Operational Commands

Create a project from a template:

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

Upload a document and watch it reach a processing label:

```bash theme={null}
kdx store upload acme-finance/invoice-processing-documents ./invoice.pdf
kdx store watch <document-family-id> --label PROCESSED --timeout 600
```

Export extracted data from the latest content object:

```bash theme={null}
kdx document-family data <document-family-id> -o extracted.json
```

Download the KDDB file for local inspection:

```bash theme={null}
kdx document-family content download <document-family-id> --latest -o invoice.kddb
kdx document info invoice.kddb
kdx document data exceptions invoice.kddb
```

## Step 6: Use Sync For GitOps

For real projects, use `kdx sync` instead of applying one file at a time.

```bash theme={null}
kdx sync pull --target finance-dev --env dev --discover
kdx sync push --target finance-dev --env dev --dry-run
kdx sync deploy --branch releases/2026.4 --dry-run
```

`sync-config.yaml` controls environments, targets, branch mappings, and tag mappings. See [Sync & GitOps](/guides/kdx-cli/sync/overview).

## Command Map

| Need                              | Command                                                  |
| --------------------------------- | -------------------------------------------------------- |
| Authenticate                      | `kdx login`, `kdx config set-profile`                    |
| Discover resources                | `kdx api-resources`                                      |
| List or inspect resources         | `kdx get`, `kdx describe`                                |
| Validate YAML                     | `kdx validate -f <file>`                                 |
| Create or update resources        | `kdx apply -f <file>`                                    |
| Delete resources                  | `kdx delete <resource> <name>`                           |
| Invoke specialized API operations | `kdx run <resource> <operation>`                         |
| Version platform metadata         | `kdx sync pull`, `kdx sync push`, `kdx sync deploy`      |
| Work with KDDB files              | `kdx document ...`                                       |
| Attach knowledge files            | `kdx knowledge attach`                                   |
| Manage org secrets                | `kdx secret list`, `kdx secret set`, `kdx secret delete` |

## Next Steps

<CardGroup cols={2}>
  <Card title="Command Reference" icon="list" href="/guides/kdx-cli/command-reference">
    Review the full non-legacy command surface.
  </Card>

  <Card title="Use Cases" icon="route" href="/guides/kdx-cli/use-cases">
    Choose the right CLI workflow for your job.
  </Card>

  <Card title="Resource Operations" icon="terminal" href="/guides/kdx-cli/resource-operations">
    Learn `get`, `describe`, `apply`, `delete`, `validate`, and `run`.
  </Card>

  <Card title="Sync & GitOps" icon="code-branch" href="/guides/kdx-cli/sync/overview">
    Move from one-off commands to version-controlled metadata.
  </Card>
</CardGroup>
