# Upload files and export CRM data

Two commands move data between this machine and your company: one uploads a file, one exports CRM data.

The CLI is not released yet; see [Install the CLI](https://cadyworks.com/docs/install.md).

## Upload a file

```sh
cady local files upload ./plan.pdf
```

The file goes to your company’s Files and the result is printed as JSON. A file can be up to 10 MiB.

To publish a new version of an existing file and keep its id:

```sh
cady local files upload ./plan.pdf --file FILE_ID
```

## Export CRM data

```sh
cady local crm export --dataset parties --format csv --out parties.csv
```

- `--dataset` is one of `parties`, `lists`, `list_members`, `tracks` or `party_fields`.
- `--format` is `csv` or `json`.
- `--kind person|company` and `--archived` narrow `parties`. `--list-id` is for `list_members` and `--motion` for `tracks`.

## What can go wrong

- An upload that is refused prints the server’s reason. It is never retried automatically, and neither is an uncertain one.
- `--file` is refused if someone else changed the file while you were uploading. Run it again.
- `--out` does not replace an existing file unless you add `--force`.
- Both commands need a company: see [Choose a company](https://cadyworks.com/docs/company.md). An upload is a write, so an unconfirmed project company is refused.

Next: [Python SDK: your first call](https://cadyworks.com/docs/sdk.md)
