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

# add

> Upload a file or directory to the workspace

The `add` command uploads a local file or directory into a workspace. Note that Diversion tracks changes inside a workspace automatically -- `add` is only needed to upload content from outside the workspace, for example from scripts.

```bash theme={null}
dv add --local_path <local_path> --path <path> [--repo_id <repo_id>] [--workspace_id <workspace_id>]
```

**Required Parameters:**

* `--local_path` - The path to the local file or directory to upload
* `--path` - The target path in the workspace

**Optional Parameters:**

* `--repo_id` - The ID of the repository to upload the file to (defaults to the current workspace's repo)
* `--workspace_id` - The ID of the workspace to upload the file to (defaults to the current workspace)

An example of uploading a build artifact into the workspace:

```bash theme={null}
dv add --local_path ./build/output.pak --path /builds/output.pak
```

<Note>
  After using `add`, you'll still need to commit the changes to save them to your branch.
</Note>
