You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`list`: list all files in the project's DivBase...
19
+
*`ls`: list all currently available files in the...
20
+
*`info`: Get detailed information about a specific...
20
21
*`download`: Download files from the project's store on...
22
+
*`stream`: Stream a file's content to standard output.
21
23
*`upload`: Upload files to your project's store on...
22
-
*`remove`: Remove files from the project's store on...
24
+
*`rm`: Soft delete files from the project's store...
25
+
*`restore`: Restore soft deleted files from the...
23
26
24
-
## `divbase-cli files list`
27
+
## `divbase-cli files ls`
25
28
26
-
list all files in the project's DivBase store.
29
+
list all currently available files in the project's DivBase store.
27
30
28
-
To see files at a user specified project version (controlled by the 'divbase-cli version' subcommand),
29
-
you can instead use the 'divbase-cli version info [VERSION_NAME]' command.
31
+
You can optionally filter the listed files by providing a prefix.
32
+
By default, DivBase query results files are hidden from the listing. Use the --include-results-files option to include them.
33
+
To see information about the versions of each file, use the 'divbase-cli files info [FILE_NAME]' command instead
30
34
31
35
**Usage**:
32
36
33
37
```console
34
-
$ divbase-cli files list [OPTIONS]
38
+
$ divbase-cli files ls [OPTIONS]
35
39
```
36
40
37
41
**Options**:
38
42
43
+
*`--tsv`: If set, will print the output in .TSV format for easier programmatic parsing.
44
+
*`-p, --prefix TEXT`: Optional prefix to filter the listed files by name (only list files starting with this prefix).
45
+
*`-r, --include-results-files`: If set, will also show DivBase query results files which are hidden by default.
46
+
*`--project TEXT`: Name of the DivBase project, if not provided uses the default in your DivBase config file
47
+
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
48
+
*`--help`: Show this message and exit.
49
+
50
+
## `divbase-cli files info`
51
+
52
+
Get detailed information about a specific file in the project's DivBase store.
53
+
54
+
This includes all versions of the file and whether the file is currently marked as soft deleted.
55
+
56
+
**Usage**:
57
+
58
+
```console
59
+
$ divbase-cli files info [OPTIONS] FILE_NAME
60
+
```
61
+
62
+
**Arguments**:
63
+
64
+
*`FILE_NAME`: Name of the file to get information about. [required]
65
+
66
+
**Options**:
67
+
68
+
*`--tsv`: If set, will print the output in .TSV format for easier programmatic parsing.
39
69
*`--project TEXT`: Name of the DivBase project, if not provided uses the default in your DivBase config file
40
70
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
41
71
*`--help`: Show this message and exit.
42
72
43
73
## `divbase-cli files download`
44
74
45
-
Download files from the project's store on DivBase. This can be done by either:
75
+
Download files from the project's store on DivBase.
76
+
77
+
This can be done by either:
46
78
1. providing a list of files paths directly in the command line
47
-
2. providing a directory to download the files to.
79
+
2. providing a text file with a list of files to download (new file on each line).
80
+
81
+
To download the latest version of a file, just provide its name. "file1""file2" etc.
82
+
To download a specific/older version of a file, use the format: "file_name:version_id"
83
+
You can get a file's version id using the 'divbase-cli file info [FILE_NAME]' command.
84
+
You can mix and match latest and specific versions in the same command.
85
+
E.g. to download the latest version of file1 and version "3xcdsdsdiw829x"
86
+
of file2: 'divbase-cli files download file1 file2:3xcdsdsdiw829x'
48
87
49
88
**Usage**:
50
89
@@ -69,12 +108,42 @@ You can also specify "." to download to the current directory.
69
108
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
70
109
*`--help`: Show this message and exit.
71
110
111
+
## `divbase-cli files stream`
112
+
113
+
Stream a file's content to standard output.
114
+
115
+
This allows your to pipe the output to other tools like 'less', 'head', 'zcat' and 'bcftools'.
116
+
117
+
Examples:
118
+
- View a file: divbase-cli files stream my_file.tsv | less
119
+
- View a gzipped file: divbase-cli files stream my_file.vcf.gz | zcat | less
120
+
- Run a bcftools command: divbase-cli files stream my_file.vcf.gz | bcftools view -h - # The "-" tells bcftools to read from standard input
121
+
122
+
**Usage**:
123
+
124
+
```console
125
+
$ divbase-cli files stream [OPTIONS] FILE_NAME
126
+
```
127
+
128
+
**Arguments**:
129
+
130
+
*`FILE_NAME`: Name of the file you want to stream. [required]
131
+
132
+
**Options**:
133
+
134
+
*`--version-id TEXT`: Specify this if you want to look at an older/specific version of the file. If not provided, the latest version of the file is used. To get a file's version ids, use the 'divbase-cli file info [FILE_NAME]' command.
135
+
*`--project TEXT`: Name of the DivBase project, if not provided uses the default in your DivBase config file
136
+
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
137
+
*`--help`: Show this message and exit.
138
+
72
139
## `divbase-cli files upload`
73
140
74
-
Upload files to your project's store on DivBase by either:
75
-
1. providing a list of files paths directly in the command line
76
-
2. providing a directory to upload
77
-
3. providing a text file with or a file list.
141
+
Upload files to your project's store on DivBase:
142
+
143
+
To provide files to upload you can either:
144
+
1. provide a list of files paths directly in the command line
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
96
165
*`--help`: Show this message and exit.
97
166
98
-
## `divbase-cli files remove`
167
+
## `divbase-cli files rm`
99
168
100
-
Remove files from the project's store on DivBase by either:
101
-
1. providing a list of files paths directly in the command line
102
-
2. providing a text file with or a file list.
169
+
Soft delete files from the project's store on DivBase
103
170
104
-
'dry_run' mode will not actually delete the files, just print what would be deleted.
171
+
To provide files to delete you can either:
172
+
1. provide a list of file names directly in the command line
173
+
2. provide a text file with a list of files to delete.
174
+
175
+
Note that deleting a non existent file will be treated as a successful deletion.
*`--file-list PATH`: Text file with list of files to upload.
189
+
*`--file-list PATH`: Text file with list of files to delete.
119
190
*`--dry-run`: If set, will not actually delete the files, just print what would be deleted.
120
191
*`--project TEXT`: Name of the DivBase project, if not provided uses the default in your DivBase config file
121
192
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
122
193
*`--help`: Show this message and exit.
194
+
195
+
## `divbase-cli files restore`
196
+
197
+
Restore soft deleted files from the project's store on DivBase
198
+
199
+
To provide files to restore you can either:
200
+
1. provide a list of files directly in the command line.
201
+
2. provide a text file with a list of files to restore (new file on each line).
202
+
203
+
NOTE: Attempts to restore a file that is not soft deleted will be considered successful and the file will remain live. This means you can repeatedly run this command on the same file and get the same response.
204
+
205
+
**Usage**:
206
+
207
+
```console
208
+
$ divbase-cli files restore [OPTIONS] [FILES]...
209
+
```
210
+
211
+
**Arguments**:
212
+
213
+
*`[FILES]...`: Space seperated list of files/objects in the project's store on DivBase to restore.
214
+
215
+
**Options**:
216
+
217
+
*`--file-list PATH`: Text file with list of files to restore.
218
+
*`--project TEXT`: Name of the DivBase project, if not provided uses the default in your DivBase config file
219
+
*`-c, --config PATH`: Path to your user configuration file. If you didn't specify a custom path when you created it, you don't need to set this. [default: /home/roryc/.config/divbase/config.yaml]
0 commit comments