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
{{ message }}
Repository navigation
Commit aeb013c
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -125,23 +125,26 @@ Bitcache is a distributed content-addressable storage (CAS) system.
125
125
Usage: bitcache [OPTIONS] [COMMAND]
126
126
127
127
General commands:
128
-
id Compute the BLAKE3 hash of the given file(s)
129
-
help Print this message or the help of the given subcommand(s)
128
+
id Compute the BLAKE3 hash of the given file(s), or of stdin
129
+
help Print this message or the help of the given subcommand(s)
130
130
131
131
Current repository commands (`$BITCACHE_URL`, default `./.bitcache/`):
132
-
init Initialize a new repository in `./.bitcache/`
133
-
list List the IDs of the blobs in the repository, in ascending order
134
-
has Check whether the repository contains blob(s) with the given ID(s)
135
-
get Fetch blob(s) from the repository, writing their contents to stdout
136
-
put Store the given file(s) into the repository as blob(s)
137
-
rm Remove blob(s) with the given ID(s) from the repository
138
-
clear Remove all blobs from the repository
139
-
export Export all blobs in the repository into a tarball
132
+
init Initialize a new repository in `./.bitcache/`
133
+
list List the IDs of the blobs in the repository, in ascending order
134
+
has Check whether the repository contains blob(s) with the given ID(s)
135
+
get Fetch blob(s) from the repository, writing their contents to stdout
136
+
put Store the given file(s) into the repository as blob(s)
137
+
rm Remove blob(s) with the given ID(s) from the repository
138
+
clear Remove all blobs from the repository
139
+
export Export all blobs in the repository into a tarball
140
140
141
141
Remote repository commands:
142
-
push Copy blobs missing from the given remote repositories to them
143
-
pull Copy blobs missing from the current repository from the given remotes
144
-
sync Synchronize with the given remote repositories, in both directions
142
+
push Copy blobs missing from the given remote repositories to them
143
+
pull Copy blobs missing from the current repository from the given remotes
144
+
sync Synchronize with the given remote repositories, in both directions
145
+
146
+
Other commands:
147
+
compact Compact the repository's physical storage
145
148
146
149
Options::
147
150
--color <COLOR>
@@ -167,6 +170,7 @@ Options::
167
170
```
168
171
169
172
-[`bitcache clear`](#bitcache-clear) - Remove all blobs from the repository
173
+
-[`bitcache compact`](#bitcache-compact) - Compact the repository's physical storage
170
174
-[`bitcache export`](#bitcache-export) - Export all blobs in the repository into a tarball
171
175
-[`bitcache get`](#bitcache-get) - Fetch blob(s) from the repository, writing their contents to stdout
172
176
-[`bitcache has`](#bitcache-has) - Check whether the repository contains blob(s) with the given ID(s)
@@ -209,20 +213,66 @@ Options:
209
213
Print help (see a summary with '-h')
210
214
```
211
215
216
+
#### `bitcache compact`
217
+
218
+
```shellsession
219
+
$ bitcache compact --help
220
+
Compact the repository's physical storage.
221
+
222
+
Filesystem repositories rewrite stored blobs using the requested compression scheme and clean up orphaned temporary artifacts. Other repository backends may perform no maintenance.
223
+
224
+
Usage: bitcache compact [OPTIONS]
225
+
226
+
Options:
227
+
--color <COLOR>
228
+
Set the color output mode
229
+
230
+
[default: auto]
231
+
[possible values: auto, always, never]
232
+
233
+
--compress <SCHEME>
234
+
The target compression scheme for stored blobs.
235
+
236
+
One of `none`, `xz`, `xz:fast`, or `xz:best` (`xz` is an alias for `xz:fast`). Defaults to the `compress` directive of the `[bitcache.compact]` config section, or else `xz`.
237
+
238
+
-d, --debug
239
+
Enable debugging output
240
+
241
+
-v, --verbose...
242
+
Enable verbose output (may be repeated for more verbosity)
243
+
244
+
-h, --help
245
+
Print help (see a summary with '-h')
246
+
```
247
+
212
248
#### `bitcache export`
213
249
214
250
```shellsession
215
251
$ bitcache export --help
216
-
Export all blobs in the repository into a tarball
252
+
Export all blobs in the repository into a tarball.
217
253
218
-
Usage: bitcache export [OPTIONS] --output <FILE>
254
+
Without `--output`, the tar stream is written to stdout, so it can be piped to `xz`, `bzip2`, `gzip`, etc.
255
+
256
+
Usage: bitcache export [OPTIONS]
219
257
220
258
Options:
221
-
--color <COLOR> Set the color output mode [default: auto] [possible values: auto, always, never]
222
-
-o, --output <FILE> The path to the tarball file to create
223
-
-d, --debug Enable debugging output
224
-
-v, --verbose... Enable verbose output (may be repeated for more verbosity)
225
-
-h, --help Print help
259
+
--color <COLOR>
260
+
Set the color output mode
261
+
262
+
[default: auto]
263
+
[possible values: auto, always, never]
264
+
265
+
-o, --output <FILE>
266
+
The path to the tarball file to create (default: stdout)
267
+
268
+
-d, --debug
269
+
Enable debugging output
270
+
271
+
-v, --verbose...
272
+
Enable verbose output (may be repeated for more verbosity)
273
+
274
+
-h, --help
275
+
Print help (see a summary with '-h')
226
276
```
227
277
228
278
#### `bitcache get`
@@ -231,13 +281,15 @@ Options:
231
281
$ bitcache get --help
232
282
Fetch blob(s) from the repository, writing their contents to stdout.
233
283
284
+
IDs may be given as unambiguous hexadecimal prefixes: each prefix resolves to the first matching blob ID in the repository.
285
+
234
286
Exits with a nonzero status unless all of the given blobs were found in the repository.
235
287
236
288
Usage: bitcache get [OPTIONS] [IDS]...
237
289
238
290
Arguments:
239
291
[IDS]...
240
-
The IDs of the blob(s) to fetch
292
+
The IDs (or unambiguous ID prefixes) of the blob(s) to fetch
241
293
242
294
Options:
243
295
--color <COLOR>
@@ -246,9 +298,26 @@ Options:
246
298
[default: auto]
247
299
[possible values: auto, always, never]
248
300
301
+
-n, --lines <COUNT>
302
+
Print only the first COUNT lines of each blob
303
+
249
304
-d, --debug
250
305
Enable debugging output
251
306
307
+
-f, --format <FORMAT>
308
+
The output format: `raw` (the default) or `base64`
309
+
310
+
Possible values:
311
+
- raw: The blob's raw contents
312
+
- base64: ASCII-armored (Base64-encoded) contents, one line per blob
313
+
314
+
[default: raw]
315
+
316
+
-o, --output <FILE>
317
+
Write the output to this file instead of stdout.
318
+
319
+
With a single blob, raw output, and no line limit, filesystem repositories reflink uncompressed blobs to the output file on supporting filesystems, avoiding a data copy.
320
+
252
321
-v, --verbose...
253
322
Enable verbose output (may be repeated for more verbosity)
254
323
@@ -293,15 +362,15 @@ Options:
293
362
294
363
```shellsession
295
364
$ bitcache id --help
296
-
Compute the BLAKE3 hash of the given file(s).
365
+
Compute the BLAKE3 hash of the given file(s), or of stdin.
297
366
298
-
Prints the ID each file would have as a blob, one per line, without accessing or modifying any repository.
367
+
Prints the ID each file would have as a blob, one per line, without accessing or modifying any repository. With no files (or with `-`), reads from standard input.
299
368
300
369
Usage: bitcache id [OPTIONS] [FILES]...
301
370
302
371
Arguments:
303
372
[FILES]...
304
-
The paths to the file(s) to hash
373
+
The paths to the file(s) to hash (`-` or none for stdin)
305
374
306
375
Options:
307
376
--color <COLOR>
@@ -317,8 +386,6 @@ Options:
317
386
- hex: Hexadecimal (aka Base16)
318
387
- base58: Base58
319
388
320
-
[default: hex]
321
-
322
389
-d, --debug
323
390
Enable debugging output
324
391
@@ -335,7 +402,8 @@ Options:
335
402
$ bitcache init --help
336
403
Initialize a new repository in `./.bitcache/`.
337
404
338
-
Creates an empty repository in the `./.bitcache/` directory of the current working directory; `$BITCACHE_URL` is ignored.
405
+
Creates an empty repository in the `./.bitcache/` directory of the current working directory; `$BITCACHE_URL` is ignored. The given options are recorded in the created `.bitcache/config.toml`; an existing
406
+
configuration file is never overwritten.
339
407
340
408
Usage: bitcache init [OPTIONS]
341
409
@@ -346,12 +414,30 @@ Options:
346
414
[default: auto]
347
415
[possible values: auto, always, never]
348
416
417
+
--hashing <ALGORITHM>
418
+
The content-hashing algorithm to use (only `blake3`)
419
+
420
+
--capacity <COUNT>
421
+
A capacity hint for how many blobs will be stored.
422
+
423
+
A count with an optional `K`, `M`, `B`, or `T` suffix (e.g., `100M` for one hundred million).
424
+
349
425
-d, --debug
350
426
Enable debugging output
351
427
428
+
--encoding <FORMAT>
429
+
The default encoding for displaying blob IDs
430
+
431
+
Possible values:
432
+
- hex: Hexadecimal (aka Base16)
433
+
- base58: Base58
434
+
352
435
-v, --verbose...
353
436
Enable verbose output (may be repeated for more verbosity)
354
437
438
+
--without-git
439
+
Skip creating the `.gitattributes` and `.gitignore` files
440
+
355
441
-h, --help
356
442
Print help (see a summary with '-h')
357
443
```
@@ -365,7 +451,11 @@ List the IDs of the blobs in the repository, in ascending order.
365
451
With `--verbose` (repeatable), appends further tab-separated columns to each line: the blob's byte size, media type, creation timestamp, last-update timestamp, last-access timestamp, and expiration
366
452
timestamp.
367
453
368
-
Usage: bitcache list [OPTIONS]
454
+
Usage: bitcache list [OPTIONS] [PREFIX]
455
+
456
+
Arguments:
457
+
[PREFIX]
458
+
List only IDs whose hexadecimal encoding begins with this prefix
369
459
370
460
Options:
371
461
--color <COLOR>
@@ -381,17 +471,12 @@ Options:
381
471
- hex: Hexadecimal (aka Base16)
382
472
- base58: Base58
383
473
384
-
[default: hex]
474
+
-a, --after <ID>
475
+
List only IDs ordered strictly after this one
385
476
386
477
-d, --debug
387
478
Enable debugging output
388
479
389
-
-p, --prefix <PREFIX>
390
-
List only IDs whose hexadecimal encoding begins with this prefix
391
-
392
-
-a, --after <ID>
393
-
List only IDs ordered strictly after this one
394
-
395
480
-n, --limit <COUNT>
396
481
List at most this many IDs
397
482
@@ -492,7 +577,10 @@ Options:
492
577
- hex: Hexadecimal (aka Base16)
493
578
- base58: Base58
494
579
495
-
[default: hex]
580
+
--compress <SCHEME>
581
+
The compression scheme for physically storing the blob(s).
582
+
583
+
One of `none`, `xz`, `xz:fast`, or `xz:best` (`xz` is an alias for `xz:fast`). Defaults to the `compress` directive of the `[bitcache.put]` config section, or else `none`.
Filesystem repositories rewrite stored blobs using the requested compression scheme and clean up orphaned temporary artifacts. Other repository backends may perform no maintenance.
5
+
6
+
Usage: bitcache compact [OPTIONS]
7
+
8
+
Options:
9
+
--color <COLOR>
10
+
Set the color output mode
11
+
12
+
[default: auto]
13
+
[possible values: auto, always, never]
14
+
15
+
--compress <SCHEME>
16
+
The target compression scheme for stored blobs.
17
+
18
+
One of `none`, `xz`, `xz:fast`, or `xz:best` (`xz` is an alias for `xz:fast`). Defaults to the `compress` directive of the `[bitcache.compact]` config section, or else `xz`.
19
+
20
+
-d, --debug
21
+
Enable debugging output
22
+
23
+
-v, --verbose...
24
+
Enable verbose output (may be repeated for more verbosity)
0 commit comments