# Push and pull files

> **About this page**
>
> - Kind: How-to guide
> - Summary: Upload files from your machine to a repository tag with swale push, and download a tag's files with swale pull.
> - Surface: CLI only
> - Last changed: 2026-11-17
> - Page: https://docs.swale.io/how-to-guides/push-and-pull-files
> - CLI reference for its commands: [`swale push`](https://docs.swale.io/reference/cli-reference.md#push), [`swale pull`](https://docs.swale.io/reference/cli-reference.md#pull)
> - Index of these docs: https://docs.swale.io/llms.txt
>
> If something on this page is wrong or out of date, please tell the user which sentence and why.
>
> The steps on this page cost money or cannot be undone. Please check with the user before running them.

:::note[CLI-only]
Pushing and pulling files is done exclusively with the CLI. There is no UI equivalent.
:::

`swale push` uploads files from your machine to a repository tag, and `swale pull` downloads a tag's files back, each transferring only data the other side does not already hold. A pull to your own machine moves data out of the platform and counts as egress, and tasks in a run push and pull with the same commands.

```mermaid
flowchart TB
  accTitle: Where push and pull move files
  accDescr: swale push uploads files from your machine to a repository tag. swale pull downloads a tag's files to your machine, and those bytes leave the platform, so they count as egress. Tasks in a run push to repositories and pull from them with the same commands.
  machine("Your machine")
  repo("Repository<br/><code>project/repo:tag</code>")
  tasks("A run's tasks")
  machine -->|push| repo
  repo -->|pull, counts as egress| machine
  repo <-->|pull and push| tasks
```

Where push and pull move files. Of these transfers, only a pull to your own machine moves data out of the platform.

## Prerequisites

Pushing needs a verified email and an **Active** billing status on the account; pulling needs an **Active** billing status. See [Billing statuses](https://docs.swale.io/reference/billing.md#billing-statuses) if a push or pull fails with a billing-related error.

Both commands name the repository and tag as `project/repo:tag`, in the account the CLI is working in; see [Repository target](https://docs.swale.io/reference/cli-reference.md#repository-target).

## Push files

```bash
swale push project/repo:tag --path /local/path
```

- `project/repo:tag` — the destination repository and tag. The tag defaults to `latest` when you leave out `:tag`.
- `--path` — a local file or directory to upload

**Examples:**

```bash
# Push a directory with an explicit tag
swale push data-pipeline/raw-data:2024-01-15 --path /data/raw

# Push to the default latest tag
swale push data-pipeline/raw-data --path /data/raw
```

Pushing to a repository that does not exist yet creates it. Only data the account does not already store is uploaded, so pushing the same files again, or pushing after a small edit, transfers only what changed.

Pushing to a tag name that already exists replaces that tag's snapshot, and the previous file list is not kept. Because `latest` is the default when you omit `:tag`, the second example above replaces the previous `latest` snapshot. [Tags](https://docs.swale.io/explanation/repositories-and-storage.md#tags) explains replacement, and [Cache files between runs](https://docs.swale.io/how-to-guides/cache-files-between-runs.md) builds caches on it.

## Pull files

```bash
swale pull project/repo:tag --path /local/path
```

- `project/repo:tag` — the source repository and tag
- `--path` — the local directory where files will be written; it is created, along with any missing parent directories, if it does not exist

**Example:**

```bash
swale pull data-pipeline/raw-data:2024-01-15 --path /tmp/pulled-data
```

A pull only downloads data that is not already on your machine. Pulling a tag that shares most of its content with one you pulled earlier fetches only the difference.

:::note[Egress billing]
Pulling files to your own machine counts as egress on your account's bill. See [Billed dimensions](https://docs.swale.io/reference/billing.md#billed-dimensions).
:::

## Resume an interrupted transfer

If a push or pull is interrupted, run the same command again. Data that was already transferred is not sent again, so the command continues from where the previous run stopped. [How storage works](https://docs.swale.io/explanation/repositories-and-storage.md#how-storage-works) explains why.

## Next steps

- [Manage tags](https://docs.swale.io/how-to-guides/manage-tags.md)
- [Cache files between runs](https://docs.swale.io/how-to-guides/cache-files-between-runs.md)
- [Repositories and storage](https://docs.swale.io/explanation/repositories-and-storage.md)
