vach-cli
vach-cli
is a simple CLI for packing, unpacking and handling .vach
files.
For the
vach20
version use this version of the CLI instead, this version of the CLI only works withvach30
onwards
sh
cargo install vach-cli
Generally follows the template:
sh
vach [subcommand] -[key] [...values]
```sh
vach list -i source.vach
vach pack -i hello.png click.wav dialogue.tx -o assets.vach
vach pack -d textures -o textures.vach -c
vach list -i textures.vach ┌───────────────────────────┬───────┬────────────┐ │ id │ size │ flags │ ├───────────────────────────┼───────┼────────────┤ │ textures/perlin.png │ 698 B │ Flags[C--] │ │ textures/dirt.png │ 391 B │ Flags[C--] │ │ textures/cobble.png │ 733 B │ Flags[C--] │ │ textures/map.json │ 311 B │ Flags[C--] │ └───────────────────────────┴───────┴────────────┘ ```
Running vach help
will list all the commands. They each have their own inputs.
Also check out spec/main.txt
for the official spec.
You can also run vach [command] --help
to see help on each individual command.
Because of how the CLI works, the positions of the keys does not matter, so:
vach list -i target.vach -m CMYKV
and vach list -m CMYKV -i target.vach
are equivalent.
pack
is used to pack files and directories into archives. It takes inputs for customizing how the archive should be packaged.
```sh
vach pack -o hello.vach
vach pack -o hello.vach -i hello.txt goodbye.txt
vach pack -o hello.vach -d ./hello
vach pack -o hello.vach -r ./hello
vach pack -o hello.vach -i hi.txt bye.txt -d greetings PR -r talks
vach pack -x hello/secret.txt -o hello.vach -d hello
vach pack -k keypair.kp -o hello.vach -i hello.txt goodbye.txt vach pack -s secret_key.sk -o hello.vach -i hello.txt goodbye.txt
vach pack -c always -o hello.vach -i hello.txt goodbye.txt vach pack -c never -o hello.vach -i hello.txt goodbye.txt
vach pack -g lz4 -c always -o hello.vach -i hello.txt goodbye.txt
vach pack -g snappy -c never -o hello.vach -i hello.txt goodbye.txt
vach pack -s -o hello.vach -i hello.txt goodbye.txt
${OUTPUT_ARCHIVE}.kp
vach pack -e -o hello.vach -i hello.txt goodbye.txt
vach pack -f 35984 -o hello.vach -i hello.txt goodbye.txt
vach pack -m CMYKX -o hello.vach -i hello.txt goodbye.txt
vach pack -t -o hello.vach -i hello.txt goodbye.txt ```
unpack
is used to unpack archives back into their constituent files.
```sh
vach unpack -i target.vach
vach unpack -i source.vach -o ./output/
vach unpack -m `CMYKX -i source.vach
vach unpack -t -i source.vach
vach unpack -k keypair.kp -i source.vach vach unpack -s keypair.sk -i source.vach ```
Lists all the entries in the archive as a table
```sh
vach list -i textures.vach
vach list -i textures.vach -m TXTRS
vach list -i textures.vach -m TXTRS --sort size-descending ```
Verifies the validity of a file as an archive
```sh
vach verify -i textures.vach
vach verify -i textures.vach -m TXTRS ```
Key-pair generation command
```sh vach keypair -o keypair.kp
vach keypair -s -o keypair.kp
```
Splits an existing keypair into it's public and secret components
```sh vach split -i keypair.kp
```