diff --git a/docs/CommandLineHelp.md b/docs/CommandLineHelp.md new file mode 100644 index 0000000..dc9200f --- /dev/null +++ b/docs/CommandLineHelp.md @@ -0,0 +1,197 @@ +# Command-Line Help for `yage` + +This document contains the help content for the `yage` command-line program. + +**Command Overview:** + +* [`yage`↴](#yage) +* [`yage decrypt`↴](#yage-decrypt) +* [`yage edit`↴](#yage-edit) +* [`yage encrypt`↴](#yage-encrypt) +* [`yage env`↴](#yage-env) +* [`yage keygen`↴](#yage-keygen) +* [`yage pubkey`↴](#yage-pubkey) + +## `yage` + +A simple tool to manage encrypted secrets in YAML files. + +**Usage:** `yage [OPTIONS] [COMMAND]` + +###### **Subcommands:** + +* `decrypt` — Decrypt the values in a YAML file +* `edit` — Edit an encrypted YAML file +* `encrypt` — Encrypt the values in a YAML file +* `env` — Execute a command with the environment from the encrypted YAML file +* `keygen` — Generate a new age key +* `pubkey` — Convert private age keys to their public key + +###### **Options:** + +* `--completion ` — Generate the completion code for this shell + + Possible values: `bash`, `elvish`, `fish`, `powershell`, `zsh` + +* `-v`, `--verbose` — Increase logging verbosity +* `-q`, `--quiet` — Decrease logging verbosity +* `--markdown-help` + + Possible values: `true`, `false` + + + + +## `yage decrypt` + +Decrypt the values in a YAML file + +**Usage:** `yage decrypt [OPTIONS] ` + +###### **Arguments:** + +* `` — The YAML file to decrypt + +###### **Options:** + +* `-i`, `--in-place` — Decrypt in place + + Possible values: `true`, `false` + +* `-k`, `--key ` — Decrypt with the specified key +* `-K`, `--key-file ` — Decrypt with the key in the file +* `-o`, `--output ` — The output path to the decrypted YAML file + + Default value: `-` + + + +## `yage edit` + +Edit an encrypted YAML file + +The file is decrypted with the specified keys and open in a text editor. The user can edit the file and save it. The values are then encrypted with the same keys and the recipients, and saved in the original file. + +The YAML file may contain some unencrypted values, and some encrypted values. The encrypted values are decrypted before the edition and all the values are encrypted after the edition. + +Only the modified values are encrypted, the other values are left unchanged. + +**Usage:** `yage edit [OPTIONS] --editor ` + +###### **Arguments:** + +* `` — The encrypted YAML file to edit + +###### **Options:** + +* `-e`, `--editor ` — The editor command to use +* `-k`, `--key ` — Decrypt with the specified key +* `-K`, `--key-file ` — Decrypt with the key at in this file +* `-r`, `--recipient ` — Encrypt to the specified recipients +* `-R`, `--recipient-file ` — Encrypt to recipients listed at PATH + + + +## `yage encrypt` + +Encrypt the values in a YAML file + +Only the values are encrypted, the keys are left in clear. + +The values are encrypted with the recipients' public keys in the age format, converted in base64 and surrounded by `yage[…]` markers. + +This command is able to encrypt some new values in a file that already contains encrypted values. The encrypted values are detected thanks to the `yage[…]` markers and left unchanged. + +**Usage:** `yage encrypt [OPTIONS] ` + +###### **Arguments:** + +* `` — The YAML file to encrypt + +###### **Options:** + +* `-i`, `--in-place` — Encrypt in place + + Possible values: `true`, `false` + +* `-r`, `--recipient ` — Encrypt to the specified recipients +* `-R`, `--recipient-file ` — Encrypt to recipients listed at PATH +* `-o`, `--output ` — The output path to the encrypted YAML file + + Default value: `-` + + + +## `yage env` + +Execute a command with the environment from the encrypted YAML file + +The YAML file must contain a map with string keys and values. The keys are the environment variable names, and the values are the environment variable values. Other more complex YAML structures are not supported. + +**Usage:** `yage env [OPTIONS] [ARGS]...` + +###### **Arguments:** + +* `` — The YAML file to decrypt +* `` — The command to run +* `` — The command arguments + +###### **Options:** + +* `-i`, `--ignore-environment` — Start with an empty environment + + Default value: `false` + + Possible values: `true`, `false` + +* `-k`, `--key ` — Decrypt with the specified key +* `-K`, `--key-file ` — Decrypt with the key at PATH + + + +## `yage keygen` + +Generate a new age key + +The public part of the key is logged to the standard error output. It may be computed from the private key with the pubkey command. + +The key is written in the age format, which is compatible with the age tool. + +**Usage:** `yage keygen [OPTIONS]` + +###### **Options:** + +* `-o`, `--output ` — The output path to the private key file + + Default value: `-` + + + +## `yage pubkey` + +Convert private age keys to their public key + +The input key and output public key are in the age format, which is compatible with the age tool. + +**Usage:** `yage pubkey [OPTIONS] [KEY_FILE]...` + +###### **Arguments:** + +* `` — The private key files + +###### **Options:** + +* `-k`, `--key ` — The private keys +* `-o`, `--output ` — The output path to the public key file + + Default value: `-` + + + +
+ + + This document was generated automatically by + clap-markdown. + +