# Vendia CLI command - file

## `share file`

Add, edit, & remove files from **project** **workspaces**.

## Commands for `share file`

Manage files in a **project**.

### Usage

```
share file <subcommand>
```

| Subcommand | Description |
| :-- | :-- |
| [`file add`](https://docs.vendia.com/platform/cli/commands/file#file-add) | Add a file |
| [`file get`](https://docs.vendia.com/platform/cli/commands/file#file-get) | Get a file |
| [`file list`](https://docs.vendia.com/platform/cli/commands/file#file-list) | List current files |
| [`file remove`](https://docs.vendia.com/platform/cli/commands/file#file-remove) | Remove a file |
| [`file update`](https://docs.vendia.com/platform/cli/commands/file#file-update) | Update a file |

### Examples for `share file`

```
❯ Get file info

share file get --uni <uniName> --node <nodeName> --id <fileId>

❯ List files

share file list --uni <uniName> --node <nodeName>

❯ Create file

share file add --uni <uniName> --node <nodeName> --source-bucket bucket-xyz --source-key foo.json --source-region us-east-1 --destination-key bar.json --copy-strategy NEVER --read '*' --write brett@vendia.net,PartnerANodeName

share file add --uni <uniName> --node <nodeName> --source-uri "<CSP URI>/foo.json" --destination-key bar.json --copy-strategy NEVER --read '*' --write brett@vendia.net,PartnerANodeName

❯ Update file

share file update --uni <uniName> --node <nodeName> --id <fileId> --source-bucket bucket-xyz --source-key foo.json --source-region us-east-1 --destination-key bar.json

share file update --uni <uniName> --node <nodeName> --id <fileId> --source-uri "<CSP URI>/foo.json" --destination-key bar.json

❯ Remove file

share file remove --uni <uniName> --node <nodeName> --id <fileId>
```

## `file add`

Add a file.

### Usage for `file add`

```
share file add
```

### Flags for `file add`

- `uni` ( _option_) \- Name of **project**  
- `node` ( _option_) \- Name of **workspace**  
- `source-uri` ( _option_) \- Source URI  
- `source-bucket` ( _option_) \- Source Bucket  
- `source-key` ( _option_) \- Source Key  
- `source-region` ( _option_) \- Source Region  
- `destination-key` ( _option_) \- Destination Key  
- `copy-strategy` ( _option_) \- File copy strategy  
- `read` ( _option_) \- Comma separated list of **workspaces** that have read permission for this file  
- `write` ( _option_) \- Comma separated list of **workspaces** that have write permission for this file  
- `json` ( _boolean_) \- Output return values as JSON

### Examples for `file add`

```
share file add --uni <uniName> --node <nodeName> --source-bucket bucket-xyz --source-key foo.json --source-region us-east-1 --destination-key bar.json --copy-strategy NEVER --read '*' --write brett@vendia.net,PartnerANodeName

share file add --uni <uniName> --node <nodeName> --source-uri "<CSP URI>/foo.json" --destination-key bar.json --copy-strategy NEVER --read '*' --write brett@vendia.net,PartnerANodeName
```

## `file get`

Get a file.

### Usage for `file get`

```
share file get
```

### Flags for `file get`

- `uni` ( _option_) \- Name of **project**  
- `node` ( _option_) \- Name of **workspace**  
- `id` ( _option_) \- File id  
- `json` ( _boolean_) \- Output return values as JSON

### Examples for `file get`

```
share file get --uni <uniName> --node <nodeName> --id <fileId>
```

## `file list`

List current files.

### Usage for `file list`

```
share file list
```

### Flags for `file list`

- `uni` ( _option_) \- Name of **project**  
- `node` ( _option_) \- Name of **workspace**  
- `json` ( _boolean_) \- Output return values as JSON

### Examples for `file list`

```
share file list --uni <uniName> --node <nodeName>
```

## `file remove`

Remove a file.

### Usage for `file remove`

```
share file remove
```

### Flags for `file remove`

### Examples for `file remove`

```
share file remove --uni <uniName> --node <nodeName> --id <fileId>
```

## `file update`

Update a file.

### Usage for `file update`

```
share file update
```

### Flags for `file update`

- `uni` ( _option_) \- Name of **project**  
- `node` ( _option_) \- Name of **workspace**  
- `id` ( _option_) \- File id  
- `source-uri` ( _option_) \- Source URI  
- `source-bucket` ( _option_) \- Source Bucket  
- `source-key` ( _option_) \- Source Key  
- `source-region` ( _option_) \- Source Region  
- `destination-key` ( _option_) \- Destination Key  
- `json` ( _boolean_) \- Output return values as JSON

### Examples for `file update`

```
share file update --uni <uniName> --node <nodeName> --id <fileId> --source-bucket bucket-xyz --source-key foo.json --source-region us-east-1 --destination-key bar.json

share file update --uni <uniName> --node <nodeName> --id <fileId> --source-uri "<CSP URI>/foo.json" --destination-key bar.json
```
