Skip to content

Commit 8e331b6

Browse files
committed
docs: correct -log level options and document env vars
The -log flag is parsed by logrus.ParseLevel which accepts level names, not the numeric scale the help text and README advertised. Also add an Environment Variables section documenting MASTERPW and the ENP_PIN_* inputs, which were only discoverable from the source.
1 parent 5805b56 commit 8e331b6

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Flags
6565
| `-vault=PATH` | Path to your Enpass vault |
6666
| `-keyfile=PATH` | Path to your Enpass vault keyfile |
6767
| `-type=TYPE` | The type of your card (password, ...) |
68-
| `-log=LEVEL` | The log level from debug (5) to error (1) |
68+
| `-log=LEVEL` | The log level (trace, debug, info, warn, error, fatal, panic) |
6969
| `-nonInteractive` | Disable prompts and fail instead |
7070
| `-json` | Output as JSON to stdout |
7171
| `-pin` | Enable Quick Unlock using a PIN |
@@ -81,6 +81,15 @@ Flags
8181
| `-category=CATEGORY` | Category for `create`/`edit` commands (default: Login) |
8282
| `-force` | Skip confirmation prompts for `trash`/`delete` commands |
8383

84+
Environment Variables
85+
-----
86+
| Name | Description |
87+
| :---: | --- |
88+
| `MASTERPW` | Vault master password (skips the interactive prompt) |
89+
| `ENP_PIN` | PIN value when `-pin` is enabled (skips the PIN prompt) |
90+
| `ENP_PIN_PEPPER` | Pepper mixed into the PIN-derived key |
91+
| `ENP_PIN_ITER_COUNT` | KDF iteration count for the PIN (default: 100000) |
92+
8493
Development
8594
-----
8695
```shell

cmd/enpasscli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (args *Args) parse() {
8484
args.vaultPath = flag.String("vault", "", "Path to your Enpass vault.")
8585
args.cardType = flag.String("type", "password", "The type of your card. (password, ...)")
8686
args.keyFilePath = flag.String("keyfile", "", "Path to your Enpass vault keyfile.")
87-
args.logLevelStr = flag.String("log", defaultLogLevel.String(), "The log level from debug (5) to error (1).")
87+
args.logLevelStr = flag.String("log", defaultLogLevel.String(), "The log level: trace, debug, info, warn, error, fatal, panic.")
8888
args.jsonOutput = flag.Bool("json", false, "Output data in JSON format.")
8989
args.nonInteractive = flag.Bool("nonInteractive", false, "Disable prompts and fail instead.")
9090
args.pinEnable = flag.Bool("pin", false, "Enable PIN.")

0 commit comments

Comments
 (0)